Best for
- Use when "check Sentry", "fix Sentry issues", "review production errors", or "improve error tracking".
kensaurus/cursor-kenji/skills/debug-sentry-monitor/SKILL.md
Operate Sentry: triage/fix unresolved issues, reduce noise, audit instrumentation, and monitor after deploy. Use when "check Sentry", "fix Sentry issues", "review production errors", or "improve error tracking". One named bug through PR → workflow-fix-and-ship. Plan-only observability → plan-error-handling.
Decision brief
Degree of freedom: MIXED. Triage bucket and root cause [HIGH freedom]; resolve-only-after-verify [LOW freedom — run exactly].
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/kensaurus/cursor-kenji --skill "skills/debug-sentry-monitor"Inspect the Agent Skill "debug-sentry-monitor" from https://github.com/kensaurus/cursor-kenji/blob/28a0bd8403c950f58ed063d47a858ee3493b0038/skills/debug-sentry-monitor/SKILL.md at commit 28a0bd8403c950f58ed063d47a858ee3493b0038. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Observe — issue type, frames, users, first-seen, release 2. Interpret — app frame vs extension noise; new vs regression 3. Classify — Noise / Code Bug / Data Bug / Performance / Regression / Config Gap 4. Severity — regressions and multi-user crashes first; never resolve Perf…
Before making any Sentry MCP calls, discover the project's Sentry setup.
Run these two MCP calls in parallel:
For each issue with 1 event or 0 users impacted:
Classify each issue into exactly one bucket:
Permission review
The documentation includes network, browsing, or remote request actions.
REGION_URL: [detected or ask user — typically https://us.sentry.io or https://de.sentry.io]The documentation includes network, browsing, or remote request actions.
| **Performance** | Slow DB query, N+1 API calls, large HTTP payload, high LCP/INP | Do NOT resolve — flag for manual follow-up |The documentation asks the agent to run terminal commands or scripts.
git log --oneline <previous-release-tag>..<current-release-tag>The documentation asks the agent to read local files, directories, or repositories.
**Walk up the call chain**: For each app-code frame in the stacktrace, read the file and function.The documentation asks the agent to read local files, directories, or repositories.
Read the project's Sentry config file (detected in Step 0c). Locate the `ignoreErrors` array or `beforeSend` function.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 97/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 9 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Degree of freedom: MIXED. Triage bucket and root cause [HIGH freedom];
resolve-only-after-verify [LOW freedom — run exactly].
Triage, fix, and audit Sentry on any project via the sentry MCP. Auto-detects config.
Observe: 80 events of
TypeError: undefined.emailon/account, started at release1.14.0. Interpret: app frames in the profile card; correlates with the onboarding PR. Classify: Data Bug + Regression — API null for incomplete profiles. Fix: handle null at the contract; do not resolve until the fix is committed and the loop is green.
?. / swallowed catch is not the sole fixworkflow-fix-and-shipNEVER resolve an issue without a verified fix. Resolving means "this will not happen again." If you cannot prove that, leave it unresolved.
NEVER apply a band-aid fix. Wrapping code in try/catch, adding
?.chains, or guarding withArray.isArray()are symptom suppressors. Only use defensive coding after fixing the root cause, to harden against truly unpredictable external input.
Understand the WHY before touching any code.
Research before fixing non-trivial bugs. Use
firecrawl_search+firecrawl_scrapeto find best practices for the specific error pattern before implementing a fix.
Before making any Sentry MCP calls, discover the project's Sentry setup.
First, try to detect from local config files. Search for these (in order):
.sentryclirc — contains [defaults] with org and projectsentry.properties — contains defaults.org and defaults.project.env, .env.local, .env.production — look for SENTRY_ORG, SENTRY_PROJECT, SENTRY_DSN, SENTRY_AUTH_TOKENsentry.client.config.ts, sentry.client.config.js — Next.js Sentry configsentry.server.config.ts, sentry.server.config.js — Next.js server Sentry confignext.config.js / next.config.mjs — withSentryConfig() wrapperpackage.json — check for @sentry/* packages to detect SDKIf local detection fails, use the MCP to discover:
sentry:find_organizations
Then for the target org:
sentry:find_projects
{
"organizationSlug": "<ORG_SLUG>",
"regionUrl": "<REGION_URL>"
}
Read package.json (or equivalent) to determine:
| Package | Framework |
|---|---|
@sentry/nextjs | Next.js |
@sentry/react | React SPA |
@sentry/vue | Vue.js |
@sentry/svelte | SvelteKit |
@sentry/node | Node.js backend |
@sentry/browser | Vanilla JS |
sentry-sdk (pip) | Python |
sentry_sdk (pip) | Python |
sentry-ruby | Ruby |
@sentry/angular | Angular |
Search for the Sentry initialization and noise filtering:
Grep for: Sentry.init, sentryInit, initSentry
Grep for: ignoreErrors, beforeSend, denyUrls
Grep for: ErrorBoundary, error-boundary, errorBoundary
Grep for: logger, logging, winston, pino
Grep for: web-vitals, webVitals, reportWebVitals
ORG_SLUG: [detected or ask user]
PROJECT_SLUG: [detected or ask user]
REGION_URL: [detected or ask user — typically https://us.sentry.io or https://de.sentry.io]
FRAMEWORK: [detected from packages]
PLATFORM: [browser | server | hybrid]
SENTRY_CONFIG: [path to Sentry.init file]
NOISE_FILTER: [path to file with ignoreErrors/beforeSend]
ERROR_BOUNDARY: [path to error boundary component, if any]
LOGGER: [path to logging utility, if any]
If any critical values cannot be detected, ask the user.
Run these two MCP calls in parallel:
sentry:search_issues
{
"organizationSlug": "<ORG_SLUG>",
"projectSlugOrId": "<PROJECT_SLUG>",
"regionUrl": "<REGION_URL>",
"query": "all unresolved issues from the last 7 days",
"limit": 50
}
sentry:search_events
{
"organizationSlug": "<ORG_SLUG>",
"projectSlug": "<PROJECT_SLUG>",
"regionUrl": "<REGION_URL>",
"query": "count of errors grouped by error type in the last 7 days",
"limit": 50
}
Also check for regressions (issues that were resolved but re-opened):
sentry:search_issues
{
"organizationSlug": "<ORG_SLUG>",
"projectSlugOrId": "<PROJECT_SLUG>",
"regionUrl": "<REGION_URL>",
"query": "regressed issues in the last 14 days",
"limit": 20
}
If no issues are found, report "No unresolved issues in the last 7 days" and proceed to the Architecture Audit (Step 8).
For each issue with >1 event or >0 users impacted:
sentry:get_sentry_resource
{
"organizationSlug": "<ORG_SLUG>",
"resourceType": "issue",
"resourceId": "<ISSUE_ID>"
}
Batch up to 4 calls in parallel per round.
For hard-to-diagnose issues, also fetch breadcrumbs:
sentry:get_sentry_resource
{
"organizationSlug": "<ORG_SLUG>",
"resourceType": "breadcrumbs",
"resourceId": "<ISSUE_ID>"
}
And optionally use Seer for AI-assisted root cause analysis:
sentry:analyze_issue_with_seer
{
"organizationSlug": "<ORG_SLUG>",
"regionUrl": "<REGION_URL>",
"issueId": "<ISSUE_ID>"
}
For understanding issue distribution, check tag values:
sentry:get_issue_tag_values
{
"organizationSlug": "<ORG_SLUG>",
"regionUrl": "<REGION_URL>",
"issueId": "<ISSUE_ID>",
"tagKey": "browser"
}
Common tag keys: url, browser, browser.name, os, environment, release, device, user.
Classify each issue into exactly one bucket:
| Bucket | Signals | Action |
|---|---|---|
| Noise | Extension frames, chunk load errors, browser built-in errors, dev-only environment tag, no app frames in stacktrace | Add noise filter, resolve in Sentry |
| Code Bug | TypeError, ReferenceError, unhandled rejection with app frames, missing function/property | Full root cause analysis (Step 4), fix, verify, resolve |
| Data Bug | Unexpected null/undefined from API, malformed response, stale cache, race condition | Trace data flow end-to-end (Step 4), fix at source |
| Performance | Slow DB query, N+1 API calls, large HTTP payload, high LCP/INP | Do NOT resolve — flag for manual follow-up |
| Regression | Previously resolved issue that re-opened | Highest priority — the original fix was incomplete |
| Config Gap | Missing Sentry feature (logging, metrics, feedback, replay), bad sampling | Implement in config files, resolve |
Priority order: Regressions first, then Code Bugs and Data Bugs, then Noise, then Config Gaps. Performance is always deferred.
For any issue classified as Code Bug, Data Bug, or Regression that meets either threshold:
Run Sentry's AI root-cause analysis before manual investigation:
sentry:analyze_issue_with_seer
{
"organizationSlug": "<ORG_SLUG>",
"issueId": "<ISSUE_ID>"
}
Seer provides:
How to use Seer results:
Note: Seer results are cached — subsequent calls for the same issue return instantly. Analysis for new issues takes ~2-5 minutes.
Do NOT skip or shortcut this step.
From the Sentry issue details, extract:
sentry:find_releases
{
"organizationSlug": "<ORG_SLUG>",
"regionUrl": "<REGION_URL>",
"projectSlug": "<PROJECT_SLUG>"
}
If the issue started after a specific release, check what changed in that release:
git log --oneline <previous-release-tag>..<current-release-tag>
git log --oneline -20 -- <file> on culprit files.For non-trivial bugs, research the correct fix pattern:
firecrawl:firecrawl_search
{
"query": "<framework> <error-type> best practice fix <current year>",
"limit": 5,
"sources": [{ "type": "web" }]
}
Then scrape the most authoritative result:
firecrawl:firecrawl_scrape
{
"url": "<best-result-url>",
"formats": ["markdown"],
"onlyMainContent": true
}
Before writing any fix, state:
| Anti-Pattern | Why It's Wrong | Do Instead |
|---|---|---|
Adding ?. to suppress TypeError | Hides the null; downstream gets undefined | Fix why the value is null |
| try/catch that swallows | Error still happens, user sees broken state | Fix the error; if unrecoverable, show user-facing message + re-report |
Array.isArray() guard | Checking consumer instead of fixing producer | Fix the producer |
?? [] or ?? {} fallback | Masks data loading issues | Handle loading/error states explicitly |
Filtering in beforeSend | Muting a real bug | Only filter genuinely external noise |
| Resolving without deploying | Error recurs next session | Only resolve after fix is committed |
Before applying the fix:
Read the project's Sentry config file (detected in Step 0c). Locate the ignoreErrors array or beforeSend function.
Universal noise patterns (safe to add to any web project):
// Browser/extension noise
/^Script error/,
"ResizeObserver loop",
"Non-Error promise rejection captured",
/vid_mate_check/,
/_avast_submit/,
// Network noise (external)
"Failed to fetch",
"Load failed",
"net::ERR_",
"AbortError",
"The operation was aborted",
"cancelled",
// Chunk loading (deployment race)
"ChunkLoadError",
"Loading chunk",
"Failed to fetch dynamically imported module",
Framework-specific noise (add only if the framework is detected):
React/Next.js:
"Hydration failed",
"server rendered HTML didn't match",
"Minified React error #418",
"Minified React error #423",
"Minified React error #425",
HMR/Dev-only:
"Fast Refresh",
"performing full reload",
"Parsing ecmascript source code failed",
Service Worker:
"ServiceWorker",
"Failed to register a ServiceWorker",
Noise validation: Before classifying something as noise, verify:
Do NOT attempt. Do NOT resolve. Leave unresolved. Note in the summary.
Implement in the relevant config file based on detected framework.
You may only resolve an issue if ALL of the following are true:
?., try/catch, or type guards as the sole fixIf any checkbox fails, leave the issue unresolved and add it to "Requires Manual Follow-Up."
For each verified fix:
sentry:update_issue
{
"organizationSlug": "<ORG_SLUG>",
"regionUrl": "<REGION_URL>",
"issueId": "<ISSUE_ID>",
"status": "resolved"
}
Batch up to 4 calls in parallel. Do NOT resolve performance issues.
After triaging existing issues (or if no issues exist), audit the Sentry setup itself to identify monitoring gaps and architectural shortcomings.
Read the Sentry config file(s) detected in Step 0c. Check each setting:
| Setting | What to Check | Recommendation |
|---|---|---|
dsn | Is it set from env var, not hardcoded? | Use process.env.SENTRY_DSN or equivalent |
environment | Is it dynamic? | Must read from env var, not hardcoded |
release | Is it set? | Required for deploy correlation and regression detection |
tracesSampleRate | Is it > 0? Is it < 1.0 in production? | 0.1-0.3 for production, 1.0 for dev |
replaysSessionSampleRate | Is it configured? | 0.1 for production |
replaysOnErrorSampleRate | Is it configured? | 1.0 (capture all error replays) |
integrations | Are framework-appropriate integrations present? | See framework-specific recommendations below |
beforeSend | Is it filtering too aggressively? | Should only filter genuinely external noise |
ignoreErrors | Are patterns appropriate? | Cross-check against universal noise list |
Framework-specific integration checks:
| Framework | Expected Integrations |
|---|---|
| Next.js | Auto-configured by @sentry/nextjs — check withSentryConfig in next.config |
| React SPA | BrowserTracing, Replay |
| Node.js | Http, Express/Fastify/Koa, Postgres/Prisma |
| Python | DjangoIntegration / FlaskIntegration, SqlalchemyIntegration |
| Vue | BrowserTracing, Replay, Sentry.vueRouterInstrumentation |
Complement: Sentry catches code-thrown errors. Mushi Mushi catches user-felt friction that never triggers an exception — dead buttons, 12-second screens, broken layouts on one device. Install alongside Sentry:
npx mushi-mushi.
Frequently asked questions
Degree of freedom: MIXED. Triage bucket and root cause [HIGH freedom]; resolve-only-after-verify [LOW freedom — run exactly].
The source record exposes this install command: npx skills add https://github.com/kensaurus/cursor-kenji --skill "skills/debug-sentry-monitor". Inspect the command and pinned source before running it.
Static rules flagged network, exec-script, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.
microsoft/Sico
Execute Android UI workflows on a sandbox device, review results, and produce a structured execution report.
upex-galaxy/agentic-qa-boilerplate
Execute regression test suites via CI/CD, analyze results, classify failures, and produce GO/NO-GO release decisions. Use when running regression, smoke, or sanity suites through GitHub Actions, monitoring workflow runs, downloading Allure or Playwright artifacts, classifying failures (REGRESSION vs FLAKY vs KNOWN vs ENVIRONMENT vs NEW TEST), computing pass-rate and trend metrics, deciding release readiness, generating executive quality reports, or creating regression issues. Triggers on: run re
K-Dense-AI/scientific-agent-skills
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.