simple-refactor
Skill1 starsChanged 43 days agoMITView on GitHub
Refactor code with minimal changes to remove redundancy (DRY) and improve readability, without changing behavior. Use after finishing a series of modules or a phase, or when the user asks to refactor, clean up, or reduce duplication.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- proflead/codex-skills-librarytheir own version, first seen Jun 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- proflead/codex-skills-library★ 153same 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 repository15 other files it gives its agents.
- simple-cantoneseSkill
- simple-checkSkill
- simple-chineseSkill
- simple-cloudflareSkill
- simple-code-reviewSkill
- simple-commitSkill
- simple-debugSkill
- simple-full-refactorSkill
- simple-launchSkill
- simple-orchestratorSkill
- simple-readmeSkill
- simple-releaseSkill
- simple-restructureSkill
- simple-supabaseSkill
- simple-text-cleanupSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
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 27
Read nearby usage and existing tests to confirm current behavior.
- Distinctive: line 31
Update call sites. Add or adjust tests only when needed to guard against regressions.
- Distinctive: line 32
Run the checks. If you cannot, say what should be run.
- Distinctive: line 36
Keep behavior and public APIs unchanged unless the user asks otherwise.
- Distinctive: line 37
Prefer small edits over sweeping changes.
- Distinctive: line 39
Do not add layers that bring indirection without clear benefit.
- Distinctive: line 40
Keep comments and move them with the code they describe.
- Distinctive: line 41
Follow the repo's existing naming, style, and file layout.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Simple Refactor
Clean up code without breaking it. Make it easier to read and maintain, so other collaborators can follow it. The golden rule is to change only what is necessary. If the code is good enough, leave it.
Scope
Refactor what the user points at. If nothing is specified, use the files changed in the current work. Do not roam the whole codebase.
Workflow
- Find in scope:
- Repeated logic, data, or patterns
- Dead code, unused imports, and unreachable branches
- Long functions or files doing more than one job
- Deep nesting that early returns would flatten
- Magic numbers and strings that need a named constant
- Unclear names
- Read nearby usage and existing tests to confirm current behavior.
- Pick the safest fix:
- Same file: extract a helper or constant.
- Across files: extract to the most natural shared location, reusing an existing helper if one fits.
- Update call sites. Add or adjust tests only when needed to guard against regressions.
- Run the checks. If you cannot, say what should be run.
Rules
- Keep behavior and public APIs unchanged unless the user asks otherwise.
- Prefer small edits over sweeping changes.
- Extract only when the duplication is meaningful. Two similar lines are not a reason to add an abstraction.
- Do not add layers that bring indirection without clear benefit.
- Keep comments and move them with the code they describe.
- Follow the repo's existing naming, style, and file layout.
Output
A short summary of what changed, plus any risks or areas that need testing.
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.

