principle-migrate-callers-then-delete-legacy-apis
What it does
Gives the assistant a rule for replacing internal interfaces cleanly. It is for teams that own their code and can make coordinated changes.
When to use it
- ✓When you introduce a new internal API while old callers still exist.
- ✓When a refactor would otherwise leave compatibility wrappers in place.
- ✓When no external users depend on the old interface.
Skill link
https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“We have a new internal payments API. Move every caller over and delete the old one in the same change.”
5 new skills a week. 1 minute to read.
How it works
The assistant updates every caller to the new contract and removes the old interface in the same wave. It also updates tests to assert the new behavior and removes tests that only protected old implementation details.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
When does this apply?
When no external users rely on backward compatibility and the project can absorb coordinated breaking changes.
Why not keep a compatibility layer?
According to the skill, temporary compatibility code tends to become long-lived debt.
What happens to the tests?
Tests are updated to check the new contract, and tests that only check old internals are deleted.
Details
Original description by the author
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.
repo: cursor/plugins
Popularity
- GitHub stars
- 15k
- Ranking position
- #10980
- License
- —
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
advisor
15kLets your agent consult a stronger second model at key checkpoints, such as before a big decision or when stuck on an error, if you turn it on.
check-agent-compatibility
15kRuns a full check of whether AI coding agents can start, verify and document a repository, and returns one compatibility score with the main issues.
cli-for-agents
15kTeaches your agent to design or review command-line tools so AI agents can run them without prompts, with clear help text and examples.
continual-learning
15kKeeps your AGENTS.md notes up to date by handing the work of reviewing past chats to a dedicated memory updater.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.