error-handling
Skill2 starsChanged 5 months agoMITView on GitHub
Audit and harden error handling in a file or module — swallowed exceptions, unhandled rejections, missing boundaries, bare catches, leaked internals — and fix the gaps. Use when the user says "improve error handling", "audit error handling", "handle errors properly", "fix swallowed exceptions", "add error boundaries", or "make this more robust".
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
- LuisUrrutia/skillstheir own version, first seen Oct 4, 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
Used with
Projects with it also use state-management, load-testing 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.
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
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
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 16 projects that use this
benshapyroSkillreact-patterns
Modern React patterns for TypeScript applications including hooks, state management, and component composition. Use when building React components, managing state, or implementing React best practices.
Also in 4 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 repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
2
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
- Very specific: line 31
Read the code and identify concrete issues with file:line, explaining what fails and the consequence (silent data loss, crash, leak, hang).
- Distinctive: line 33
Don't invent a logging or error framework: Use what the project already uses (its logger, error types, Result/Either).
- Distinctive: line 37
Never make an error path quieter — removing or weakening handling is the opposite of the goal.
“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 hotspots
!grep -rnE "catch ?\\([^)]*\\) ?\\{ ?\\}|except:|except Exception: ?pass|catch \\{ ?\\}|rescue ?=> ?nil" --include='*.*' . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build|test' | head -20
!grep -rlE "async |await |\\.then\\(|Promise" --include='*.ts' --include='*.js' . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build' | head -10
Instructions
Audit error handling in $ARGUMENTS (or the highest-risk modules — I/O, network, parsing, async boundaries — if none given) and fix the real gaps. Match the project's existing error conventions.
What to look for
- Swallowed errors — empty
catch/except: pass/rescue nilthat hide failures; catches that log nothing and continue in a broken state. - Over-broad catches — catching everything when only a specific error is expected, masking bugs (e.g. catching a
TypeErroryou meant to let crash). Catch narrowly. - Unhandled async — un-awaited promises, missing
.catch, fire-and-forget tasks, unhandled rejections,asyncfunctions whose throws nobody handles. - Missing boundaries — no top-level handler for a request/job/CLI; UI without an error boundary; resources (files, connections, locks) not released on the error path (use
finally/with/defer/RAII). - Lost context — re-throwing that erases the stack or original cause (use error chaining:
raise ... from e,{ cause }); generic messages that don't say what failed. - Leaked internals — raw exceptions, stack traces, or DB errors surfaced to users/clients instead of a safe message + logged detail.
- Control flow via exceptions — using exceptions for normal, expected outcomes where a return/Result type is clearer.
Method
- Read the code and identify concrete issues with
file:line, explaining what fails and the consequence (silent data loss, crash, leak, hang). - Fix the clear ones preserving behavior on the success path: narrow the catch, handle or propagate intentionally, await/return promises, add
finallycleanup, chain the cause, replace a leaked internal with a safe message + log. - Don't invent a logging or error framework. Use what the project already uses (its logger, error types, Result/Either). If there's no convention for something (e.g. no top-level handler exists), propose one and confirm before adding it broadly.
Rules
- Never make an error path quieter — removing or weakening handling is the opposite of the goal. Every error should end up handled, propagated deliberately, or logged with context; never silently dropped.
- Catch as narrowly as the situation allows; don't blanket-catch to make code "safe" — that hides bugs.
- Preserve the original error and its stack/cause when re-throwing or wrapping.
- Match the project's existing error types, logger, and patterns rather than introducing new ones unprompted.
- Summarize: issues found by severity, what you fixed, and any places that need a human decision (retry policy, user-facing copy, whether a failure should be fatal).
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.

