Refactor Clean — Code Quality skill for Claude Code
Remove dead code and clean up after implementation.
How to install Refactor Clean
Installs to ~/.claude/skills/rohirik-claude-code-config-refactor-clean/SKILL.md
mkdir -p ~/.claude/skills/rohirik-claude-code-config-refactor-clean && curl -fsSL https://raw.githubusercontent.com/RohiRIK/claude-code-config/HEAD/commands/refactor-clean.md -o ~/.claude/skills/rohirik-claude-code-config-refactor-clean/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Clean does
description: "Remove dead code and clean up after implementation." disable-model-invocation: true
Refactor Clean
Safely identify and remove dead code with test verification:
Run dead code analysis tools:
- knip: Find unused exports and files
- depcheck: Find unused dependencies
- ts-prune: Find unused TypeScript exports
Generate comprehensive report in .reports/dead-code-analysis.md
Categorize findings by severity:
- SAFE: Test files, unused utilities
- CAU
Alternatives in Code Quality
- Refactor — We are about to refactor code 1.6k ★
- Refactor Claude Md — Refactor CLAUDE.md by extracting sections to dedicated docs with path-scoped rules 1.6k ★
- Claude Command Suite — Professional slash commands for Claude Code that provide structured workflows for software development tasks 1.1k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Fec Refactor Clean
Identify and clean up front-end dead code, unused exports, outdated components, styles and dependencies under
Cleanup Code
Remove dead code, unused imports, optimize structure, and improve code quality.
Resolve
Remove all @feedback and @agent-response annotation comments, leaving clean code
Logic Diff
Check two code versions for semantic equivalence — use after a refactor or rewrite
Cmd Refactor
Refactor phase (ACT loop): analyze, plan, baseline, execute, verify, and sync a behavior-preserving restructur
Refactor TDD
REFACTOR phase - Improve code quality while keeping tests green with automatic metrics tracking in sprintdag d
Related Agents
Tp Dead Code Finder
Use this when the user asks to find or remove dead / unused code ("clean up this file", "find unused exports",
TDD Refactoring Agent
Improves code structure while keeping all tests green during the TDD REFACTOR phase using proven refactoring p
Code Cleanup Optimizer
Remove technical debt, improve quality, eliminate redundancy after implementation is verified. Never use befor