Back to Skills

refactor-project

verified

Run project-wide refactoring with code-simplifier

View on GitHub

Marketplace

frad-dotclaude

FradSer/dotclaude

Plugin

refactor

development

Repository

FradSer/dotclaude
203stars

refactor/skills/refactor-project/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/FradSer/dotclaude/blob/main/refactor/skills/refactor-project/SKILL.md -a claude-code --skill refactor-project

Installation paths:

Claude
.claude/skills/refactor-project/
Powered by add-skill CLI

Instructions

# Refactor Project Command

## Core Principles

- **Fully automated**: Execute project-wide refactoring immediately without confirmation
- **Aggressive refactoring**: Apply thorough improvements across entire codebase
- **Self-discovery**: Agent discovers best practices from skills automatically
- **Cross-file focus**: Emphasize duplication reduction and consistent patterns
- **Git safety net**: Trust git to revert if needed, no preview confirmations

## Context

- This command is for project-wide refactoring across the entire codebase.
- This command executes immediately without preview or confirmation.
- Use git to revert if any issues arise.

## Step 1: Analyze Project Scope

Perform a quick analysis to determine the refactoring scope:

1. **Count code files**:
   - Use Glob to find all code files in the project
   - Filter to focus on source code (exclude node_modules, build outputs, etc.)
   - Group by file type/language

2. **Identify main directories**:
   - List primary source code directories
   - Show project structure overview

3. **Display scope summary** (informational only, no confirmation needed):
   - Total number of files to be refactored
   - Languages/file types detected
   - Main directories involved
   - Note: "Proceeding with project-wide refactoring automatically"

## Step 2: Launch Refactoring Agent

Immediately launch the refactoring agent:

1. Use Task tool with subagent_type="refactor:code-simplifier"
2. Pass:
   - "project-wide scope" indication
   - Emphasis on cross-file duplication reduction and consistent patterns
   - **Aggressive mode flag**: Apply thorough refactoring, remove legacy code
3. The agent will automatically:
   - Load the refactor:best-practices skill
   - Analyze the entire codebase
   - Detect frameworks, libraries, and languages
   - Discover and apply relevant best practices from skill references
   - Emphasize cross-file duplication and consistent patterns
   - **Aggressively refactor**: Remove backwards-compatibil

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3306 chars