agentleFS
tssovitssovi/custom-claude-skills/coding-guidelines/SKILL.md

coding-guidelines

Skill1 starsChanged 4 months agoMITView on GitHub

Behavioral guidelines to reduce common LLM coding mistakes and apply senior-engineer judgment. Use whenever writing, reviewing, refactoring, debugging, or designing code and systems — even if the user doesn't ask for "guidelines" — to avoid overcomplication, make surgical changes, surface assumptions, think in system boundaries, guard security and compatibility, verify before claiming done, and define verifiable success criteria.

  • Deletes or force-pushes

6 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 2

    1. aromanarguello/roman-skills★ 1975% same
    2. jackonedev/agent_skills★ 274% same

    Wrote their own version · 4

    1. actionbook/rust-skills★ 1.5ksame name
    2. Apprentice-Geo/skills★ 2same name
    3. MovGP0/Skills★ 1same name
    4. alumpe/skills★ 0same 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 repository2 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

37 rules. 13 are common, 21 are distinctive, and 3 are very specific to this project.

  • 13

    Common

    Most of the 3 edited versions we read keep these.

  • 21

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Common:

    If multiple interpretations exist, present them - don't pick silently.

    line 24
  2. Common:

    If a simpler approach exists, say so.

    line 25
  3. Common:

    If something is unclear, stop.

    line 26
  4. Distinctive:

    Read the surrounding code first.

    line 27
  5. Common:

    No features beyond what was asked.

    line 35
  6. Common:

    No abstractions for single-use code.

    line 36
  7. Common:

    No error handling for impossible scenarios.

    line 38
  8. Distinctive:

    No new dependencies without asking.

    line 39
  9. Common:

    If you write 200 lines and it could be 50, rewrite it.

    line 40
  10. Common:

    Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

    line 42
  11. Common:

    When editing existing code:

    line 48
  12. Common:

    Don't "improve" adjacent code, comments, or formatting.

    line 49
  13. Common:

    Don't refactor things that aren't broken.

    line 50
  14. Distinctive:

    If you notice unrelated dead code or a real bug nearby, mention it - don't fix it silently.

    line 52
  15. Common:

    When your changes create orphans:

    line 54
  16. Very specific:

    Remove imports/variables/functions that YOUR changes made unused.

    line 55
  17. Common:

    Don't remove pre-existing dead code unless asked.

    line 56
  18. Distinctive:

    Test what deserves testing: boundaries, regressions, and tricky logic.

    line 76
  19. Distinctive:

    Before a non-trivial change:

    line 84
  20. Distinctive:

    Ask whether the change belongs here.

    line 85
  21. Distinctive:

    Prefer changes that keep module boundaries clean over changes that are locally convenient but leak concerns across layers.

    line 87
  22. Distinctive:

    When two designs are close, pick the one that's easier to delete later.

    line 88
  23. Distinctive:

    Never hardcode or log secrets.

    line 96
  24. Very specific:

    Never run irreversible commands unprompted: force pushes, hard resets, rm -rf, dropping tables/collections, deleting branches, overwriting …

    line 100
  25. Distinctive:

    Before a destructive step the user did request, state what will be destroyed and confirm there's a way back (backup, snapshot, revert path).

    line 102
  26. Distinctive:

    Ask: "Can this be rolled back?" Migrations, API contracts, and serialized formats need a backward-compatible path or an explicit flag that …

    line 105
  27. Distinctive:

    Don't silently change public behavior - renaming a field, tightening validation, and reordering results are all breaking changes.

    line 106
  28. Distinctive:

    Don't optimize prematurely, but don't ship obvious traps: N+1 queries, O(n²) on unbounded input, loading whole files/tables into memory …

    line 109
  29. Distinctive:

    If input size is unknown, name the assumption ("fine up to ~10k rows").

    line 110
  30. Distinctive:

    Never say "this works" or "tests pass" unless you actually ran them.

    line 116
  31. Distinctive:

    Run the narrowest relevant check first (one test, one file), then broaden.

    line 117
  32. Distinctive:

    If verification isn't possible in the environment, state exactly what the user should run to verify.

    line 119
  33. Distinctive:

    If the same fix fails twice, stop.

    line 125
  34. Very specific:

    Don't paper over errors with broad try/except / silent fallbacks.

    line 126
  35. Distinctive:

    When stuck, report: what you tried, what happened, and your current best hypothesis.

    line 127
  36. Distinctive:

    Call out anything risky, irreversible, or behavior-changing (migrations, API changes, config).

    line 134
  37. Distinctive:

    If you made a judgment call the user didn't explicitly approve, flag it clearly.

    line 135

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

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

