agentleFS
kanthorlabskanthorlabs/dotagents/skills/coding/SKILL.md

coding

Skill4 starsChanged 2 months agoMITView on GitHub

Apply seven rules for linear control flow, bounded loops, resource ownership, small functions, assertions, explicit errors, and zero warnings. Use when the user asks to write, change, or review code.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use architecture, writing-for-agents and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    architecture

    Create or evaluate an architecture decision record (ADR). Use when choosing between technologies (e.g., Kafka vs SQS), documenting a design decision with trade-offs and consequences, reviewing a system design proposal, or designing a new component from requirements and constraints.

    Also in 3 projects that use this

  • AWSSkill

    writing-for-agents

    Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

    Also in 3 projects that use this

  • AWSSkill

    domain-modeling

    Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

    Also in 4 projects that use this

  • DockerSkill

    research

    Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".

    Also in 5 projects that use this

  • Microsoft AzureSkill

    humanizer

    Tone enforcement patterns for external-facing community responses

    Also in 3 projects that use this

  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 3 projects that use this

  • +2 more from aws

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 13 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is present, use it as the task.

    line 10
  2. Distinctive:

    Linear control flow: Keep control flow linear. Use at most two nested control-flow levels.

    line 14
  3. Distinctive:

    Prefer guard clauses and early returns.

    line 15
  4. Distinctive:

    Do not rely on assumed input size or eventual termination.

    line 17
  5. Very specific:

    Prefer language constructs that guarantee cleanup, such as context managers, defer, finally, or RAII.

    line 21
  6. Distinctive:

    Assertions: Add at least two meaningful assertions to every function.

    line 23
  7. Distinctive:

    Use side-effect-free assertions for internal invariants.

    line 24
  8. Distinctive:

    Zero warnings: Run the applicable compiler, type, lint, and static-analysis checks from the first change.

    line 27
  9. Very specific:

    Before each try/catch addition or change, identify possible failures and justify error handling at that exact layer.

    line 32
  10. Distinctive:

    Prefer propagation over local recovery.

    line 34
  11. Distinctive:

    When useful, add context to the error.

    line 36
  12. Very specific:

    Do not hide failures behind null, [], or false fallbacks, swallowed parse errors, log-and-continue paths, or silent best-effort recovery.

    line 37
  13. Distinctive:

    When HTTP routes, CLI entrypoints, or supervisors translate errors, preserve the failure signal.

    line 42
  14. Distinctive:

    Do not add or keep a catch solely to satisfy lint or style rules.

    line 44
  15. Distinctive:

    When correct recovery is uncertain, fail fast rather than silently degrade.

    line 45
  16. Distinctive:

    Check the changed code against all seven rules and the strict fail-fast requirements.

    line 49
  17. Distinctive:

    Run the relevant tests and all applicable compiler, type, lint, and static-analysis checks before completion.

    line 50

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

Usage: /coding [$ARGUMENTS]

If $ARGUMENTS is present, use it as the task. Otherwise, apply these rules to the current task.

Rules

  1. Linear control flow. Keep control flow linear. Use at most two nested control-flow levels. Prefer guard clauses and early returns.
  2. Bounded loops. Give finite loops an explicit iteration bound that the code enforces. Do not rely on assumed input size or eventual termination. Give retries an attempt limit and a timeout. For intentional service loops, define an explicit shutdown path.
  3. Resource ownership. Give every resource an explicit owner. Release owned resources on success, error, and cancellation. Make ownership transfers explicit. Prefer language constructs that guarantee cleanup, such as context managers, defer, finally, or RAII.
  4. Small functions. Give each function one job. Keep each function within about 60 lines.
  5. Assertions. Add at least two meaningful assertions to every function. Use side-effect-free assertions for internal invariants. Validate external inputs with explicit errors. Make assertion failures explicit.
  6. Explicit errors. Handle or propagate every error. Never swallow an error, including through except: pass.
  7. Zero warnings. Run the applicable compiler, type, lint, and static-analysis checks from the first change. Require zero warnings and errors. Fix warning causes. Do not suppress warnings to pass the checks.

Fail-fast error handling (strict)

  1. Before each try/catch addition or change, identify possible failures and justify error handling at that exact layer.
  2. Prefer propagation over local recovery. If the current scope cannot fully recover and preserve correctness, let the error propagate or rethrow it. When useful, add context to the error.
  3. Do not hide failures behind null, [], or false fallbacks, swallowed parse errors, log-and-continue paths, or silent best-effort recovery.
  4. Let JSON parse and decode errors propagate by default. Without an explicit compatibility requirement and clear, tested behaviour, do not implement a quiet fallback.
  5. When HTTP routes, CLI entrypoints, or supervisors translate errors, preserve the failure signal. Do not report success or silently degrade.
  6. Do not add or keep a catch solely to satisfy lint or style rules.
  7. When correct recovery is uncertain, fail fast rather than silently degrade.

Verification

Check the changed code against all seven rules and the strict fail-fast requirements. Run the relevant tests and all applicable compiler, type, lint, and static-analysis checks before completion. Require zero warnings and errors.

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.