refactor-code
Skill9 starsChanged 3 months agoMITView on GitHub
Refactor for clarity without behavior change
16 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- neko3cs/skillstheir own version, first seen Nov 1, 2026
- Ionate-Technologies/indium-agentkittheir own version, first seen Oct 20, 2026
- Indium-AI-Labs/indium-agentkittheir own version, first seen Oct 11, 2026
- BrOrlandi/my-claude-skillstheir own version, first seen Sep 22, 2026
- genfeedai/genfeed.aitheir own version, first seen Sep 12, 2026
- hidekitux/skillstheir own version, first seen Sep 8, 2026
Used with
Projects with it also use write-tests, create-pr and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
SentrySkillcreate-pr
Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.
Also in 3 projects that use this
- +1 more from getsentry
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- gologo13/agent-skills★ 085% same
Wrote their own version · 15
- igmarin/rails-agent-skills★ 26same name
- BrOrlandi/my-claude-skills★ 22same name
- Indium-AI-Labs/indium-agentkit★ 18same name
- Ionate-Technologies/indium-agentkit★ 17same name
- zbruhnke/claude-code-starter★ 16same name
- chrisetheridge/skills★ 4same name
- genfeedai/genfeed.ai★ 4same name
- igmarin/elixir-phoenix-skills★ 4same name
- adolfoaranaes12/BMAD-ENHANCED★ 2same name
- r2rka1/skills★ 2same name
5 more not listed
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 15 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 15 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.

