Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/markmdev/meridian/tree/main/skills/error-audit
SKILL.md
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/catchin 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)orif (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.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
create-docs
Create or update .meridian/docs/ knowledge files for a module or directory. Produces reference docs with frontmatter for context routing.
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 requirements capture, and automated plan validation via plan-reviewer (must score 9+). Use for new features, refactoring, architecture changes, migrations, or any non-trivial implementation work.
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.
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.
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.
verl-rl-training
Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.
Didn't find tool you were looking for?