refactor-code
Skill9 starsChanged 4 months agoMITView on GitHub
Refactor for clarity without behavior change
9 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- BrOrlandi/my-claude-skillstheir own version, first seen Sep 22, 2026
- bsafronov/prosto-skillstheir own version, first seen Aug 31, 2026
- r2rka1/skillstheir own version, first seen Aug 18, 2026
- igmarin/rails-agent-skillstheir own version, first seen Jul 30, 2026
- chrisetheridge/skillstheir own version, first seen May 11, 2026
- drafael/coding-harnesstheir own version, first seen Apr 28, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- gologo13/agent-skills★ 085% same
Wrote their own version · 8
- igmarin/rails-agent-skills★ 27same name
- BrOrlandi/my-claude-skills★ 21same name
- zbruhnke/claude-code-starter★ 17same name
- chrisetheridge/skills★ 4same name
- adolfoaranaes12/BMAD-ENHANCED★ 2same name
- r2rka1/skills★ 2same name
- drafael/coding-harness★ 1same name
- bsafronov/prosto-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- accessibility-auditSkill
- add-documentationSkill
- add-error-handlingSkill
- address-github-pr-commentsSkill
- agent-risk-reviewSkill
- agent-work-receiptSkill
- automation-roi-auditSkill
- blind-spot-passSkill
- code-reviewSkill
- commit-changes-mainSkill
- commit-same-branchSkill
- commitSkill
- create-pr-mainSkill
- debug-issueSkill
- decision-auditSkill
- define-agent-goalSkill
- design-agent-loopSkill
- fix-compile-errorsSkill
- fix-git-issuesSkill
- gauntlet-loopSkill
- generate-api-docsSkill
- generate-pr-descriptionSkill
- git-sync-workspaceSkill
- instruction-ablationSkill
- light-review-existing-diffsSkill
- lint-fixSkill
- lint-suiteSkill
- merge-open-prsSkill
- optimize-performanceSkill
- pathfinderSkill
- prompt-eval-debugSkill
- requirement-to-implementationSkill
- run-all-tests-and-fixSkill
- scoped-auditSkill
- security-auditSkill
- seo-auditSkill
- setup-new-featureSkill
- structure-promptSkill
- tddSkill
- thermo-nuclear-code-quality-reviewSkill
- update-memory-bankSkill
- update-readmeSkill
- write-unit-testsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 24
Add appropriate comments where needed
- Distinctive: line 25
Follow SOLID principles and design patterns
- Distinctive: line 43
Keep changes within the refactor target.
- Distinctive: line 44
Do not commit, push, merge, or run production scripts without consent.
- Distinctive: line 45
Do not print, log, or commit secrets or credentials encountered while refactoring.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Refactor the selected code to improve its quality while maintaining the same functionality, providing the refactored code with explanations of the improvements made.
Steps
- Code Quality Improvements
- Extract reusable functions or components
- Eliminate code duplication
- Improve variable and function naming
- Simplify complex logic and reduce nesting
- Performance Optimizations
- Identify and fix performance bottlenecks
- Optimize algorithms and data structures
- Reduce unnecessary computations
- Improve memory usage
- Maintainability
- Make the code more readable and self-documenting
- Add appropriate comments where needed
- Follow SOLID principles and design patterns
- Improve error handling and edge case coverage
Refactor Code Checklist
- Extracted reusable functions or components
- Eliminated code duplication
- Improved variable and function naming
- Simplified complex logic and reduced nesting
- Identified and fixed performance bottlenecks
- Optimized algorithms and data structures
- Made code more readable and self-documenting
- Followed SOLID principles and design patterns
- Improved error handling and edge case coverage
Guardrails
- Preserve existing behavior; a refactor must not change observable output.
- Keep changes within the refactor target; do not touch unrelated code.
- Do not commit, push, merge, or run production scripts without consent; wait for an explicit request before any destructive git action.
- Do not print, log, or commit secrets or credentials encountered while refactoring; flag any exposed secret instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

