LedgerHQ/lumen / .claude/skills/write-migration
write-migration
VerifiedWrites the migration file (in `libs/migrations/src/`) and the Nx version plans for the current branch's changes to Lumen's public API. Use when a branch removes, renames or changes an export, prop, prop value, token, icon or peer dependency, changes behavior or rendering consumers rely on, when `check:breaking-changes` or the migrations `validate` fails, or when asked to write a migration or prepare a breaking change for review.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.8 KB |
| references/authoring.md | markdown | 3.1 KB |
references/authoring.md
View on GitHub# Authoring a migration
## Changes
| Check line | Entry |
| ------------------------------------------------- | ----------------------------------------------------------------------------- |
| `removed export …#Foo`, and `Bar` replaces it 1:1 | `change: renamed`, `ref: …#Foo`, `to: …#Bar` |
| `removed export …#Foo`, no 1:1 replacement | `change: removed`; the body says what to use instead |
| `removed value …#Button.size=xs` | `change: removed`, `surface: value` |
| `required member …#MenuTrigger.render` | `change: required`, `surface: member` |
| `changed member …#Tag.size (narrowed)` | `change: changed`, `surface: member`, `signal: loud` |
| `required dependency @base-ui/react` | `change: required`, `surface: dependency`, ref the package |
| `changed dependency react-native-reanimated (…)` | `change: changed`, `surface: dependency`, manifests `detect` on the old range |
- Copy the ref exactly as printed. One entry per platform.
- Use a `*` ref only when every match is part of this update.
- A narrower peer range is usually `silent`
(`libs/migrations/src/reanimated-4-3-peer.md`). Add `requires` only when the
upgrade must stop until it is met.
## Signal
- A changed default is `silent` if it alters behavior, `visual` if only
styling.
- A removed prop that is still a valid DOM prop is `silent`.
- Comment non-obvious ones: `signal: silent # onSelect is still a valid DOM prop`.
## Detect patterns
Add one to `loud` entries too when cheap: it shows the upgrade agent where to
look.
- Match the old usage only: `<MenuItem\b[^>]*\bonSelect=`, not `onSelect`.
- Exports: match the import from the exact entry point.
`import\s*(type\s*)?\{[^}]*\bApex\b[^}]*\}\s*from\s*[''"]@ledgerhq/lumen-ui-react/symbols[''"]`
- Single-quoted YAML flow style: `- { pattern: '<Card\b[^>]*\bdisabled\b', expect: review }`.
- `expect: review` when a hit may be fine code, such as any use of a component
whose behavior changed.
- A changed default: copy the lookahead from
`libs/migrations/src/button-default-type-button.md`, with `expect: review`.
## Body
Write for an agent applying the change in an unknown codebase. Short sentences,
no history.
**`## Before → after`**: one realistic example covering every entry. Add a
`React Native:` block only where its code differs.
**`## Decide`**: one bullet per call the agent must make, ending with the
default. Cover what `detect` can't find (styles keyed on old `data-*`, a nested
context reset).
```md
- `Charon` is gone. `RecoveryKey` is the design replacement, but a different
glyph. Default: use it; check the screen still reads right.
```
**`## Verify`**:
```md
Zero `detect` hits, and every `MenuLabel` hit reviewed. Typecheck passes.
Open each menu: it opens from its trigger and items run their action.
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |