From sentry
Fetches Sentry error context using sentry-cli and helps diagnose and fix bugs in the current codebase. Use when the user wants to investgate or fix a Sentry error.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sentry:skills/sentryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Required:**
Required:
uv tool install git+https://github.com/cased/sentry-cli
SENTRY_AUTH_TOKEN - Your Sentry authentication tokenSENTRY_ORG - Your Sentry organization slug/sentry <issue-id>
Examples:
/sentry PROJ-123/sentry 12345678If the user provides a Sentry URL instead of an issue ID, extract the numeric issue ID from the URL before using the CLI:
| URL Format | Issue ID |
|---|---|
https://cased-sentry.sentry.io/issues/7170946994/ | 7170946994 |
https://sentry.io/organizations/my-org/issues/12345678/ | 12345678 |
https://sentry.io/issues/12345678/?project=123 | 12345678 |
The issue ID is the numeric portion in the /issues/<id>/ path segment. Strip any trailing slashes or query parameters.
When this skill is invoked and there is a valid issue ID:
Fetch the Sentry error context by running:
sentry-cli context $ARGUMENTS
Parse the Sentry output and identify:
> are in-app code and the most likely location of the bugLook for any CLAUDE.md or AGENT.md files:
Use the kit skill to understand the relevant code:
/kit-cli symbols <file> on files from the Key Application Frames to understand the structure/kit-cli search <function-name> to find usages and callers of the failing function/kit-cli file-tree if you need to understand the overall project structure/kit-cli dependencies <file> to understand what the failing code depends onRead and trace the code path:
Trace upstream to the data source (CRITICAL - do not skip):
Identify the root cause (not just the symptom):
Explain the root cause clearly:
Design a fix that resolves the underlying issue:
Present the fix to the user:
Before proposing a fix, verify:
context command output is markdown optimized for AI consumption> - these are in-app code>) provide context but the fix is usually in your codeThese "fixes" mask bugs when used as the sole fix:
| Anti-Pattern | Why It's Bad |
|---|---|
try { ... } catch { /* ignore */ } | Silently hides all errors |
| Null check only at crash site | Allows bad data to flow through system |
| Defensive defaults without fixing source | Masks data integrity issues |
| Optional chaining to suppress crashes | Converts crashes into silent wrong behavior |
Key distinction: These same patterns become appropriate after fixing the root cause, as defense in depth. The anti-pattern is using them instead of fixing the source, not using them in addition to fixing the source.
After fixing the root cause, consider adding defensive fallbacks when:
Fix the source first, then add safety nets where appropriate for the codebase.
When implementing fixes:
The goal is a fix that looks like it belongs in the codebase, not one that stands out as different.
See the examples/ directory for detailed walkthroughs of diagnosing and fixing different classes of Sentry errors. Each example demonstrates bad approaches (fixing symptoms), good approaches (tracing to root cause), and comprehensive fixes.
| Class | File | Description |
|---|---|---|
| Crashes & Unhandled Exceptions | crashes-and-unhandled-exceptions.md | Process dies or request fails hard: null dereferences, type errors, uncaught promise rejections, index out of bounds |
| State & Concurrency Bugs | state-and-concurrency-bugs.md | Timing and ordering issues: race conditions, stale closures, double submissions, lost updates |
| Data Integrity & Serialization | data-integrity-and-serialization-bugs.md | Malformed or mismatched data: enum drift, JSON schema mismatches, date parsing, version skew |
| Configuration & Environment | configuration-and-environment-bugs.md | Misconfiguration issues: missing env vars, feature flag problems, region-specific config drift |
| Dependency & Third-Party Failures | dependency-and-third-party-failures.md | External system issues: payment provider timeouts, SDK breaking changes, API contract changes |
npx claudepluginhub cased/claude-code-plugins --plugin sentryAnalyzes and fixes production issues from Sentry using MCP. Methodically investigates stack traces, breadcrumbs, and traces to identify root causes of errors and exceptions.
Queries Sentry errors, triages issues, and checks release health via REST API. Useful for debugging exceptions, investigating crashes, stack traces, and monitoring stability.
Queries Sentry API to list issues, inspect events, and summarize production errors using bundled Python script. Requires SENTRY_AUTH_TOKEN for read-only access.