Nullable New Params
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.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Nullable New Params when an AI agent needs a reusable SKILL.md workflow for this job: 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.
When not to use it
Skip Nullable New Params when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/nullable-new-params # Save SKILL.md to ~/.claude/skills/nullable-new-params/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/nullable-new-params/SKILL.md. For a shared project, commit the folder at .claude/skills/nullable-new-params/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Nullable New Params skill for this task: Inspect the diff for newly added optional members or parameters:. Confirm any required inputs or files before making changes.
What supports this recommendation?
83/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 92/100
- Practical detail
- 92/100
- Source evidence
- 63/100
- Source signals
- 72/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityuntested
No model-specific signal or recorded compatibility test was found.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# 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.
Intended uses
- Inspect the diff for newly added optional members or parameters:
- 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.
- For internal candidates, refactor the type from optional to required nullable:
- 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.
- 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.
- 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.
- Verify:
- Run the scanner again until only intentional public API exceptions remain.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.