backend-refactor
Skill0 starsChanged 7 months agoMITView on GitHub
Refactor backend code by separating domain logic, transport, persistence, and side effects so maintainability improves without accidental behavior drift.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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 8
Use this skill when backend code has become tangled and the goal is to improve structure, testability, and change safety without rewriting …
- Distinctive: line 20
leave clearer seams for testing and future changes
- Distinctive: line 37
Keep API and storage changes out unless explicitly in scope.
- Distinctive: line 38
Add or preserve tests around the risky seams before deeper cleanup.
- Distinctive: line 39
Verify the original flow still works after each slice.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Backend Refactor
Use this skill when backend code has become tangled and the goal is to improve structure, testability, and change safety without rewriting the whole service.
Read First
- the entry handlers, services, models, and side-effect boundaries involved
- current tests and failure-prone flows
docs/overview/roadmap.mdandharness/state.mdif they existharness/history.mdif it exists
Goals
- separate transport, domain, persistence, and integration concerns
- make behavior-preserving refactors explicit
- leave clearer seams for testing and future changes
- reduce hidden coupling without over-abstracting
Steps
- Define the refactor target:
- fat handler
- mixed domain and persistence logic
- repeated integration code
- unclear module ownership
- Identify behavior that must remain stable.
- Extract one stable seam at a time:
- validation
- mapping
- domain rules
- repository access
- side-effect adapters
- Keep API and storage changes out unless explicitly in scope.
- Add or preserve tests around the risky seams before deeper cleanup.
- Verify the original flow still works after each slice.
Output
Report:
- refactor target
- stable behavior constraints
- seams extracted or clarified
- risky areas
- verification evidence
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codex/AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- buildSkill
- discussSkill
- docSkill
- frontend-designSkill
- frontend-refactorSkill
- low-altitude-interviewerSkill
- pdfSkill
- repo-bootstrapSkill
- skill-maintenanceSkill
- tdd-executionSkill
- architecture-guardrailsSkill
- closed-loop-testingSkill
- harness-marathonSkill
- task-harnessSkill
- api-designSkill
- architecture-designSkill
- brainstormSkill
- codex-record-retrospectiveSkill
- database-designSkill
- integration-designSkill
- map-codebaseSkill
- migration-designSkill
- observability-designSkill
- planSkill
- query-optimizationSkill
- scalability-checkSkill
- service-boundary-reviewSkill
- api-change-checkSkill
- browseSkill
- bugfix-verificationSkill
- debugSkill
- incident-debugSkill
- performance-investigationSkill
- qaSkill
- reviewSkill
- security-reviewSkill
- verifySkill
- release-checkSkill
- shipSkill
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.

