agentleFS
sefaertuncsefaertunc/Worclaude/.claude/skills/coding-principles/SKILL.md

coding-principles

Skill4 starsChanged 7 months agoMITView on GitHub

Core behavioral principles: when to ask, when to push back, when to simplify, how to make surgical changes

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

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 12

    Distinctive

    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:

    Don't assume. Don't hide confusion.

    line 13
  2. Distinctive:

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

    line 16
  3. Distinctive:

    If a simpler approach exists, say so.

    line 17
  4. Distinctive:

    If something is unclear, stop.

    line 18
  5. Distinctive:

    No features beyond what was asked.

    line 26
  6. Distinctive:

    No error handling for impossible scenarios.

    line 28
  7. Distinctive:

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

    line 29
  8. Distinctive:

    When NOT to simplify: hot paths, stable legacy, framework boilerplate, security-critical code, code you don't fully understand.

    line 31
  9. Distinctive:

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

    line 37
  10. Distinctive:

    Don't refactor things that aren't broken.

    line 38
  11. Distinctive:

    Remove imports/variables YOUR changes made unused.

    line 40
  12. Distinctive:

    Never combine cleanup with feature work.

    line 41

“Common” is measured: kept by at least 6 in 10 of the 12 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 Principles

Reference card. Depth and examples live in the linked skills — this file consolidates the rules, not the rationale.

1. Think Before Coding

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

  • State 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.

See prompt-engineering/SKILL.md for eliciting quality and writing specs.

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.
  • If you wrote 200 lines and it could be 50, rewrite it.

When NOT to simplify: hot paths, stable legacy, framework boilerplate, security-critical code, code you don't fully understand. When in doubt, leave it — a working system is more valuable than a clean one. See the code-simplifier agent and /refactor-clean command.

3. Surgical Changes

Touch only what you must. Every changed line must trace to the request.

  • 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.
  • Remove imports/variables YOUR changes made unused. Leave pre-existing dead code unless asked.
  • Never combine cleanup with feature work.

See git-conventions/SKILL.md for style matching and the /refactor-clean command for scope.

4. Goal-Driven Execution

Define success criteria up front. Loop until verified.

Transform tasks into verifiable goals:

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

Close the feedback loop BEFORE committing: change → verify → commit. Not: commit → discover it's broken.

See verification/SKILL.md, testing/SKILL.md, and planning-with-files/SKILL.md.


These principles are working if: fewer unnecessary diff lines, fewer rewrites from overcomplication, clarifying questions come before implementation rather than after mistakes.

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.