Rust Skills
JMBeresford/retrom
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
A skill your agent uses when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message…
$ npx skills add ericrisco/rsc-harness --skill error-handling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ericrisco/rsc-harness error-handling --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/error-handling .claude/skills/error-handling && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .claude/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handlingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ericrisco/rsc-harness --skill error-handling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ericrisco/rsc-harness error-handling --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/error-handling .agents/skills/error-handling && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .agents/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ericrisco/rsc-harness --skill error-handling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ericrisco/rsc-harness error-handling --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/error-handling .cursor/skills/error-handling && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .cursor/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ericrisco/rsc-harness.git --path skills/error-handling--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ericrisco/rsc-harness --skill error-handling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ericrisco/rsc-harness error-handling --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/error-handling .gemini/skills/error-handling && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .gemini/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ericrisco/rsc-harness error-handlingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ericrisco/rsc-harness --skill error-handling -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/error-handling .github/skills/error-handling && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .github/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ericrisco/rsc-harness --skill error-handling -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ericrisco/rsc-harness error-handling --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/error-handling .opencode/skills/error-handling && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/ericrisco/rsc-harness/tree/main/skills/error-handling into .opencode/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
error-handlingA skill your agent uses when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message…
Error Handling is an agent skill from ericrisco/rsc-harness. Use when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message vs operator-log split. NOT diagnosing one specific crash (that is debug), NOT logs/metrics/traces (that is observability), NOT the wire error envelope (that is api-design).
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/boundaries-and-messaging.md`).
It sits in Backend & APIs, covering Error handling, API design and Observability. It works with React. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 92fde8f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Error Handling loads about 3.2k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 92 tokens; SKILL.md has 1,277 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from ericrisco/rsc-harness at commit 92fde8f, republished under its MIT licence (© ericrisco). 1,277 words, ~3,169 tokens.
.claude/skills/error-handling/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.You are designing what happens whenever anything in a class breaks, not chasing
one crash (that is debug). Every failure gets classified,
contained, and surfaced — never swallowed. The deliverable, in that order: a typed
error taxonomy, a retry policy with caps and jitter, boundary placement, and a
two-audience message contract — never a pile of try { … } catch {}.
Bucket every failure into one of three kinds. The bucket dictates the reaction; get the bucket wrong and every downstream decision is wrong too.
| Bucket | Examples | Retry? | Tell the user | Tell the operator |
|---|---|---|---|---|
| Domain / expected | insufficient funds, slot taken, validation failed | No | Yes, actionable | info — it is normal |
| Infrastructure / transient | timeout, 503, connection reset, 429 | Yes (capped) | "temporary, retrying" | warn — watch the rate |
| Programmer error / bug | null deref, bad assertion, type error | No | generic "something broke" + id | error — page if frequent |
Decide per call site, not per codebase:
Result<T, E> for expected domain failures the caller must handle. The
type checker forces a branch — the failure cannot be ignored by accident.throw for exceptional / programmer errors. These should crash up to the
nearest boundary, not be threaded through every signature.In TypeScript, neverthrow (current) is the instrument for the Result path:
import { ok, err, Result } from "neverthrow";
type ChargeError = "insufficient_funds" | "card_declined";
// Expected domain failure → Result. The caller MUST handle both arms.
function charge(cents: number, balance: number): Result<number, ChargeError> {
if (cents > balance) return err("insufficient_funds");
return ok(balance - cents);
}
const r = charge(500, 200);
if (r.isErr()) {
// r.error is the typed union — exhaustive, no `any`.
}Every error carries a stable code (a string the UI and logs key off, never
the human message) and never drops the original cause.
// BAD — string error, loses the original, nothing to branch on.
throw new Error("payment failed");
// GOOD — typed class, stable code, cause preserved.
class PaymentError extends Error {
constructor(public code: "provider_down" | "declined", cause?: unknown) {
super(code);
this.name = "PaymentError";
this.cause = cause; // the original error/stack survives for the log
}
}
try {
await provider.charge();
} catch (e) {
throw new PaymentError("provider_down", e); // wrap, do not erase
}Cross-language error-class skeletons (Python, Java, Go, .NET) live in
references/retry-and-resilience.md.
Retry only transient failures, and only on idempotent operations. Retrying the wrong thing turns one slow dependency into a self-inflicted outage.
| Retry these (transient) | Never retry these (permanent) |
|---|---|
| Network error, connection reset | 400 bad request, 422 unprocessable |
| Timeout | 401 / 403 (auth/permission) |
429 too many requests (honor Retry-After) | 404 not found |
| 503 / 502 / 504 | Any business-rule rejection (insufficient funds) |
| 500 on a GET (idempotent) | 500 on a non-idempotent POST without a key |
Idempotency is a precondition, not a nicety. A retried POST that creates a
charge can double-charge. Retry only operations that are idempotent by nature
(GET, PUT, DELETE) or that carry an idempotency key so the server dedupes.
Key design itself belongs to ../api-design/SKILL.md;
here you just require one before you retry a mutation.
Caps (industry-converged — AWS Builders' Library, REL05-BP03):
delay = random_between(0, min(cap, base * 2 ** attempt))Set a per-attempt timeout first, then retry — a retry on a call that never times out just stacks hung requests.
// GOOD — classify before retrying; cap; full jitter; per-attempt timeout.
async function withRetry<T>(fn: () => Promise<T>, max = 4): Promise<T> {
for (let attempt = 0; ; attempt++) {
try {
return await fn(); // fn must enforce its own per-attempt timeout
} catch (e) {
if (!isTransient(e) || attempt >= max - 1) throw e; // permanent or budget spent
const cap = 10_000, base = 150;
const delay = Math.random() * Math.min(cap, base * 2 ** attempt); // full jitter
await new Promise((r) => setTimeout(r, delay));
}
}
}Per-language withRetry (Python tenacity, Java Resilience4j, .NET Polly) is in
references/retry-and-resilience.md.
Retries alone make a struggling dependency worse. Contain it.
2.x line; a 3.x line targets Java
21). The config matrix is in
references/retry-and-resilience.md.A boundary is where an unhandled failure is caught and converted into a contained reaction. Place one at each level that can fail independently.
error.tsx is a route-segment boundary. It MUST be a Client Component
('use client') and receives { error, reset }. An error in a segment bubbles
to the nearest parent error.tsx.error.tsx does NOT catch an error thrown in its own segment's layout.tsx
or template.tsx. Those run outside the boundary — move the boundary to the
parent segment to cover them.global-error.tsx wraps the whole app and must render its own <html> and
<body> (it replaces the root layout when the root itself fails).async callbacks, setTimeout, or server-side data fetching are invisible to
them — handle those with explicit try/catch + state."use client"; // app/dashboard/error.tsx — REQUIRED
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
// Log to your telemetry sink (see observability); show the user the digest id.
return (
<div role="alert">
<p>Something went wrong. Quote id {error.digest} to support.</p>
<button onClick={reset}>Try again</button>
</div>
);
}The full segment-tree placement map and the global-error.tsx skeleton are in
references/boundaries-and-messaging.md.
Framework specifics: ../nextjs/SKILL.md.
unhandledRejection / uncaughtException
handler (Node) or equivalent. Log the cause chain, then exit and let the
supervisor restart. A process that keeps running after an unhandled error is
running corrupted.Two audiences. Never conflate them — that is how stack traces reach end users and how logs become useless.
| User message | Operator log | |
|---|---|---|
| Goal | tell them what to do next | let you reconstruct what happened |
| Content | plain language, one action, a correlation id | code, cause chain, request context, structured fields |
| Never | stack trace, SQL, internal hostnames, PII | a swallowed/lost cause |
Taxonomy → HTTP status (the in-process map; the wire envelope shape —
RFC 9457 problem+json — belongs to ../api-design/SKILL.md;
shipping the log to a sink belongs to ../observability/SKILL.md):
| Bucket / code | Status |
|---|---|
| validation / bad input | 400 / 422 |
| unauthenticated / forbidden | 401 / 403 |
| not found | 404 |
| domain conflict (slot taken) | 409 |
| transient downstream / breaker open | 503 (+ Retry-After) |
| programmer error / unknown | 500 |
BAD → alert("TypeError: cannot read 'id' of undefined")
GOOD → "We couldn't load your orders. Try again in a moment — id a1b2c3."
BAD → 500 { "error": "ECONNREFUSED 10.0.3.12:5432" } // leaks topology
GOOD → 503 { "code": "upstream_unavailable", "correlationId": "a1b2c3" }More before/after rewrites and the copy contract are in
references/boundaries-and-messaging.md.
| Anti-pattern | Why it bites | Fix |
|---|---|---|
Empty catch {} / except: pass | failure vanishes; you debug blind later | handle, or rethrow with context |
Bare except: (Python) | swallows KeyboardInterrupt/SystemExit too | catch the specific type |
| Retry everything, including 4xx | retrying a 400 just burns budget; never succeeds | retry only the transient table |
| Retry a non-idempotent POST without a key | double-charges, duplicate rows | require an idempotency key first |
| Infinite retry, no cap or jitter | thundering herd; turns a blip into an outage | cap attempts + full jitter + budget |
| Leak stack trace / SQL to the user | hands attackers your internals | generic message + id; detail to the log |
Expect error.tsx to catch its own segment's layout error | it runs outside the boundary; nothing catches it | move the boundary to the parent |
alert(e.message) as the handler | blocks the UI, leaks internals, no recovery | render an error.tsx with reset |
Catch-and-rethrow that drops cause | the root error is gone; logs are a dead end | wrap, set cause, preserve the chain |
| Log the error and rethrow | double-logged at every layer; noise buries signal | log at the boundary, or rethrow — not both |
Swallow, then return null | callers deref null later, far from the cause | return a typed Result error |
| Outbound call with no timeout | one hung dependency exhausts the pool | timeout every call, then retry |
One giant try around 200 lines | you cannot tell which call failed | scope try to the fallible call |
| Treat every error as a retryable transient | masks real bugs as "flaky" | classify first (Step 1), then react |
Before claiming the failure path is handled, read your diff against the table
above — those rows are the checklist. scripts/verify.sh <path> scans the
working tree for the highest-signal ones. It is advisory (exit 0 with
warnings); pass --strict to make any hit fail. It is heuristic — it flags,
you judge.
© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/error-handling of ericrisco/rsc-harness.
Open the folder on GitHubat commit 92fde8f
Error Handling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Error Handling this skillericrisco/rsc-harness | 156 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Rust SkillsJMBeresford/retrom | 2.1k | 1 repos | ~9.5k | Automated safety check: Pass | MIT | |
| Code PatternsAedelon/claude-code-blueprint | 120 | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Inngest Durable FunctionsAsymmetric-al/core | 382 | — | ~4k | Automated safety check: Pass | AGPL-3.0 | |
| Sentry v8 Error Trackingdiet103/claude-code-infrastructure-showcase | 10k | 2 repos | ~2.3k | Automated safety check: Notes | MIT | |
| API Error Design Patternsrevfactory/harness-100 | 1.3k | — | ~1.6k | Automated safety check: Pass | Apache-2.0 |
JMBeresford/retrom
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
Aedelon/claude-code-blueprint
Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.
Asymmetric-al/core
A skill your agent uses when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure…
diet103/claude-code-infrastructure-showcase
Enforces that every error in a service is captured to Sentry v8, with patterns for controllers, routes, cron jobs and database performance spans instead of console logging alone.
revfactory/harness-100
Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.
github/awesome-copilot
Comprehensive technology-agnostic prompt generator for documenting end-to-end application workflows.
ericrisco/rsc-harness
A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…
ericrisco/rsc-harness
A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…
ericrisco/rsc-harness
A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…
ericrisco/rsc-harness
A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…
ericrisco/rsc-harness
A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…
ericrisco/rsc-harness
A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.
Works with
Categories
A skill your agent uses when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message…. Error Handling is an agent skill from ericrisco/rsc-harness. Use when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message vs operator-log split.
Error Handling fits situations like: designing the reaction to a class of failures — typed error taxonomies; retry/backoff/timeout policy; circuit breakers; React/Next error boundaries.
Run `npx skills add ericrisco/rsc-harness --skill error-handling -a claude-code`. Or copy the skill folder (skills/error-handling in ericrisco/rsc-harness) into .claude/skills/error-handling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ericrisco/rsc-harness --skill error-handling -a codex`. Or copy the skill folder (skills/error-handling in ericrisco/rsc-harness) into .agents/skills/error-handling in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill error-handling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-handling, .gemini/skills/error-handling, .github/skills/error-handling and .opencode/skills/error-handling in your project.
Going by SKILL.md and its folder, Error Handling needs a shell for the scripts in its folder. Our summary lists: Python 3; A Bash shell.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Error Handling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Error Handling: Rust Skills (JMBeresford/retrom, 2.1k stars), Code Patterns (Aedelon/claude-code-blueprint, 120 stars), Inngest Durable Functions (Asymmetric-al/core, 382 stars) and Sentry v8 Error Tracking (diet103/claude-code-infrastructure-showcase, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 156 GitHub stars. The repository holds 229 skills in this directory. The repository was last updated on October 6, 2026.
Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.