ワンクリックで
refactor-break-compat
Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Demolish bloated code and re-derive it clean, cutting every surface the rebuilt contract does not name. Use for a repo-wide bloat sweep, when patching a subsystem has stopped paying, or when the user says "this whole module is bloated", "rewrite this properly", or "break it and rebuild".
Use when the user says "deslop", "remove debug code", "find placeholders or stub code", or "remove dead code".
Dispatch compress operations. Use when the user says "tidy" or names a file, diff, memory, workspace, git stack, or doc to tidy.
Reduce internal duplication, dead code, and ceremony. Use when you spot dead fields, redundant wrappers, or speculative abstractions in code you are already editing.
Use when the user says "simplify this diff", or asks for a compression pass over a change-set.
Design-by-Contract (DbC). Use when crossing public API boundaries, guarding complex state invariants, or hardening untrusted inputs and integration seams.
| name | refactor-break-compat |
| description | Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. |
Backward compatibility is the tax the present pays to the past. This skill stops paying. Every compat shim, every legacy adapter, every "v1 still supported" branch is debt that compounds against the reader. Tear it all out. Break everything. Rebuild the system as if the old shape never existed.
There is no migration plan. There is no deprecation window. There is the old shape, and there is the right shape, and the only acceptable end state is the right shape with zero residue of the old.
if legacy. Collapse to the winning branch and erase the fork entirely. Version control is the only museum.Hunt these down with ast-grep / rg and rip out every hit:
@deprecated, #[deprecated], warnings.warn): kill the marker and the thing it marks.if version >= X, conditional compilation such as #[cfg(feature = "legacy")], capability checks): collapse to the new branch.oneof fallbacks, XML schema version namespaces): keep one format, drop the reader/writer for the rest.ast-grep / rg. This is the demolition manifest, not a veto list.mypy, pyright, tsc --checkJs, Sorbet), then hand-check what no static pass can see — reflective, dynamically dispatched, string-constructed, and generated references, plus anything excluded from the build.| Gate | Condition |
|---|---|
| Blast radius mapped | Every caller of the old shape enumerated as a demolition manifest |
| Old path deleted | Compat layers, adapters, flags, and legacy branches removed, not disabled |
| All callers migrated | Every reference targets the new contract. Run the strongest static enumerator the project has — compiler or typechecker, including opt-in (mypy, pyright, tsc --checkJs, Sorbet); not optional when available. Never sufficient alone, in any language: no static pass sees reflective, dynamically dispatched, string-constructed, or generated references, nor code excluded from the build. Enumerate those by hand and name them in the report |
| Tests on new contract | Legacy-behavior tests rewritten or deleted; new behavior covered |
| Zero residue | ast-grep / rg for old API names, flags, formats, and import paths returns zero hits |
| No dead weight | No unused imports, packages, types, or files left by the old path |
| Code | Meaning |
|---|---|
| 0 | Clean demolition: old shape erased, every caller on the new contract, tests green on new behavior, zero residue |
| 1 | Residue remains: old references survive in code, tests, docs, or config |
| 2 | Build/tests broken: migration incomplete, callers or assertions not yet on the new shape |
| 3 | Migration stalled mid-flight: codebase is half old, half new (the forbidden state); finish or revert, never ship |