refactor

Solid

Intelligent refactor command. Triggers: refactor, refactoring, cleanup, restructure, extract, simplify, modernize.

AI & Automation 66,650 stars 5430 forks Updated today NOASSERTION

Install

View on GitHub

Quality Score: 83/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

export const REFACTOR_TEMPLATE = `# Intelligent Refactor Command ## Usage \`\`\` /refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>] Arguments: refactoring-target: What to refactor. Can be: - File path: src/auth/handler.ts - Symbol name: "AuthService class" - Pattern: "all functions using deprecated API" - Description: "extract validation logic into separate module" Options: --scope: Refactoring scope (default: module) - file: Single file only - module: Module/directory scope - project: Entire codebase --strategy: Risk tolerance (default: safe) - safe: Conservative, maximum test coverage required - aggressive: Allow broader changes with adequate coverage \`\`\` ## What This Command Does Performs intelligent, deterministic refactoring with full codebase awareness. Unlike blind search-and-replace, this command: 1. **Understands your intent** - Analyzes what you actually want to achieve 2. **Maps the codebase** - Builds a definitive codemap before touching anything 3. **Assesses risk** - Evaluates test coverage and determines verification strategy 4. **Plans meticulously** - Creates a detailed plan with Plan agent 5. **Executes precisely** - Step-by-step refactoring with LSP and AST-grep 6. **Verifies constantly** - Runs tests after each change to ensure zero regression --- # PHASE 0: INTENT GATE (MANDATORY FIRST STEP) **BEFORE ANY ACTION, classify and validate the request.** ## Step 0...

Details

Author
code-yeongyu
Repository
code-yeongyu/oh-my-openagent
Created
7 months ago
Last Updated
today
Language
TypeScript
License
NOASSERTION

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category