Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/principle-migrate-callers-then-delete-legacy-apis/

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

Similar skills

All skills for Code review and refactoring →

From the same set44

principle-boundary-discipline A rule-set skill for coding agents: validation and error handling stay at system boundaries, while the inside trusts its types and plain functions. CX Codex +1 5,100installs principle-sequence-verifiable-units Guides coding agents to break multi-step sweeps and migrations into verifiable units. Keeps each step verified before proceeding to the next. CX Codex +1 5,100installs principle-test-behavior-not-implementation A rule for tests you write or keep: assert what callers can observe. Turns tests that break on every refactor into ones that catch real bugs. CX Codex +1 5,200installs principle-minimize-reader-load A skill that spots unnecessary layers of abstraction and hidden state slowing down code comprehension. Use it when reviewing complex code where the logic is hard to trace. CX Codex +1 5,200installs principle-model-the-domain Guides an agent to model domain rules in data structures instead of growing conditionals. Use it when stateful code or repeated shape assumptions start spreading. CX Codex +1 5,200installs principle-redesign-from-first-principles A skill that makes the agent rebuild an existing design as if the new requirement had been there from day one. Use it when a change ripples through types, docs, and examples. CX Codex +1 5,200installs principle-never-block-on-the-human Instructs coding agents to execute reversible changes immediately instead of asking for approval. Useful for autonomous sessions under asynchronous supervision. CX Codex +1 5,200installs principle-build-the-lever A skill that pushes the agent to write a codemod, script or generator for non-trivial work instead of editing by hand, so the result can be rerun. CX Codex +1 5,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor