agentleFS
shinzoxDshinzoxD/knackbox/skills/coding/error-handling/SKILL.md

error-handling

Skill0 starsChanged 5 months agoApache-2.0View on GitHub

Design robust error handling, retries, and failure modes for

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use logging, state-management and 8 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.
  • diego-tobalinaSkill

    logging

    Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.

    Also in 5 projects that use this

  • conorluddySkill

    state-management

    Cache management, configuration best practices, and progressive disclosure patterns for efficient context window usage. Use when working with large responses, optimizing token costs, or managing plugin state across operations.

    Also in 5 projects that use this

  • DatabricksSkill

    load-testing

    Load test a Databricks App to find its maximum QPS. Use when: (1) User says 'load test', 'benchmark', 'QPS', 'throughput', or 'performance test', (2) User wants to find how many queries per second their app can handle, (3) User wants to set up load testing scripts for their agent, (4) User wants to view load test results/dashboard, (5) User wants to validate results or observe latency/error rate with MLflow tracing.

    Also in 3 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 5 projects that use this

  • ffsshhttiikkSkill

    i18n

    Internationalization and localization

    Also in 5 projects that use this

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 6 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 37 edited versions we read keep these.

  • 4

    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:

    Document partial failure and compensation for multi-step workflows.

    line 27
  2. Distinctive:

    Never retry non-idempotent writes without idempotency keys.

    line 50
  3. Distinctive:

    Prefer explicit error types/codes over string matching.

    line 51
  4. Distinctive:

    Libraries: do not swallow exceptions to "keep going" without policy.

    line 60

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

Error Handling

Failures are normal. Design for classification, recovery, and operator visibility — not only try/catch cosmetics.

Workflow

  1. Enumerate failure modes (validation, not found, conflict, auth, dependency down, timeout, partial success).
  2. Separate expected domain errors from programmer bugs.
  3. Define user-visible messages vs internal detail (never leak secrets).
  4. Retries only for safe/idempotent operations with backoff and caps.
  5. Specify observability: structured logs, metrics, traces, correlation IDs.
  6. Document partial failure and compensation for multi-step workflows.

Output format

## Error design: <component>

### Taxonomy
| Kind | Example | Retry? | User message | Operator signal |

### Boundaries
Where errors are caught and translated.

### Retry / timeout policy
…

### Propagation
HTTP/RPC codes or typed errors callers see.

Rules

  1. Distinguish validation from infrastructure failures.
  2. Never retry non-idempotent writes without idempotency keys.
  3. Prefer explicit error types/codes over string matching.
  4. Map to stable public statuses; avoid silent 200-with-error unless pre-existing API law.
  5. Include cleanup for partial side effects.
  6. Fail closed on authorization uncertainty.

Edge cases

  • Queues: poison messages, dead-letter, visibility timeouts.
  • Fan-out: partial success reporting.
  • Libraries: do not swallow exceptions to "keep going" without policy.

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.