Skip to content
Development
Command

/remove-dead-code

Safely remove identified dead code from the codebase.

From plugin
rohitg00-claude-code-toolkit
2.8k199 skills138 agents199 commands
$ npx -y skills add rohitg00/awesome-claude-code-toolkit --agent claude-code

Command definition

remove-dead-code.md

/remove-dead-code - Remove Dead Code

Safely remove identified dead code from the codebase.

Steps

1. Load the dead code report from the most recent analysis 2. Filter to high-confidence items only (unless user requests medium/low) 3. Group removals by file to minimize file operations 4. For each file, identify the dead code segments to remove 5. Check for side effects: does the dead code initialize anything or register handlers 6. Remove unused imports that result from removing dead code 7. Remove empty files if all exports are unused 8. Clean up empty directories if all files are removed 9. Run the project's linter to verify no new errors are introduced 10. Run the test suite to confirm nothing breaks 11. Generate a summary: files modified, lines removed, items removed 12. Create a git-friendly diff for review before committing

Rules

  • Only remove items flagged as high-confidence unless explicitly told otherwise
  • Verify each removal does not break the build before proceeding to the next
  • Keep a backup list of all removed items for potential restoration
  • Do not remove code that has TODO or FIXME comments attached
  • Remove associated tests only if the user explicitly requests it
  • Process removals incrementally: one file at a time with validation
  • Stop immediately if any test fails and report the causing removal
@rohitg00
Ships withrohitg00-claude-code-toolkit

The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills (+400,000 via SkillKit), 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 15 MCP configs, 26 companion apps, 53 ecosystem entries, and more.

2.8k40 skills138 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
2.8k
Star history of rohitg00/awesome-claude-code-toolkit on GitHub, a chart by star-history.com

Other commands on rohitg00-claude-code-toolkit.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command