← ClaudeAtlas

deprecate-and-removelisted

Use when a ticket retires something — a feature flag, an endpoint, a config option, a module, a column, a CLI command — and the removal must not break callers, data, or operators who still depend on it. Invoke for "remove the legacy X", "delete dead code", "drop the old API", or "clean up after the migration".
tmj-90/gaffer · ★ 1 · AI & Automation · score 70
Install: claude install-skill tmj-90/gaffer
# Deprecate, then remove Removing code changes a contract somebody may still hold. Find every dependent, warn before you cut, remove in the right order, and prove nothing still points at the thing you deleted. Dead code that is really dead is the best diff there is; dead code that is secretly load-bearing is an incident. ## Steps 1. **Prove it is dead — and write the proof down.** Search for every reference, including the non-obvious ones: - the symbol and its string form (`grep -rn`): reflection, dynamic imports, DI registration, templates, routes tables, serialised names, cron/job registries; - tests, fixtures, docs, scripts, CI workflows, dashboards and infra config; - for a flag or option: every read, and every place that sets it; - for a column or table: every query, ORM model, migration and report; - other repos: `find_dependents` and `search_lore` for declared consumers, and grep any read-only context repos listed in your prompt. "No callers" is a claim; the commands you ran and their empty output are the evidence. 2. **Decide: deprecate first, or remove now.** Anything with consumers you cannot see — another repo, a public or partner API, an operator-set option, a persisted format — gets a deprecation period. Purely internal code with an empty step-1 search is removed now. Semantic versioning puts a deprecation in a minor release and the removal in the next major. If you cannot tell which case applies, `request_decision`.