RohiRIK

Refactor Clean — Code Quality skill for Claude Code

Code Quality community

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

Terminal
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:

  1. Run dead code analysis tools:

    • knip: Find unused exports and files
    • depcheck: Find unused dependencies
    • ts-prune: Find unused TypeScript exports
  2. Generate comprehensive report in .reports/dead-code-analysis.md

  3. 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 Repository