code-patterns
Skill0 starsChanged 4 months agoMITView on GitHub
The bar for any code you write, edit, or review. Read these rules whenever you are writing or reading any code
3 other projects use a version of this.
Adopted by
Most recently taken up by
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
- bkywksj/knowledge-basetheir own version, first seen Oct 8, 2026
- harrissohail6/claude-code-configtheir own version, first seen Dec 22, 2025
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- bkywksj/knowledge-base★ 340same name
- nek1987/auto-agent-harness★ 4same name
- harrissohail6/claude-code-config★ 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 repository63 other files it gives its agents.
- .claude/skills/nestjs-best-practices/AGENTS.mdAGENTS.md
- accessibility-a11ySkill
- architecture-blueprint-generatorSkill
- backend-delivery-loopSkill
- backend-designSkill
- backend-dev-guidelinesSkill
- backend-testingSkill
- backend-to-frontend-handoff-docsSkill
- building-componentsSkill
- bullmq-specialistSkill
- canvas-designSkill
- components-composition-patternsSkill
- conventional-commitSkill
- core-web-vitalsSkill
- create-svgSkill
- css-architectureSkill
- cypress-authorSkill
- cypress-docsSkill
- cypress-explainSkill
- delivery-loop-retroSkill
- diagnoseSkill
- fastify-best-practicesSkill
- figma-code-connectSkill
- frontend-delivery-loopSkill
- frontend-fundamentalsSkill
- fullstack-delivery-loopSkill
- grill-meSkill
- hunt-race-conditionSkill
- impeccableSkill
- mermaid-diagramsSkill
- nestjs-best-practicesSkill
- nextjs-best-practicesSkill
- nextjs-performanceSkill
- nodejs-backend-patternsSkill
- owasp-security-reviewSkill
- performance-hunterSkill
- playwright-best-practicesSkill
- postgresql-code-reviewSkill
- postgresql-optimizationSkill
- postmanSkill
- prisma-postgresSkill
- pro-state-machineSkill
- race-conditionSkill
- react-best-practicesSkill
- react-performanceSkill
- react-querySkill
- redis-coreSkill
- redis-query-engineSkill
- redis-securitySkill
- refactorSkill
- review-panelSkill
- run-delivery-chainSkill
- spec-drivenSkill
- sql-optimizationSkill
- system-designSkill
- testing-strategySkill
- tune-skills-and-agentsSkill
- ui-ux-pro-maxSkill
- vercel-react-view-transitionsSkill
- viteSkill
- The first 60 shown.
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 10
No dead code: no commented-out blocks, unused or unreachable code, or stray debug/console statements.
- Distinctive: line 11
Don't repeat yourself — extract a reusable abstraction so a fix happens in one place, but don't over-abstract.
- Distinctive: line 12
Use guard clauses and early returns to flatten nesting and keep the happy path obvious.
- Distinctive: line 14
If the request conflicts with project conventions, flag it and propose the conformant alternative instead of silently breaking them.
- Distinctive: line 16
Keep functions small and focused — one thing, at one level of abstraction.
- Distinctive: line 17
Keep it simple (KISS/YAGNI): the simplest thing that works, built for the need the task actually has.
- Distinctive: line 20
Leave each file cleaner than you found it, and write testable code backed by automated tests so it can be refactored without fear.
≈ “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
NON-NEGOTIABLE RULES
- Favour clarity over cleverness; if a line needs a comment to be understood, rewrite it.
- Make the smallest change that fully solves the task — keep diffs focused and reviewable.
- No dead code: no commented-out blocks, unused or unreachable code, or stray debug/console statements.
- Don't repeat yourself — extract a reusable abstraction so a fix happens in one place, but don't over-abstract.
- Use guard clauses and early returns to flatten nesting and keep the happy path obvious.
- Fully implement what was asked: no TODOs, placeholders, or missing pieces, and verify it works before reporting it done.
- If the request conflicts with project conventions, flag it and propose the conformant alternative instead of silently breaking them.
- Give variables, functions, and types intention-revealing names; avoid generic ones like a, b, tmp, data.
- Keep functions small and focused — one thing, at one level of abstraction.
- Keep it simple (KISS/YAGNI): the simplest thing that works, built for the need the task actually has.
- Default to ZERO comments: write self-documenting code (intention-revealing names, small functions) so it needs no narration. Never add a comment that restates what the code does. Add one ONLY for a non-obvious why the code itself cannot carry — a workaround, a deliberate tradeoff, an edge-case reference - The code SHOULD SPEAK for itself.
- Never transcribe requirements, specs, or docs into code comments. Pasting functional requirements, acceptance criteria, ticket/spec prose, or a summary of a doc section into the source is not a legitimate why — it is the most expensive kind of stale comment. The spec and the project docs are the source of truth for what was asked and why it was asked; code carries how. An inline copy of that prose silently rots the moment the spec changes, moves, or is deleted, and then actively misleads the next reader. If a line genuinely needs traceability, point to the spec with a short stable id (the change/ticket slug), never a paragraph of restated requirement. A non-obvious why the code is shaped this way still earns its one short comment; a requirement narration never does.
- Leave each file cleaner than you found it, and write testable code backed by automated tests so it can be refactored without fear.
Apply SOLID with judgment, especially in OO designs: single responsibility (one reason to change), open/closed (extend with new code rather than editing working code — but prefer reusing or extending an existing shared component/module over building a fresh one; "new code" means a new extension point, not a duplicate of something the project already ships), Liskov substitution (subtypes substitute cleanly), interface segregation (small focused interfaces), dependency inversion (depend on abstractions, inject dependencies).
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.

