paulkinlan/docker-agent-test/code-refactor
Claude Code and agent skill by paulkinlan/docker-agent-test
- community
Checking that the SKILL.md file is still in the repository.
Refactor code for improved quality without changing behavior
Install
npx vskill@latest install paulkinlan/docker-agent-test/code-refactorSKILL.md
Code Refactor
When to Use
Use this skill when the task calls for improving code quality, readability, or maintainability without changing external behavior.
Procedure
1. Read and Understand Existing Code
Before changing anything, understand what the code does:
2. Run Existing Tests for a Baseline
If there are no tests, note this and be extra careful -- consider writing tests first.
3. Identify Refactoring Targets
Look for these specific code smells:
4. Refactor One Thing at a Time
Work in small increments. After each change, re-run tests:
Step A — Extract function:
Step B — Rename for clarity:
Step C — Reduce nesting:
Step D — Remove duplication:
5. Do NOT Change Behavior
Refactoring rules:
- Inputs and outputs must remain identical
- Error messages and exit codes must remain identical
- Side effects (file writes, network calls) must remain identical
- If you find a bug, document it separately -- do NOT fix it in the refactor
6. Final Validation
7. Commit with Refactor-Specific Message
Refactoring Targets Checklist
- [ ] Duplication: extracted into shared functions
- [ ] Long functions: broken into focused helpers (each <30 lines)
- [ ] Deep nesting: replaced with early returns / guard clauses
- [ ] Unclear names: renamed to describe purpose
- [ ] Missing error handling: added proper try/catch with meaningful messages
- [ ] Dead code: removed (not commented out)
- [ ] All tests pass with identical results to baseline
- [ ] Bugs found are documented separately, not fixed in this changeset
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingconfig/skills/coder/code-refactor/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/paulkinlan/docker-agent-test/code-refactor)