code-refactoring — Claude Code skill: what it does, how to install
This skill turns a refactoring request into a behavior-aware plan with clear guardrails, reviewable slices, and a defined next step.
npx skills add akillness/jeo-skills --skill code-refactoring -a claude-codeWhat code-refactoring does
code-refactoring helps turn a cleanup request into a focused refactoring brief. It covers a narrow local change, a fragile legacy area, a repeated migration or codemod, and a risky diff that needs to be reshaped before review.
The skill asks the agent to choose one mode, state the behavior that must remain intact, and select a verification path. That path can use tests, type checks, linting, snapshots, captured examples, or a manual smoke check. Work is then split into small slices such as renames, extraction, duplicate removal, mechanical migration, and follow-up verification. Its available tools are Read, Grep, Glob, Bash, and Write.
A symbol inventory belongs with codebase-search; this skill routes that request away instead of forcing a refactoring plan.
What it helps with
- untangle a crowded function, component, service, or module
- capture legacy behavior before changing its structure
- plan a repeated API or naming migration
- reshape a mixed cleanup and semantic-change diff
- define checks for a behavior-preserving refactor
Example prompts for the agent
- Create a refactoring brief for this tangled function and state which behavior must stay unchanged.
- Plan a freeze-first cleanup for this legacy module, including a guardrail and small reviewable slices.
- Design a migration brief for this repeated API change with source and target patterns, exceptions, and rollback.
How to install code-refactoring
1Skills CLI (Vercel)
npx skills add akillness/jeo-skills --skill code-refactoring -a claude-code2Manually: put the files in place
~/.claude/skills/code-refactoring/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-refactoring/
1Skills CLI (Vercel)
npx skills add akillness/jeo-skills --skill code-refactoring -a codex2Manually: put the files in place
.agents/skills/code-refactoring/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add akillness/jeo-skills --skill code-refactoring -a cursor2Manually: put the files in place
.cursor/skills/code-refactoring/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install akillness/jeo-skills code-refactoring2Manually: put the files in place
.github/skills/code-refactoring/SKILL.md1Skills CLI (Vercel)
npx skills add akillness/jeo-skills --skill code-refactoring -a gemini-cli2Platform CLI
gemini skills install https://github.com/akillness/jeo-skills --path .agent-skills/code-refactoringManually: put the files in place
.devin/skills/code-refactoring/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add akillness/jeo-skills --skill code-refactoring -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-refactoring
How do I install code-refactoring in Claude Code?
Run npx skills add akillness/jeo-skills --skill code-refactoring -a claude-code. The skill file will be at ~/.claude/skills/code-refactoring/SKILL.md.
What does code-refactoring do?
It selects a refactoring mode, defines how current behavior will be checked, and organizes the work into small slices. The resulting brief also records open risks and the next handoff.
When should I use another skill instead?
Use debugging for failure diagnosis, code-review for judging a concrete diff, testing-strategies for an organization-wide validation plan, and codebase-search for symbol or call-site inventory.