refactor-code
Improve code structure and readability
Works with
Agent Skills format with YAML frontmatter. Claude Code reads it as-is.
--- name: "refactor-code" description: "Improve code structure and readability" license: "MIT" --- # Refactor Code ## Purpose Improve code structure and readability ## Routing - Use when: Use when user asks to improve maintainability, readability, modularity, or error handling in code. - Do not use when: Don't use for behavior-only fixes where refactor risk is unnecessary. - Outputs: Refactor changes, rationale, and minimal review checklist for behavior-sensitive sections. - Success criteria: Preserves behavior while improving structure and readability. ## Trigger Examples ### Positive - Use the refactor-code skill for this request. - Help me with refactor code. - Use when user asks to improve maintainability, readability, modularity, or error handling in code. - Refactor Code: provide an actionable result. ### Negative - Don't use for behavior-only fixes where refactor risk is unnecessary. - Do not use refactor-code for unrelated requests. - This request is outside refactor code scope. - This is conceptual discussion only; no tool workflow is needed. ## Parameters | Name | Type | Required | Description | |---|---|---|---| | path | string | Yes | Path to the file to refactor | | focus | select | Yes | What to focus on | ## Runtime Prompt - Current runtime prompt length: 235 characters. - Runtime prompt is defined directly in `../refactor-code.json`.
More Refactoring skills
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
analyze-project
lllllllama/rigorpilot-skills
Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, speculative code adaptation, or automatic bug fixing.
request-refactor-plan
mattpocock/skills
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

