/error-audit
Audit code for silent error swallowing, fallbacks to degraded alternatives, backwards compatibility shims, and UI that fails to show errors to the user. Finds and fixes all occurrences in the specified scope.
$ npx -y skills add markmdev/meridian --skill error-audit --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/error-audit
Context preview
The summary Claude sees to decide when to auto-load this skill.
Audit code for silent error swallowing, fallbacks to degraded alternatives, backwards compatibility shims, and UI that fails to show errors to the user. Finds and fixes all occurrences in the specified scope.
SKILL.md
error-audit.SKILL.mdname: error-audit
description: Audit code for silent error swallowing, fallbacks to degraded alternatives, backwards compatibility shims, and UI that fails to show errors to the user. Finds and fixes all occurrences in the specified scope.
Error Audit
The core principle: **every error belongs to the user**. Not to a catch block, not to a console, not to a null return. Scan the specified code, fix every violation, report what changed.
Step 0: Understand the app's error mechanisms
Before fixing anything, identify how this app surfaces errors to users — toast notifications, error banners, error boundaries, returned error states, alert dialogs, inline messages. Use these patterns exclusively. Don't invent a new one.
Anti-patterns to find and fix
**Silent error swallowing — backend/logic layer:**
- Empty catch blocks: `catch(e) {}`
- Log-and-continue: `catch(e) { console.error(e) }` with execution proceeding normally
- `.catch(() => {})` on promises
- Functions returning `null`, `undefined`, or empty defaults on failure instead of throwing
**Silent error swallowing — UI layer:**
- Data fetching catches an error and returns null/empty → component renders blank with no explanation
- Error boundaries that catch but show nothing (or a generic "something went wrong" with no recovery path)
- `try/catch` in a loader or server action that swallows the error and returns partial/empty data
- Async operations where the UI has no error state at all — success renders fine, failure renders identical to loading or empty
**Fallbacks to degraded alternatives:**
- Catch → silently switch to a worse model, API, or service
- Catch → return cached or stale data without telling the user
- Catch → offline/degraded mode with no visible indication
**Backwards compatibility shims:**
- `if (legacyFormat)` or `if (oldVersion)` branches
- Deprecated fields still being populated alongside new ones
- Old code paths running in parallel with new ones
**Config defaults that hide misconfiguration:**
- `process.env.X || 'fallback'` for required values — missing required config is a startup crash, not a default
- Optional environment variables that should be required
**Optional chaining hiding missing required data:**
- `user?.profile?.name ?? 'Guest'` when profile must always exist — the absence is a bug, not an edge case to handle silently
Fix principles
- Throw or re-throw rather than catch-and-continue
- In the UI: every error path must render something visible — use the app's established error display mechanism
- Required config missing at startup → log a clear message and exit
- Delete fallback branches — don't comment them out
- When unsure if a fallback was intentional, flag it in your report rather than guessing
Reference files
- `references/error-patterns.md` — Concrete anti-patterns with structural descriptions, bad/good code examples, and false positive notes. Read this before starting the audit.
Report
After fixing, summarize by file: what was found, what the fix was. Be specific — file paths and the pattern removed.
Read more
name: error-audit description: Audit code for silent error swallowing, fallbacks to degraded alternatives, backwards compatibility shims, and UI that fails to show errors to the user. Finds and fixes all occurrences in the specified scope.
Error Audit
The core principle: **every error belongs to the user**. Not to a catch block, not to a console, not to a null return. Scan the specified code, fix every violation, report what changed.
Step 0: Understand the app's error mechanisms
Before fixing anything, identify how this app surfaces errors to users — toast notifications, error banners, error boundaries, returned error states, alert dialogs, inline messages. Use these patterns exclusively. Don't invent a new one.
Anti-patterns to find and fix
**Silent error swallowing — backend/logic layer:**
- Empty catch blocks: `catch(e) {}`
- Log-and-continue: `catch(e) { console.error(e) }` with execution proceeding normally
- `.catch(() => {})` on promises
- Functions returning `null`, `undefined`, or empty defaults on failure instead of throwing
**Silent error swallowing — UI layer:**
- Data fetching catches an error and returns null/empty → component renders blank with no explanation
- Error boundaries that catch but show nothing (or a generic "something went wrong" with no recovery path)
- `try/catch` in a loader or server action that swallows the error and returns partial/empty data
- Async operations where the UI has no error state at all — success renders fine, failure renders identical to loading or empty
**Fallbacks to degraded alternatives:**
- Catch → silently switch to a worse model, API, or service
- Catch → return cached or stale data without telling the user
- Catch → offline/degraded mode with no visible indication
**Backwards compatibility shims:**
- `if (legacyFormat)` or `if (oldVersion)` branches
- Deprecated fields still being populated alongside new ones
- Old code paths running in parallel with new ones
**Config defaults that hide misconfiguration:**
- `process.env.X || 'fallback'` for required values — missing required config is a startup crash, not a default
- Optional environment variables that should be required
**Optional chaining hiding missing required data:**
- `user?.profile?.name ?? 'Guest'` when profile must always exist — the absence is a bug, not an edge case to handle silently
Fix principles
- Throw or re-throw rather than catch-and-continue
- In the UI: every error path must render something visible — use the app's established error display mechanism
- Required config missing at startup → log a clear message and exit
- Delete fallback branches — don't comment them out
- When unsure if a fallback was intentional, flag it in your report rather than guessing
Reference files
- `references/error-patterns.md` — Concrete anti-patterns with structural descriptions, bad/good code examples, and false positive notes. Read this before starting the audit.
Report
After fixing, summarize by file: what was found, what the fix was. Be specific — file paths and the pattern removed.
Meridian makes Claude Code more reliable on real projects. It adds persistent project context, smarter session handoff, and lightweight workflow enforcement so Claude is less likely to lose the plot halfway through a long task.
Other skills on meridian.
- /add-frontmatter
Scan all .md files in the project and add or fix YAML frontmatter (summary + read_when) so they can be discovered by context routers like Reflex.
Open skill - /create-docs
Create or update .meridian/docs/ knowledge files for a module or directory. Produces reference docs with frontmatter for context routing.
Open skill - /observability-audit
Audit code for observability gaps — debug logs left in, errors caught without being logged, missing context on log entries, untracked slow operations. Uses the app's existing observability tooling exclusively.
Open skill - /planning
Interview-driven planning methodology that produces implementation-ready plans. Always use this skill INSTEAD of EnterPlanMode — it provides structured interviewing (20-40 clarifying questions), exhaustive parallel codebase exploration (5-15 Explore agents), verbatim
Open skill - /ux-states-audit
Audit UI code for missing loading states, empty states, and error states. Every async operation and data-driven UI must handle all three. Finds gaps and implements the missing states using the app's existing patterns.
Open skill

