/bug-handler:audit-error-handlingfrom Bug Handler
Use when reviewing code in an app that depends on bug_handler - PR review, "check our error handling", pre-release audits, or "are we using bug_handler correctly". Finds violations of the guard contract: string errors in state, unreported catches, raw exceptions crossing repository boundaries, missing source labels, misused isReportable.
Ships in Bug Handler. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review-mode counterpart to the guard-workflow skill: systematically find
violations, rank them, and report with file:line evidence. Do not rewrite code
unless asked - the deliverable is findings.
Determine the audit surface (a PR diff, a feature directory, or lib/). For a diff, audit changed files plus the repositories/state they touch. Record the app's wrapper conventions (guard mixins, base cubits/notifiers, app exception bases) so findings respect local idiom instead of demanding raw package calls.
catch must rethrow a BaseException subclass.
Find: grep -n "catch (" <repo files> then inspect each: throws of
Exception(, StateError(, app-local implements Exception types, or bare
rethrow of foreign errors are findings. Severity: high (events lose
severity/user-vs-dev split and bypass reporting).String? errorMessage/
String error set from e.userMessage/e.toString().
Find: grep -rn -E "String\??\s+(errorMessage|error\b)" <state files> plus
freezed factories .error(String. Severity: high for new code, medium for
pre-existing shared containers (report, do not churn).AsyncValue.guard(, hand-rolled _guarded helpers, or
Future.catchError where bug_handler reporting was intended.
Find: grep -rn "AsyncValue.guard(\|catchError(" lib/. Severity: medium-high.source: labels. guard/guardSync calls without source:,
or labels that are not stable dotted ClassName.method strings.
Find: grep -rn -A2 "guard(\|guardSync(" lib/ | grep -v "source:" (inspect
matches; multiline calls need manual read). Check whether the missing label
affects the app’s triage or downstream grouping. Local dedupe uses the
first fingerprint, normally the exception type.isReportable misuse. Code that sets isReportable: false expecting
suppression, or reporters that never check it. The pipeline does NOT enforce
the flag (../../references/policy-and-delivery.md). Severity: medium;
pair each finding with where enforcement should live (reporter skip or
severity).userMessage (e.g. userMessage: 'somethingWentWrong'
camelCase key shapes) that render raw if unmapped. Find: constructor calls
whose userMessage has no spaces and matches [a-z]+[A-Z]. Severity: medium.parser. fromJson/fromMap invocations inside repositories
done bare where the app convention uses parser(() => ..., data: raw).
Severity: low-medium (errors arrive as FormatException/TypeError instead of
typed ParsingException with payload).grep -rn "runAppWithReporting\|FlutterError.onError\|PlatformDispatcher" lib/.
Severity is high if one error produces two deliveries.Group by severity (high/medium/low). Each finding: file:line, one-sentence
violation, one-sentence consequence, the concrete fix direction (respecting app
idiom). End with: counts per category, the top 3 fixes by impact, and explicitly
list categories that came back CLEAN so coverage is visible. If the surface was
a diff, do not report pre-existing issues outside it except as a short
"pre-existing, out of scope" note.
migrate-legacy-api skill and stop auditing files that are pre-migration."Review this PR adding checkout error handling" -> scope = diff files + their
repositories; findings: checkout_repository.dart:84 catches DioException and
throws app-local CheckoutException implements Exception (high, breaks
contract - suggest extending ApiException); checkout_cubit.dart:41 stores
e.userMessage string (high - store the exception, render userMessage in UI);
guard call missing source at checkout_cubit.dart:39 (medium). Categories 6-12
clean. Top fix: make CheckoutException extend ApiException.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub omar-hanafy/bug_handler --plugin bug-handler8 skills in this plugin
/diagnose-reportingUse when bug_handler reports are missing, duplicated, delayed, or unexpected - "nothing arrives in Sentry", "capture doesn't send", "errors only show sometimes", outbox files piling up in bug_report_outbox, StateError about initialization, or events arriving that should have been suppressed./extend-pipelineUse when connecting bug_handler to a delivery backend or enriching its reports - writing a custom Reporter (Sentry, Crashlytics, Slack, first-party HTTP endpoint), a custom ContextProvider (feature/session/cart context), or an EventTransform. Also use when someone tries to use the shipped Sentry/Crashlytics "adapters" (they are empty placeholder files)./Other plugins' skills for the same job