agentsclimarketplace

Error handling

Skill kimtth/agent-skill-100-lines-or-less/skills/error-handling

🧿 Minimal but effective AI agent skill definitions in 100 lines or less.

Install
npx -y skills add kimtth/agent-skill-100-lines-or-less --skill error-handling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when: design error handling so failures are explicit, recoverable, and never silently swallowed.

SKILL.md

1.2 KB, as published. Nobody here has run it

Goal: failures that are visible, contextual, and handled deliberately.

Use for:

  • deciding how functions signal and propagate failure
  • reviewing try/catch, error types, and recovery
  • fixing swallowed errors and vague messages

Workflow:

  1. Distinguish expected failures from programmer bugs.
  2. Model expected errors explicitly (results or typed exceptions).
  3. Handle errors where you can act; otherwise propagate with context.
  4. Add context as errors cross boundaries, without losing the cause.
  5. Fail fast on invariant violations; do not limp on.
  6. Surface actionable messages; log details once, near the source.

Patterns:

  • typed errors or result types over generic throws
  • wrap-and-rethrow to add context, preserving the cause
  • retry with backoff for transient failures only
  • a single place that maps errors to user-facing responses

Rules:

  • never swallow an error silently
  • do not catch broadly just to continue; handle or rethrow
  • include context, never the bare message
  • distinguish retryable failures from permanent ones

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.