principle-migrate-callers-then-delete-legacy-apis

Migrates internal API callers and deletes legacy APIs in the same refactor wave.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/jeremybrasher/grokbot-skills --skill principle-migrate-callers-then-delete-legacy-apis-jeremybrasher
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-migrate-callers-then-delete-legacy-apis
Source: https://github.com/jeremybrasher/grokbot-skills/tree/main/collections/pstack/skills/principle-migrate-callers-then-delete-legacy-apis
Command: npx skills add https://github.com/jeremybrasher/grokbot-skills --skill principle-migrate-callers-then-delete-legacy-apis-jeremybrasher

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a new internal API is introduced while old callers still exist, teams often keep compatibility layers alive indefinitely, creating dual-path complexity and an append-only codebase. This Skill enforces a disciplined refactor pattern: migrate all callers and delete the old API in the same wave. ## Core Features & Use Cases - Cut-first refactor rule: Inventory callers, migrate them to the new API, and delete the legacy path immediately instead of preserving adapters. - Intake and HOLD gates: Requires a concrete situation, trigger evidence, and a decision to change before applying the principle; returns a named gap rather than guessing when inputs are missing. - Test guidance: Updates tests to assert the new contract and deletes tests that only protect pre-refactor implementation details. - Use Case: During a service refactor, you introduce a cleaner internal endpoint. Apply this Skill to enumerate every caller, switch them over, remove the old endpoint and its shims, and confirm no external consumers depend on backward compatibility. ## Quick Start Apply the migrate-callers-then-delete-legacy-apis principle to this refactor where I am replacing the old internal API with a new one.

Frequently Asked Questions about principle-migrate-callers-then-delete-legacy-apis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate callers off a legacy internal API?▼

Inventory every caller of the old API, migrate them to the new API, and delete the legacy path in the same refactor wave. Update tests to assert the new contract and remove tests that only protect pre-refactor implementation details.

When should I delete an old API instead of keeping a compatibility layer?▼

Delete it when no external users depend on backward compatibility, the project can absorb coordinated breaking changes, and the new API is part of a simplification effort. Treat temporary adapters as exceptional and time-boxed, not default architecture.

When should I not apply the migrate-then-delete principle?▼

Do not apply it when the trigger is not met, when a narrower operational skill covers the same decision, or when you would only cite the principle without changing a choice. External consumers depending on the old API also block immediate deletion.

What happens if the refactor context is incomplete?▼

The Skill returns a HOLD naming the missing input, such as the situation object or trigger evidence, instead of guessing. A HOLD is a return value, not a delay before proceeding with an unverified plan.

Why does keeping both old and new APIs cause problems?▼

Keeping both creates dual-path complexity, slows cleanup, and makes the codebase feel append-only. Migrating callers and deleting the old API in one wave avoids permanent compatibility scaffolding.