subagent · Git & Code Review
Refactor Cleaner
by affaan-m
Dead code cleanup and consolidation specialist. Use PROACTIVELY for removing unused code, duplicates, and refactoring. Runs analysis tools (knip, depcheck, ts-prune) to identify dead code and safely removes it.
- Claude Code
- ★ 306k on GitHub
- Updated 2026-11-17
- MIT
Calyban is a free desktop app. It checks Refactor Cleaner for red flags before installing, lets you choose the agent and folder, and undoes it in one click.
Install Refactor Cleaner manually
Prefer the terminal? This does the same thing as Calyban's install.
Claude Code
mkdir -p ~/.claude/agents
curl -fsSL https://raw.githubusercontent.com/affaan-m/ECC/3f14a103a8694e51c1df9a806217a6d0b5f7a6f7/agents/refactor-cleaner.md -o ~/.claude/agents/refactor-cleaner.mdStart a new Claude Code session afterwards so it picks up the change.
Similar subagents
Commit Revieweraffaan-mReviews a staged diff and drafts a Conventional Commits-compliant message matching the repository's actual history norms. Use before committing, or when asked to write or check a commit message.Comment Analyzeranthropics ✓Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a…Silent Failure Hunteranthropics ✓Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. This agent should be invoked proactively after completing a…Code Refactoring Legacy ModernizerwshobsonRefactor legacy codebases, migrate outdated frameworks, and implement gradual modernization. Handles technical debt, dependency updates, and backward compatibility. Use PROACTIVELY for legacy system updates, framework…Dependency Management Legacy ModernizerwshobsonRefactor legacy codebases, migrate outdated frameworks, and implement gradual modernization. Handles technical debt, dependency updates, and backward compatibility. Use PROACTIVELY for legacy system updates, framework…Framework Migration Legacy ModernizerwshobsonRefactor legacy codebases, migrate outdated frameworks, and implement gradual modernization. Handles technical debt, dependency updates, and backward compatibility. Use PROACTIVELY for legacy system updates, framework…
Guides
Listed in the public Calyban catalog. Refactor Cleaner is made by affaan-m, not Calyban. Inclusion isn't an endorsement and safety checks aren't a guarantee.