agentleFS
jgamaraalvjgamaraalv/delivery-loop/.claude/skills/code-patterns/SKILL.md

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

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
  1. Distinctive:

    No dead code: no commented-out blocks, unused or unreachable code, or stray debug/console statements.

    line 10
  2. Distinctive:

    Don't repeat yourself — extract a reusable abstraction so a fix happens in one place, but don't over-abstract.

    line 11
  3. Distinctive:

    Use guard clauses and early returns to flatten nesting and keep the happy path obvious.

    line 12
  4. Distinctive:

    If the request conflicts with project conventions, flag it and propose the conformant alternative instead of silently breaking them.

    line 14
  5. Distinctive:

    Keep functions small and focused — one thing, at one level of abstraction.

    line 16
  6. Distinctive:

    Keep it simple (KISS/YAGNI): the simplest thing that works, built for the need the task actually has.

    line 17
  7. Distinctive:

    Leave each file cleaner than you found it, and write testable code backed by automated tests so it can be refactored without fear.

    line 20

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.