principle-migrate-callers-then-delete-legacy-apis: Claude Code skill
Instructs the assistant to migrate internal callers and delete legacy APIs in a single wave, skipping temporary compatibility layers.
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a claude-codeWhat principle-migrate-callers-then-delete-legacy-apis does
This skill guides refactoring when introducing a new internal API. Instead of writing bridge layers or deprecation wrappers, the assistant updates all callers immediately. The old API is deleted in the exact same wave of changes.
The workflow also cleans up the test suite. The assistant rewrites tests to assert the new contract and removes tests that only guarded pre-refactor implementation details. No zombie tests remain.
Applying this to an API with third-party consumers will break their code. It is designed solely for internal refactoring where the codebase can absorb coordinated breaking changes for simplification.
What it helps with
- eliminate temporary backward compatibility shims
- migrate internal callers to the new API signature
- prune tests that only verify obsolete implementation details
- execute coordinated breaking refactors in one pass
Example prompts for the agent
- Replace the internal storage API and migrate all existing callers in this commit.
- Refactor our session handler to the new signature and delete the old methods and obsolete tests.
How to install principle-migrate-callers-then-delete-legacy-apis
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a claude-code2Manually: put the files in place
~/.claude/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/principle-migrate-callers-then-delete-legacy-apis/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a codex2Manually: put the files in place
.agents/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a cursor2Manually: put the files in place
.cursor/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack principle-migrate-callers-then-delete-legacy-apis2Manually: put the files in place
.github/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a gemini-cli2Platform CLI
gemini skills install https://github.com/backnotprop/pstack --path skills/principle-migrate-callers-then-delete-legacy-apisManually: put the files in place
.devin/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about principle-migrate-callers-then-delete-legacy-apis
How to install principle-migrate-callers-then-delete-legacy-apis in Claude Code?
Run npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a claude-code in your terminal.
What does principle-migrate-callers-then-delete-legacy-apis do?
It directs the AI to update all callers to a new internal API and delete the old API immediately without preserving compatibility layers.
When should you apply this principle?
Use it during simplification initiatives when no external consumers require backward compatibility and the project can handle coordinated breaking changes.
Source text
SKILL.md · MIT
--- name: principle-migrate-callers-then-delete-legacy-apis description: "Apply when introducing a new internal API while old callers still exist. Migrate callers and delete the old API in the same wave instead of preserving compatibility layers." disable-model-invocation: true --- # Migrate Callers Then Delete Legacy APIs - Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details **When this applies:** - No external users depend on backward compatibility - The project can absorb coordinated breaking changes - The new API is part of a simplification or refactor initiative
© backnotprop · MIT · backnotprop/pstack