speckit-refactor
Automates the generation of refactoring specs, tracks metrics, and ensures behavioral preservation.
Install
mkdir -p .claude/skills/speckit-refactor && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10773" && unzip -o skill.zip -d .claude/skills/speckit-refactor && rm skill.zipInstalls to .claude/skills/speckit-refactor
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Create a refactoring workflow with metrics tracking and behavior preservationKey capabilities
- →Generate unique refactor IDs and branch names
- →Identify testing gaps in code to be modified
- →Document behavioral snapshots for preservation
- →Initialize refactoring spec files from templates
- →Capture baseline metrics for refactoring
How it works
The skill executes a bash script to generate refactoring metadata and then populates a standardized markdown template. It enforces a test-first approach by requiring a gap assessment before baseline metrics are trusted.
Inputs & outputs
When to use speckit-refactor
- →Create refactoring workflow
- →Track metrics for refactoring
- →Document code improvements
About speckit-refactor
Generates refactor IDs, identifies testing gaps, and uses standardized templates to document the motivation and approach for code refactoring.
Create a refactoring workflow with metrics tracking and behavior preservation
When not to use it
- →When existing tests do not pass
- →When the refactoring description is empty
Prerequisites
Limitations
- →Script must only be run once per refactor
- →Baseline metrics are only trusted after testing gaps are addressed
How it compares
It automates the documentation and metric tracking process rather than relying on manual notes and ad-hoc planning.
Compared to similar skills
speckit-refactor side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| speckit-refactor (this skill) | 0 | 4mo | No flags | Advanced |
| qlty-check | 5 | 7mo | Review | Beginner |
| solid | 5 | 6mo | No flags | Advanced |
| code-refactor | 3 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by pradeepmouli
View all by pradeepmouli →You might also like
qlty-check
parcadei
Code quality checks, formatting, and metrics via qlty CLI
solid
ramziddin
Use this skill when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging. This skill transforms junior-level code into senior-engineer quality software through SOLID principles, TDD, clean code practices, and professional software design.
code-refactor
luongnv89
Systematic code refactoring based on Martin Fowler's methodology. Use when users ask to refactor code, improve code structure, reduce technical debt, clean up legacy code, eliminate code smells, or improve code maintainability. This skill guides through a phased approach with research, planning, and safe incremental implementation.
improvement
tddworks
Guide for making improvements to existing ClaudeBar functionality using TDD. Use this skill when: (1) Enhancing existing features (not adding new ones) (2) Improving UX, performance, or code quality (3) User asks "improve X", "make Y better", or "enhance Z" (4) Small enhancements that don't require full architecture design For NEW features, use implement-feature skill instead.
tdd-workflows-tdd-refactor
sickn33
Use when working with tdd workflows tdd refactor
moai-workflow-ddd
modu-ai
Domain-Driven Development workflow specialist using ANALYZE-PRESERVE-IMPROVE cycle for behavior-preserving code transformation