clean-code-review
Skill1 starsChanged 26 days agoMITView on GitHub
Review a diff or pull request against this project's rules — architecture placement, import direction, types, component design, design-system usage, accessibility, tests and docs — and report findings by severity with concrete fixes. Use when asked to review, audit or critique code, or before opening a PR.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- MammadovEshgin/clean-code-skilltheir own version, first seen Nov 8, 2026
- JeffreyFerreiras/ai-skillstheir own version, first seen Oct 5, 2026
- ravid7000/skillstheir own version, first seen Aug 1, 2026
- flying-dice/pseudoscripttheir own version, first seen May 28, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- flying-dice/pseudoscript★ 2same name
- JeffreyFerreiras/ai-skills★ 1same name
- MammadovEshgin/clean-code-skill★ 1same name
- ravid7000/skills★ 1same 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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/rtv-architecture.mdcCursor rule
- .cursor/rules/rtv-code-style.mdcCursor rule
- .cursor/rules/rtv-design-system.mdcCursor rule
- .cursor/rules/rtv-git-workflow.mdcCursor rule
- .cursor/rules/rtv-testing.mdcCursor rule
- accessibility-auditSkill
- ci-cd-dockerSkill
- dependency-upgradeSkill
- deployment-insightsSkill
- project-architectureSkill
- react-componentSkill
- scaffold-featureSkill
- tailwind-design-systemSkill
- testing-vitestSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 50
No dead code, commented-out code, console.log, TODO without owner.
- Very specific: line 56
No secrets or tokens in code.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Clean code review
Procedure
- Run the gate:
npm run check. Anything it reports is a blocking finding (never suggest disabling a rule). - Read the diff file by file with the checklist below. Open the surrounding code when a change's intent is unclear.
- Report findings ordered by severity, each with
file:line, the rule or principle, why it matters, and the fix. Three sections: Blocking, Should fix, Nits. Finish with one line on what is good.
Checklist
Architecture & modules
- Module sits in the layer matching its role (
project-architecture); no new top-levelsrc/folders. - Imports use aliases; no
../; no imports against the dependency direction (npm run arch:check). - Slices/features expose a public
index.ts; no deep imports into other slices.
TypeScript
- No
any, no unchecked casts, no!without justification;import typefor types. - Exhaustive handling of unions (
switchwithneverdefault orsatisfies). - Public functions have explicit return types where inference is unclear.
React
- Components are presentational; data flows through hooks; no
@servicesin components. - No
setStatein effects, no derived state stored in state, stable keys in lists, event handlers not recreated needlessly where it matters. - Component under ~150 lines and single-responsibility; props typed; named export (default only for pages).
Design system & accessibility
- Tailwind utilities with
brand-*tokens,dark:variants present, Prettier class order. - Headless UI for interactive patterns; Heroicons
aria-hidden; icon-only controls havesr-onlylabels. - Semantic elements, one
h1, labels on inputs, errors linked viaaria-describedby, visible focus.
Tests
- Behaviour covered (happy path + error/empty state); page has a smoke test; mocks at the service boundary; no snapshot of large trees.
Cleanliness
- No dead code, commented-out code,
console.log, TODO without owner. - Comments explain why; names reveal intent; duplication extracted only when it is real duplication (same reason to change).
- Generated files regenerated, not hand-edited;
CHANGELOG.mdupdated for user-visible changes; docs updated for new scripts/templates.
Security & robustness
- No secrets or tokens in code;
dangerouslySetInnerHTMLonly with sanitised input; external links withrel="noopener"; user input validated at the boundary.
Severity guide
- Blocking: breaks the build/gate, violates architecture direction, security issue, missing tests for new behaviour.
- Should fix: readability, type looseness, accessibility gaps, duplicated logic.
- Nit: naming, comment wording, minor ordering.
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.

