Skip to content
Hidden Logic Lab

Triage a Sentry issue into a minimal fix brief

Cursor or Claude Code follows a SKILL.md from a Sentry issue link: stack, breadcrumbs, and release — then writes a minimal repro and first-fix PR brief without catch-all error swallowing.

·Coding·35 min·Working

A sentry-triage skill, a repro steps block a human can run in five minutes, and a PR brief that names the failing path and forbids empty catch blocks as the default fix.

  1. 1

    Paste a redacted production issue

    Tune breadcrumb and release steps on a real error. Training only on synthetic stacks misses source-map and release-tag gaps.

  2. 2

    Commit the skill near observability docs

    Link from RUNBOOK or AGENTS.md for tasks tagged bug or sentry. On-call should load the same file as feature devs.

  3. 3

    Reject catch-all PRs

    If the agent’s brief only says handle errors better, send it back through the skill with the anti-patterns section quoted.

The prompt to paste

Write SKILL.md for triaging a Sentry issue into a minimal reproduction and a first-fix pull request brief. This is fix preparation, not closing the issue in Sentry without a code change.

Issue context (paste when using):
[Sentry issue URL or id, title, first seen / last seen, release version, environment]
[stack trace excerpt, breadcrumb trail, user impact count if shown — redact PII]

Repository context:
[repo layout, how to run app locally, test command]
[sentry SDK and release tagging pattern]

SKILL.md sections:
1. Purpose — turn noisy stack traces into a bounded fix with repro evidence; no silent catch-all patches.
2. When to use — new or regressed issues above [threshold] events or on-call tagged; when not to use — known ignored noise without a tracking ticket.
3. Hard rules:
   - Redact emails, IPs, auth tokens from pasted events; never commit customer PII into repro docs.
   - Do not propose catch (e) {} or blanket Sentry.ignoreErrors without naming the specific false-positive case.
   - Do not mark fixed until a test or repro steps prove the failing path.
4. Required inputs: issue link, release/commit sha if known, and whether the error is client, server, or worker.
5. Triage steps the agent must follow and document:
   - Summarize failure in one sentence: what threw, where, under what request/job shape.
   - Map stack frames to repo files; flag if symbolicated frames missing or source maps stale.
   - From breadcrumbs: list the last user/server actions before crash (max 5 bullets).
   - Hypothesis list (max 3): each with confidence low/med/high and what evidence would falsify it.
   - Minimal repro: numbered steps, expected vs actual, smallest data fixture — write [cannot repro locally] if stuck and name what is missing.
   - First-fix brief for PR: scope (files likely touched), proposed change type (guard, null check, retry, config), test to add, out of scope.
6. Anti-patterns section: swallowing errors, logging without rethrow when contract requires failure, fixing symptoms in middleware while root cause is downstream.
7. Two example prompts: null reference in API handler vs timeout in background job.
8. Done means: repro or explicit blocker documented, PR brief ready, no catch-all fix suggested without alternative, Sentry issue id in brief header.

Rules:
- Use frame paths from the issue paste only; [confirm path] if repo layout differs.
- Do not claim a fix is verified without naming command run and result.
- Markdown only.

High event volume does not mean high user impact. The skill should separate noisy benign errors from customer-blocking paths before proposing code changes.

Sample case written by Hidden Logic Lab. Not affiliated with Cursor or Claude Code or Sentry.

More in Coding

Get new cases in your inbox

Weekly notes on new use cases and agent workflows. No product pitches.

Occasional notes on new cases. No product pitches in the first note.