nullable-new-params
/nullable-new-params
Poprawia w diffach monorepo Remotion nowo dodane opcjonalne parametry i propsy, zamieniając wewnętrzne API na wymagane wartości nullable i aktualizując miejsca wywołań.
- Autor
- remotion-dev ↗
- Repozytorium
- remotion ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 25.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/find-new-optional-params.ts
Co robi i kiedy
Poprawia w diffach monorepo Remotion nowo dodane opcjonalne parametry i propsy, zamieniając wewnętrzne API na wymagane wartości nullable i aktualizując miejsca wywołań.
Oryginalny opis (EN)
Fix newly added optional parameters, optional React props, and optional type/interface members in Remotion monorepo diffs by converting internal APIs to required nullable values and updating call sites. Use when a PR, review, or user asks to forbid new `foo?: T` / `param?: T` additions except for exported or documented public APIs where requiring the value would be breaking.
Jak działa
- Rule
- Workflow
- Review checklist
Podgląd SKILL.md
---
name: nullable-new-params
description: 'Fix newly added optional parameters, optional React props, and optional type/interface members in Remotion monorepo diffs by converting internal APIs to required nullable values and updating call sites. Use when a PR, review, or user asks to forbid new `foo?: T` / `param?: T` additions except for exported or documented public APIs where requiring the value would be breaking.'
---
# Nullable new params
Use this skill when a change added a new parameter or type member as optional. In internal Remotion code, new inputs must be required and nullable so every caller makes an explicit choice.
## Rule
- Internal contracts: write `name: T | null`, not `name?: T`.
- Call sites must pass `null` explicitly when no value exists.
- Implementation checks should prefer `value === null` / `value !== null` when null is the absence sentinel.
- Do not use `undefined` as the absence sentinel for new internal APIs unless the surrounding local contract already standardizes on `undefined`.
- The anti-pattern includes redundant shapes such as `frozenFrame?: number | null`; make it `frozenFrame: number | null`.
Public APIs are the exception. If the changed signature, props type, or options object is exported from a package public entrypoint or documented in `packages/docs/docs`, making the new field/argument required is a breaking change. Keep it optional or add a backwards-compatible overload/options path, then document/default it as appropriate.
## Workflow
1. Inspect the diff for newly added optional members or parameters:
```sh
bun .agents/skills/nullable-new-params/scripts/find-new-optional-params.ts
```
Useful variants:
```sh
bun .agents/skills/nullable-new-params/scripts/find-new-optional-params.ts origin/main...HEAD
bun .agents/skills/nullable-new-params/scripts/find-new-optional-params.ts --cached
```
2. For each candidate, classify whether it is public:
- Public: exported from a package entrypoint, included in package `exports`, or documented in `packages/docs/docs`.
- Internal: local helpers, internal component props, cross-file monorepo helpers, test utilities, internal context data, and types not exposed through package entrypoints.
- If unsure, grep package entrypoints and docs before changing API shape.
3. For internal candidates, refactor the type from optional to required nullable:
```ts
type Before = {
readonly frame?: number;
};
type After = {
readonly frame: number | null;
};
```
For function parameters:
```ts
const before = (frame?: number) => {};
const after = (frame: number | null) => {};
```
4. Update every caller/object literal to pass the value explicitly:
- Use `field: null` when absent.
- Preserve existing values with `field: maybeValue ?? null` only when `undefined` can still enter from surrounding code.
- Avoid hiding the required choice behind defaults in destructuring.
5. Update implementation logic:
- Replace truthy checks when `0`, `''`, or `false` are valid values.
- Prefer `value !== null` over `value` for nullable numbers/strings/booleans.
- When updating existing tests or fixtures, keep them explicit; do not make large fixtures `Partial<T>` only to dodge the new field.
6. For public candidates, preserve backwards compatibility:
- Keep the new field optional in the public type.
- Resolve a concrete internal value at the boundary, usually with `const internal = publicValue ?? null`.
- Keep internal downstream types required nullable.
7. Verify:
- Run the scanner again until only intentional public API exceptions remain.
- Run focused tests or package builds for touched packages, for example `bunx turbo run make --filter='<package-name>'`.
- If docs changed, follow the `writing-docs` skill.
## Review checklist
- No new internal `?:` member or `param?:` parameter remains.
- Every internal caller passes either a real value or `null`.
- Public APIs remain backwards-compatible.
- Nullable checks do not treat valid falsy values as absent.
- Verify an explicit `null` path with existing checks or manual verification when behavior depends on absence.
Pliki w paczce (3)
- SKILL.md 4 KB
- agents/openai.yaml 1 KB
- scripts/find-new-optional-params.ts 3 KB
Wersje
W bazie nie ma innych skilli o nazwie nullable-new-params.
Migawka bazy z 13.11.2026 · wersja paczki f9193b1e5503 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95csharp-nullable-types
Opisuje typy nullable w C# (referencyjne i wartościowe), adnotacje oraz wzorce obsługi wartości null dla bezpieczeństwa kodu. - 100kernelcad-params
Obsługuje edytowalne parametry symboliczne param i params, arytmetykę ParamRef i set_param w MCP, gdy model wymaga wartości zmienianych na żywo przez agenta lub studio. - 100fp-option-ref
Podaje skrócone odniesienie do typu Option w fp-ts, przy obsłudze wartości nullable i opcjonalnych danych oraz unikaniu sprawdzania null. - 100fp-option-ref
Podaje skrócone odniesienie do typu Option w fp-ts, przy obsłudze wartości nullable i opcjonalnych danych oraz unikaniu sprawdzania null. - 90absent-values
Ujednolica obsługę brakujących wartości: opcjonalnych pól, propsów i kolumn, undefined, null, optional, nullable i default, według zasady Esposter jednej formy braku. - 91csharp-nullable-types
Wspiera typy referencyjne dopuszczające null w C#, wzorce bezpieczeństwa null i strategie migracji.