martin-clean-code
Skill6 starsChanged 4 months agoMITView on GitHub
Reference and application guide to Robert C. Martin's Clean Code.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nghorbani/clean-code-skilltheir own version, first seen Jun 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nghorbani/clean-code-skill★ 2same 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 repository14 other files it gives its agents.
- strict-code-reviewSkill
- fabro-workflowSkill
- fastapi-proSkill
- industry-standardizeSkill
- issue-decomposerSkill
- issue-triage-loopSkill
- pr-code-reviewSkill
- prd-reviewSkill
- rebase-on-mainSkill
- request-to-prdSkill
- startup-analystSkill
- two-axis-reviewSkill
- un-rgeSkill
- unslopSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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 25
Use size and count as design signals.
- Distinctive: line 29
Follow this loop for implementation, refactoring, and review work.
- Distinctive: line 46
Read every file whose branch matches observed evidence, then stop.
- Distinctive: line 68
Read the topic index when one concern spans several chapters.
- Distinctive: line 69
Read the cheatsheet first when the task is a broad review rather than one diagnosed smell.
- Distinctive: line 70
Read the patterns catalog when selecting a concrete transformation after diagnosing a smell.
- Distinctive: line 71
Read the glossary when an unfamiliar book term affects the decision.
≈ “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
Martin clean code
Apply the book's guidance within current project constraints. When rules conflict, rank them:
- Correctness and explicit requirements.
- Security and data integrity.
- Repository and language standards.
- Tests and measured evidence.
- Clarity for the next reader.
- Book heuristics.
Use size and count as design signals. Base decisions on responsibility and change pressure.
Operating loop
Follow this loop for implementation, refactoring, and review work.
- Establish the baseline. Name the required behavior and its protecting test or validation. Record the current result.
- Diagnose one concrete smell. Cite the code evidence and name the responsibility or concept involved.
- Route the smell. Read each matching chapter or pattern before selecting a change.
- Act within authority, on one path only:
- Change task: make one scoped improvement. Preserve behavior outside the requested change.
- Review task: record the finding as file and line, the evidence quoted from the code, the rule it breaks, and the recommended move. Account for every in-scope instance of the selected rule. Leave the code as you found it.
- Validate the result. Run the complete relevant tests or validation commands. Record each pass, failure, or unavailable validation.
- Compare before and after. State how the result changes readability, coupling, duplication, or change cost.
Repeat steps 2 through 6 while in-scope smells remain.
Complete the task after you cover every requested change or finding. Required validations must pass, or each remaining failure needs an explanation.
Route by evidence
Read every file whose branch matches observed evidence, then stop.
| Evidence | Read |
| The task needs the book's quality or economic frame | Clean code |
| Names hide intent, domain meaning, or side effects | Meaningful names |
| Functions mix behaviors, arguments, or abstraction levels | Functions |
| Comments compensate for unclear code | Comments |
| File layout hides relationships or reading order | Formatting |
| Object navigation, data exposure, or class cohesion obstructs a change | Objects and data structures and Classes |
| Error paths, exception context, or null handling obscures behavior | Error handling |
| A third-party interface leaks into application code | Boundaries |
| Tests or test-driven development constrain safe change | Unit tests |
| Construction or framework details dominate policy | Systems |
| Passing code still contains duplication or unclear intent | Emergence |
| Shared state, scheduling, deadlock, or shutdown creates risk | Concurrency |
| Each new feature makes the structure worse | Successive refinement |
| Untested or unowned legacy code must change safely | JUnit internals and Refactoring SerialDate |
| A review needs a broad diagnostic catalog | Smells and heuristics |
Conditional references
- Read the topic index when one concern spans several chapters.
- Read the cheatsheet first when the task is a broad review rather than one diagnosed smell.
- Read the patterns catalog when selecting a concrete transformation after diagnosing a smell.
- Read the glossary when an unfamiliar book term affects the decision.
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.