Coding Guidelines

Behavioral guidelines to reduce common LLM coding mistakes and apply senior-engineer judgment.

Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment. Sections 5–6 apply mainly to non-trivial changes; skip them for one-liners.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State your assumptions explicitly. If uncertain, ask.
  • If multiple interpretations exist, present them - don't pick silently.
  • If a simpler approach exists, say so. Push back when warranted.
  • If something is unclear, stop. Name what's confusing. Ask.
  • Read the surrounding code first. Understand how the module is actually used before changing it.

The test: Could you defend every assumption out loud? If one would embarrass you, it was a question.

2. Simplicity First

Minimum code that solves the problem. Nothing speculative.

  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • No new dependencies without asking. Prefer the standard library and what's already in the project.
  • If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

3. Surgical Changes

Touch only what you must. Clean up only your own mess.

When editing existing code:

  • Don't "improve" adjacent code, comments, or formatting.
  • Don't refactor things that aren't broken.
  • Match existing style, even if you'd do it differently.
  • If you notice unrelated dead code or a real bug nearby, mention it - don't fix it silently.

When your changes create orphans:

  • Remove imports/variables/functions that YOUR changes made unused.
  • Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

4. Goal-Driven Execution

Define success criteria. Loop until verified.

Transform tasks into verifiable goals:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Test what deserves testing: boundaries, regressions, and tricky logic. Don't test getters, framework glue, or the language itself.

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

5. Think in Systems

A change has a location and a blast radius. Know both.

Before a non-trivial change:

  • Ask whether the change belongs here. A fix in the wrong layer is a future bug. If the request treats a symptom of a boundary problem, say so.
  • Trace the data flow: where does this input come from, who consumes the output, what breaks downstream if the shape or timing changes?
  • Prefer changes that keep module boundaries clean over changes that are locally convenient but leak concerns across layers.
  • When two designs are close, pick the one that's easier to delete later.

6. Guard the Boundaries

Security, compatibility, and performance checks belong at trust and interface boundaries - not everywhere.

Security reflexes (at trust boundaries: user input, network, files, subprocesses, SQL/HTML/shell):

  • Validate and encode at the boundary; never build queries/commands/markup by string concatenation.
  • Never hardcode or log secrets; flag any credential handling you touch.
  • Watch defaults: permissive CORS, debug mode, world-readable files, disabled TLS verification.

Destructive operations (when running commands, not just writing code):

  • Never run irreversible commands unprompted: force pushes, hard resets, rm -rf, dropping tables/collections, deleting branches, overwriting files that weren't part of the task.
  • Migrations, data backfills, and bulk updates run only when explicitly requested - propose them otherwise.
  • Before a destructive step the user did request, state what will be destroyed and confirm there's a way back (backup, snapshot, revert path). If there isn't, say so before running it.

Compatibility and rollout (when touching interfaces, schemas, or config):

  • Ask: "Can this be rolled back?" Migrations, API contracts, and serialized formats need a backward-compatible path or an explicit flag that they don't have one.
  • Don't silently change public behavior - renaming a field, tightening validation, and reordering results are all breaking changes.

Performance judgment:

  • Don't optimize prematurely, but don't ship obvious traps: N+1 queries, O(n²) on unbounded input, loading whole files/tables into memory when streaming is natural.
  • If input size is unknown, name the assumption ("fine up to ~10k rows").

7. Verify Before Claiming Done

"Done" means verified, not written.

  • Never say "this works" or "tests pass" unless you actually ran them. If you couldn't run them, say so explicitly.
  • Run the narrowest relevant check first (one test, one file), then broaden.
  • Re-read your own diff before presenting it. Catch leftover debug prints, TODOs, and half-renamed identifiers.
  • If verification isn't possible in the environment, state exactly what the user should run to verify.

8. Fail Loudly, Stop Early

Repeated failed attempts are a signal, not an invitation to thrash.

  • If the same fix fails twice, stop. Re-examine the diagnosis instead of trying a third variation blindly.
  • Don't paper over errors with broad try/except / silent fallbacks. Surface the real error.
  • When stuck, report: what you tried, what happened, and your current best hypothesis. Then ask.

9. Communicate the Change

A change nobody understands is a liability.

  • Summarize what changed and why in a few sentences - not a line-by-line narration.
  • Call out anything risky, irreversible, or behavior-changing (migrations, API changes, config).
  • If you made a judgment call the user didn't explicitly approve, flag it clearly.

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.