Fix Production Errors Without Leaving Your Terminal

Sentry plugin for Claude Code — triage, debug, and fix live crashes instantly with AI

Claude Code Plugin MIT License v1.0.0 Node.js 18+
> /sentry:triage Fetching top Sentry issues... #1 [fatal] ISSUE-8821 TypeError: Cannot read properties of null File: src/checkout/payment.js line 142 Events: 847 times · Last seen: 2 minutes ago #2 [error] ISSUE-8819 UnhandledPromiseRejection in order.service.ts File: src/orders/order.service.ts line 89 Events: 203 times · Last seen: 14 minutes ago Which issue should I fix? > fix #1 Reading stack trace... Opening src/checkout/payment.js... Root cause: cart object is null when user has no active session Fix: - const total = cart.items.reduce(...) + const total = cart?.items?.reduce(...) ?? 0

The Old Way Is Broken

Step 1: Error alert fires on your phone at 2am
Step 2: Open browser, navigate to Sentry dashboard
Step 3: Find the issue, read the stack trace
Step 4: Copy the error, open a new tab
Step 5: Paste into ChatGPT or Claude web
Step 6: Manually find the file, apply the fix
Step 1: Error fires
Step 2: Type /sentry:triage in your terminal
Step 3: Claude reads your code + the error together
Step 4: Fix applied
From alert to fix in under 60 seconds

How It Works

🔴
Live Error Detection

Sentry captures every unhandled exception, crash, and promise rejection from your running application. Our background monitor polls for critical P1/P2 errors every 60 seconds and alerts Claude automatically — no manual checking required.

🧠
AI-Powered Root Cause Analysis

Claude fetches the full stack trace, reads your actual source files, and cross-references both to pinpoint the exact line causing the crash. Not just the symptom — the real root cause.

One-Command Fix

Claude proposes a precise, minimal code fix with a before/after diff. You review, approve, and Claude applies it directly to your codebase. Optionally marks the Sentry issue resolved automatically.

Four Commands. Full Coverage.

/sentry:triage

List your top unresolved production errors ranked by frequency. See error level, affected file, event count, and last seen time.

/sentry:fix ISSUE-123

Deep-dive into any issue. Claude reads your code + the full stack trace together and proposes a targeted fix.

/sentry:search "keyword"

Search across all your Sentry issues by error message, function name, or any keyword.

Background Monitor

Runs silently in every Claude Code session. Alerts you automatically when new critical or fatal errors are detected.

Get Started in 2 Minutes

1
Install Claude Code
Requires Node.js 18 or higher
npm install -g @anthropic-ai/claude-code
Already installed? Skip to Step 2
2
Install Sentry Plugin
Run this inside Claude Code
/plugin install sentry@claude-plugins-official
3
Get Your Sentry Credentials
You need 3 values from your Sentry account
  1. Login to sentry.io
  2. Click avatar → Settings
  3. Go to API → Auth Tokens
  4. Click "Create New Token"
  5. Enable: project:read, issue:read, issue:write
  6. Copy the token shown (only visible once)
Open Sentry Token Page →
  1. Login to sentry.io
  2. Look at your browser URL
https://sentry.io/organizations/YOUR-SLUG/issues/
  1. Copy the YOUR-SLUG part
URL: sentry.io/organizations/acme-corp/
Slug: acme-corp ← copy this
  1. Go to sentry.io → Projects in sidebar
  2. Click your project name
  3. Look at the URL:
https://sentry.io/settings/YOUR-ORG/projects/YOUR-SLUG/
  1. Copy the YOUR-SLUG part
URL: .../projects/my-website/
Slug: my-website ← copy this
⚠️ Keep your Auth Token private. Never commit it to git. Claude Code stores it safely in your system keychain.
4
You're Ready!
Try these commands in Claude Code
/sentry:triage /sentry:fix ISSUE-123 /sentry:search "error"
$ /sentry:triage
Fetching Sentry issues...

ISSUE-8821 TypeError: cart is null
    src/checkout/payment.js:142
    847 events · 2 minutes ago

ISSUE-8819 UnhandledPromiseRejection
    src/orders/order.service.ts:89
    203 events · 14 minutes ago

Which issue should I fix? _

How The Plugin Is Built

Your Terminal Claude Code Sentry Plugin MCP Server (Node.js) Sentry REST API Your Sentry Project
MCP Protocol Node.js 18+ Sentry REST API v0
Auth token stored in system keychain — never in plain text or settings files

Frequently Asked Questions

Does this work with any programming language?

Yes. The plugin works at the Sentry API level, so it works with any language Sentry supports — JavaScript, TypeScript, Python, PHP, Ruby, Go, and more.

Is my Sentry auth token safe?

Yes. Claude Code stores sensitive config values in your system keychain (not in any file). It is never logged or transmitted anywhere except directly to the Sentry API.

What Sentry plan do I need?

Any Sentry plan works including the free tier. You just need API access which is available on all plans.

Does it modify my Sentry data?

Only if you explicitly ask. The resolve action (marking an issue resolved) is the only write operation and requires your confirmation.

Can I use this with multiple projects?

Yes. Set a default project in config, or pass a project slug directly to any command like /sentry:triage my-project

Does the background monitor slow down Claude Code?

No. It runs as a lightweight background process polling every 60 seconds. CPU and memory impact is negligible.