CLSkills
Back to Agents

Refactoring Agent

Available

Tech debt janitor on autopilot

Code Quality7 skills

What It Does

Identifies code smells, duplication, overly complex functions, and dead code across your entire codebase. Proposes clean, safe refactors that improve maintainability without changing behavior. Never breaks existing tests.

Features

  • Finds and removes dead/unused code
  • Identifies code duplication across files
  • Simplifies complex conditional chains
  • Extracts long functions into focused units
  • Measures cyclomatic complexity
  • Ensures all refactors pass existing tests
  • Creates atomic commits for each refactor

Triggers

Weekly scheduled run Manual request On file exceeding complexity threshold

Trust Levels

Ask First
Agent suggests, you approve
Report Only
Agent reports findings

Use Cases

  • Paying down tech debt incrementally
  • Preparing codebase for new team members
  • Pre-refactor before major feature work

Example Prompts

Find dead code in the project
Refactor the utils directory
Simplify complex functions

Quick Info

CategoryCode Quality
Skills Used7
Trust Levels2
StatusAvailable

Install This Agent

Install command:

curl -o ~/.claude/skills/refactoring-agent.md https://clskills.in/agents/refactoring-agent.md

Drop into ~/.claude/skills/ and invoke with /refactoring-agent

Want this customized for YOUR stack?

AI generates a personalized version of this agent tailored to your framework, conventions, and workflow.