error-handling
Skill2 starsChanged 57 days agoMITView on GitHub
Design, implement, or review error contracts and recovery behavior across software boundaries.
44 other projects use a version of this.
Adopted by
Most recently taken up by
- SkillMedev/ai-engineer-toolkittheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
- komluk/scaffoldingtheir own version, first seen Sep 28, 2026
- alfredobs97/flutter_agentic_templatetheir own version, first seen Sep 24, 2026
- templetongroup/radianttheir own version, first seen Sep 17, 2026
Used with
Projects with it also use logging, state-management and 9 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-tobalinaSkilllogging
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
conorluddySkillstate-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
DatabricksSkillload-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
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 5 projects that use this
ffsshhttiikkSkilli18n
Internationalization and localization
Also in 5 projects that use this
pproencaSkillrefactoring
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
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- microsoft/data-formulator★ 18ksame name
- CloudAI-X/claude-workflow-v2★ 1.4ksame name
- codewithmukesh/dotnet-claude-kit★ 750same name
- templetongroup/radiant★ 113same name
- DevelopersGlobal/ai-agent-skills★ 69same name
- metarhia/metaskills★ 57same name
- suhailkakar/the-skills★ 26same name
- komluk/scaffolding★ 15same name
- zircote-plugins/claude-team-orchestration★ 15same name
- wpank/ai★ 11same name
34 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- accessibilitySkill
- agent-instructionsSkill
- analyze-change-effectsSkill
- article-processingSkill
- ci-cd-automationSkill
- commitSkill
- communicate-clearlySkill
- compare-solutionsSkill
- create-project-instructionsSkill
- daily-meeting-updateSkill
- debugSkill
- design-code-structureSkill
- explain-codeSkill
- explain-decisionsSkill
- github-actionsSkill
- handoffSkill
- learning-planSkill
- people-memorySkill
- pr-followupSkill
- prototypeSkill
- prSkill
- report-work-activitySkill
- review-code-changesSkill
- simplify-codeSkill
- stacked-prSkill
- tddSkill
- teachSkill
- typescript-best-practicesSkill
- verification-authoringSkill
- verifySkill
- workflow-to-skillSkill
- worktrunkSkill
- write-documentationSkill
- youtube-processingSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Keep the requested boundary: a review or design request produces findings or a proposal.
- Distinctive: line 15
Read the affected operation, callers, existing error types, adapters and tests.
- Distinctive: line 35
Place validation and translation at the boundary that owns them.
- Distinctive: line 47
Use runtime-supported cleanup and ownership mechanisms on success, failure and cancellation.
- Distinctive: line 56
Before adding retries, fallback, restart, rollback, compensation or a circuit breaker, read references/recovery.md.
- Distinctive: line 60
Prefer existing retry and recovery mechanisms over another nested loop.
- Distinctive: line 62
If the intended result cannot be established, return the supported failure or uncertainty rather than manufacture success.
- Distinctive: line 83
Use controllable dependencies and time where needed to exercise partial progress, exhaustion, cancellation and cleanup.
- Distinctive: line 86
Do not replace the behavior under test with a mock or use elapsed waiting as proof.
- Very specific: line 88
Run the project's applicable checks after implementation.
“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.
Files
Error handling
Make failures explicit to their callers and recover only when the operation's contract supports it. Apply the language, runtime and framework already in use. Keep the requested boundary: a review or design request produces findings or a proposal; implementation requires the active task's authority.
Establish the contract
Read the affected operation, callers, existing error types, adapters and tests. Find the requirement or established contract for each material failure: what the caller can observe, which effects may already have happened, and who can decide the next action. Current behavior alone does not settle an unclear product policy.
Distinguish expected domain outcomes, invalid input or denied access, dependency failures, broken internal invariants, and cancellation or deadline expiry when they require different handling. Classify by the actual operation and runtime semantics, not message matching or a blanket rule for an entire status range. Separate known failure from an unknown outcome after a lost response.
Preserve public codes, response shapes, exit status, queue acknowledgement, exception identity and other caller-visible behavior unless the requested change revises that contract. Reuse the project's representation; do not introduce a universal error superclass, result type, transport envelope or dependency merely to follow this skill. Resolve an undecided fallback, data-loss or retry policy before implementing the affected behavior; continue independent work.
Propagate to an owner that can act
Place validation and translation at the boundary that owns them. Keep domain behavior independent of transport details where the existing structure permits. Rely on an established invariant only while its evidence holds: persisted data, concurrent changes and lifecycle transitions can invalidate a prior check.
Handle a failure where code can recover, add useful context, translate its representation, or perform required cleanup. Otherwise preserve propagation. Retain the cause and useful classification when wrapping; keep diagnostic detail separate from the public response. A catch that only logs does not establish recovery. An empty value, default result or successful exit must not conceal an unfulfilled operation.
Use runtime-supported cleanup and ownership mechanisms on success, failure and cancellation. Keep the primary failure identifiable if cleanup also fails; expose the secondary failure through the project's supported reporting mechanism. Treat cancellation as control flow when the runtime does; do not turn it into success or an automatic retry. Ensure asynchronous work has an owner that observes its completion and failures, including work outside a request or UI render boundary.
Choose recovery from the operation's semantics
Before adding retries, fallback, restart, rollback, compensation or a circuit breaker, read references/recovery.md. That reference owns replay safety, partial effects, limits and recovery transitions.
Prefer existing retry and recovery mechanisms over another nested loop. A fallback must satisfy an approved reduced contract and make partial or stale results clear. If the intended result cannot be established, return the supported failure or uncertainty rather than manufacture success. Do not add resilience infrastructure without a concrete failure mode that needs it.
Make failures understandable and testable
Give the user or caller an accurate outcome and a next action that is actually available. Preserve localization and accessibility conventions. Do not advise resubmitting a mutation whose outcome is unknown unless replay is safe. Keep technical causes out of public messages while retaining appropriate internal evidence for investigation.
Choose the reporting owner so one failure remains traceable without duplicate alerts at every layer. Record useful operation, correlation, classification and attempt context using the project's logging or telemetry conventions. Filter secrets, payloads and personal data before recording them; raw exception text and cause chains can contain sensitive values too. A public generic message does not justify logging unrestricted internal data.
Exercise the real error boundary through observable behavior. Cover the relevant failure, successful or permitted recovery path, and effects that must not repeat. Use controllable dependencies and time where needed to exercise partial progress, exhaustion, cancellation and cleanup. Verify result/state as well as reporting; absence of a side effect is meaningful when tied to the observed failure contract. Do not replace the behavior under test with a mock or use elapsed waiting as proof.
Run the project's applicable checks after implementation. Use available verify
for application-level evidence when the change needs it; existing direct checks
remain useful if that skill is unavailable. debug owns a wider investigation
of an observed symptom; error-handling supplies the failure-contract decisions.
Return the result
Report the boundary and contract, changes or findings, observed outcomes and remaining uncertainty. For recovery work, include what was retried or reconciled, its stopping condition and the evidence that effects were not duplicated. Keep proposed behavior and tested behavior distinct. The active caller owns further delivery; this skill does not start publication or PR monitoring.
For a requested check or update of this skill's sources, read references/upstream-updates.md.
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
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.

