Remove a feature, delete dead code, drop a dependency, or simplify an abstraction. Use when the user wants to delete or clean up code.
Instalação
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Remove a feature, delete dead code, drop a dependency, or simplify an abstraction. Use when the user wants to delete or clean up code.
Remove Code
Process
Understand the capability to remove (not just files): What user-facing or internal capability is being removed?
Trace dependencies before deleting anything:
All references to the functionality across the codebase
Code that ONLY exists to support this feature (can be fully deleted)
Code that is SHARED with other features (must be preserved)
Database migrations, config entries, env vars, feature flags, documentation that reference it
Present the trace: List everything to delete and everything to modify, grouped by file. Wait for user review.
Execute deletion:
Fully dead files: delete
Partially dead files: remove only dead parts
Update imports, exports, index files
Remove or update related tests
Verify:
Run the project's check command
Grep for remaining references to removed code (function names, class names, route paths, config keys) — there are always stragglers
Rules
Describe the CAPABILITY being removed, not files — this finds things you forgot about
Always verify with a full check run after deletion
Do deletion in its own PR, separate from any new feature work
Check .agents/common-mistakes/ for any removal-specific patterns before executing
Big-output discipline. Heavy command output (project check, full git diff, repo-wide search, long log, large fetch) goes to /tmp/hawk-remove-code-<step>.log, then rg -n '<pattern>' /tmp/hawk-remove-code-<step>.log | head -50 extracts what you need. Read the file only with offset/limit. See README → Big-output discipline.