refactor-code
Skill0 starsChanged 9 months agoMITView on GitHub
Refactor the selected code to improve its quality while maintaining the same functionality, ...; keywords: performance, refactor, coverage, error. Use only on explicit request; skip in routine implementation discussions.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
2
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
- Distinctive: line 26
Add appropriate comments where needed
- Distinctive: line 27
Follow SOLID principles and design patterns
“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
Refactor Code
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
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- emaraschio/cursor-commands★ 966% same
Wrote their own version · 14
- igmarin/rails-agent-skills★ 26same name
- BrOrlandi/my-claude-skills★ 21same 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
4 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.
Used alongsideProjects with it also use write-tests.
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
In this repository31 other files it gives its agents.
- accessibility-auditSkill
- add-documentationSkill
- add-error-handlingSkill
- address-github-pr-commentsSkill
- clarify-taskSkill
- code-reviewSkill
- create-prSkill
- database-migrationSkill
- debug-issueSkill
- deslopSkill
- diagramsSkill
- docker-logsSkill
- fix-compile-errorsSkill
- fix-git-issuesSkill
- generate-api-docsSkill
- generate-pr-descriptionSkill
- git-commitSkill
- git-pushSkill
- light-review-existing-diffsSkill
- lint-fixSkill
- lint-suiteSkill
- onboard-new-developerSkill
- optimize-performanceSkill
- overviewSkill
- roadmapSkill
- run-all-tests-and-fixSkill
- security-auditSkill
- security-reviewSkill
- setup-new-featureSkill
- visualizeSkill
- write-unit-testsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

