Agent skill
refactor-project
Run project-wide refactoring with code-simplifier
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/refactor-project
SKILL.md
Refactor Project Command
Execute automated project-wide refactoring using refactor:code-simplifier agent with cross-file optimization focus.
Phase 1: Analyze Project Scope
Goal: Discover all code files and display scope summary.
Actions:
- Find all code files using Glob patterns for common extensions
- Filter out
node_modules/,.git/,dist/,build/,vendor/,.venv/ - Group files by language/extension and identify primary source directories
- Display scope summary (file count, languages, directories) then proceed automatically
See references/scope-analysis.md for exclusion patterns and edge cases.
Phase 2: Launch Refactoring Agent
Goal: Execute refactor:code-simplifier agent with project-wide scope and cross-file focus.
Actions:
- Launch
refactor:code-simplifieragent with all discovered code files - Pass cross-file optimization emphasis: duplication reduction, consistent patterns
- Pass aggressive mode flag for legacy code removal
- Agent auto-loads
refactor:best-practicesskill and applies language-specific patterns
See references/agent-configuration.md for detailed Task parameters.
Phase 3: Summary
Goal: Report comprehensive summary of project-wide changes.
Actions:
- Report total files refactored (count and percentage of project)
- List changes categorized by improvement type and cross-file improvements made
- List best practices applied and legacy code removed
- Suggest test suite to run and recommend reviewing changes in logical groups
- Provide rollback command:
git reset --hard HEAD
See references/output-requirements.md for detailed summary format.
Requirements
- Execute immediately after displaying scope (no confirmation needed)
- Refactor entire project across all discovered code files
- Prioritize cross-file duplication reduction and consistent patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?