/bug-handler:diagnose-reportingfrom Bug Handler
Use 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.
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.
The pipeline drops events silently by design (captureSafely and guards swallow
every failure). Diagnosis is a fixed elimination order - do NOT jump to reporter
code first. Ground truth for every gate:
../../references/policy-and-delivery.md.
BugReportClient.instance.initialize (or
runAppWithReporting) awaited before the failing capture? capture throws
StateError when uninitialized. captureSafely skips capture. A guard
still runs the action and returns its result. Check
BugReportClient.instance.isInitialized at the capture site.
Also: a SECOND initialize call is silently ignored; there is no reset.AsyncValue.guard,
or app-local exception types caught before any guard means nothing reaches
the client. Search the failing flow for guard(/captureSafely(/capture(.Policy.environments non-empty and current env not in it;minSeverity index (critical 0, error 1,
warning 2, info 3 - minSeverity: error DROPS warnings and info; both
ValidationException and NavigationException default to warning);reportHandled: false drops everything guards capture (guards
mark handled: true; only bindings-caught uncaught errors are false);fingerprints.first = runtimeType. Distinct
errors of one type collapse to the first per window;flush().ConsoleReporter, an intentional skip returning true, or a completed
share handoff can acknowledge an event even when a remote reporter fails.Outbox().pending() on the device or in the same browser
origin that queued the report. Check when the app calls
BugReportClient.instance.flush() and which reporter acknowledges the retry.isReportable: false does NOT suppress delivery - the pipeline never reads
the flag. Suppress via severity (minSeverity: error while the type is
warning/info) or a skip (return true) in the custom Reporter.additionalContext keys overwrite provider context keys of the same name.../../references/production-patterns.md.// 1. Are we initialized, and do gates pass? (bypasses capture-site doubts)
debugPrint('init=${BugReportClient.instance.isInitialized}');
final ok = await BugReportClient.instance.report(
await BugReportClient.instance.createEvent(
UnexpectedException(devMessage: 'diagnose probe ${DateTime.now()}'),
),
);
debugPrint('report() returned $ok'); // false = gated/failed; see order above
Vary one dimension at a time: severity (severity: Severity.critical),
type (fresh exception class defeats dedupe), environment. Remove probes after.
Use a temporary documents directory via a path-provider stub for native queue tests. For browser persistence, exercise a page reload on the same origin.
This skill's output is a diagnosis: state WHICH gate or wiring ate the events, with the evidence (probe output, config values). Propose the minimal fix (config change, flush call site, reporter skip-logic fix) and apply it only as the user confirms or the task clearly includes fixing.
"Sentry shows nothing from staging" -> isInitialized true; probe report()
returns false; Policy(environments: {'prod'}) found in config - staging is
gated out. Fix options: add 'staging' to the set or leave by design; chosen fix
verified with the probe returning true and the event visible in Sentry.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub omar-hanafy/bug_handler --plugin bug-handler8 skills in this plugin
/audit-error-handlingUse 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./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