New to Claude Skills? Learn how to install them →

mitsuhiko on GitHub

Sentry

Free

Access Sentry data for effective debugging and investigation.

by mitsuhiko2.8k stars on mitsuhiko/agent-stuff
2 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Sentry does

The Sentry skill provides a straightforward interface for accessing Sentry data via its API, enabling developers and engineers to debug errors, investigate issues, and analyze events and logs effectively. By utilizing an authentication token from your ~/.sentryclirc, you can seamlessly interact with your Sentry projects and organizations. This skill is particularly useful for teams looking to streamline their debugging workflows and gain insights into application performance and error occurrences.

With the Sentry skill, you can execute various commands to fetch detailed information about issues and events. For instance, you can list unresolved issues, search for specific events based on timestamps, and retrieve detailed logs. The skill supports a range of filtering options, allowing you to narrow down results by error levels, tags, and time periods. This flexibility makes it easy to identify patterns in errors and understand their impact on users.

The command-line scripts included in the skill provide a robust set of features for common debugging tasks. Whether you need to find out what went wrong at a specific time, list recent errors, or get details about a particular issue or event, the Sentry skill equips you with the necessary tools. It’s designed for developers and teams who rely on Sentry for error tracking and want to enhance their debugging capabilities without needing to navigate the Sentry web interface.

Overall, the Sentry skill is an essential addition for any development team using Sentry, simplifying the process of error investigation and enabling faster resolution of issues.

When to use it

Use this skill when you need to investigate errors, analyze logs, or retrieve detailed information about issues in your Sentry projects.

When not to use it

This skill may not be suitable for users who prefer graphical interfaces or require extensive customization beyond the provided command-line options.

What you can build with it

Investigating Recent Errors

Use the skill to list unresolved errors from the last 24 hours, helping you quickly identify and address issues affecting users.

Analyzing Events Over Time

Fetch events within a specific time window to understand what went wrong during critical periods of application usage.

Retrieving Detailed Issue Information

Get comprehensive details about a specific issue, including the latest stack trace and user impact, to facilitate debugging.

How to install Sentry

View source

1. Install with the skills CLI

npx skills add mitsuhiko/agent-stuff/sentry --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mitsuhiko

Sentry Skill

Access Sentry data via the API for debugging and investigation. Uses auth token from ~/.sentryclirc.

Quick Reference

TaskCommand
Find errors on a datesearch-events.js --org X --start 2025-12-23T15:00:00 --level error
List open issueslist-issues.js --org X --status unresolved
Get issue detailsfetch-issue.js <issue-id-or-url> --latest
Get event detailsfetch-event.js <event-id> --org X --project Y
Search logssearch-logs.js --org X --project Y "level:error"

Common Debugging Workflows

"What went wrong at this time?"

Find events around a specific timestamp:

# Find all events in a 2-hour window
./scripts/search-events.js --org myorg --project backend \
  --start 2025-12-23T15:00:00 --end 2025-12-23T17:00:00

# Filter to just errors
./scripts/search-events.js --org myorg --start 2025-12-23T15:00:00 \
  --level error

# Find a specific transaction type
./scripts/search-events.js --org myorg --start 2025-12-23T15:00:00 \
  --transaction process-incoming-email

"What errors have occurred recently?"

# List unresolved errors from last 24 hours
./scripts/list-issues.js --org myorg --status unresolved --level error --period 24h

# Find high-frequency issues
./scripts/list-issues.js --org myorg --query "times_seen:>50" --sort freq

# Issues affecting users
./scripts/list-issues.js --org myorg --query "is:unresolved has:user" --sort user

"Get details about a specific issue/event"

# Get issue with latest stack trace
./scripts/fetch-issue.js 5765604106 --latest
./scripts/fetch-issue.js https://sentry.io/organizations/myorg/issues/123/ --latest
./scripts/fetch-issue.js MYPROJ-123 --org myorg --latest

# Get specific event with all breadcrumbs
./scripts/fetch-event.js abc123def456 --org myorg --project backend --breadcrumbs

"Find events with a specific tag"

# Find by custom tag (e.g., thread_id, user_id)
./scripts/search-events.js --org myorg --tag thread_id:th_abc123

# Find by user email
./scripts/search-events.js --org myorg --query "user.email:*@example.com"

Fetch Issue

./scripts/fetch-issue.js <issue-id-or-url> [options]

Get details about a specific issue (grouped error).

Accepts:

  • Issue ID: 5765604106
  • Issue URL: https://sentry.io/organizations/sentry/issues/5765604106/
  • New URL format: https://myorg.sentry.io/issues/5765604106/
  • Short ID: JAVASCRIPT-ABC (requires --org flag)

Options:

  • --latest - Include the latest event with full stack trace
  • --org <org> - Organization slug (for short IDs)
  • --json - Output raw JSON

Output includes:

  • Title, culprit, status, level
  • First/last seen timestamps
  • Event count and user impact
  • Tags and environment info
  • With --latest: stack trace, request details, breadcrumbs, runtime context

Fetch Event

./scripts/fetch-event.js <event-id> --org <org> --project <project> [options]

Get full details of a specific event by its ID.

Options:

  • --org, -o <org> - Organization slug (required)
  • --project, -p <project> - Project slug (required)
  • --breadcrumbs, -b - Show all breadcrumbs (default: last 30)
  • --spans - Show span tree for transactions
  • --json - Output raw JSON

Output includes:

  • Timestamp, project, title, message
  • All tags
  • Context (runtime, browser, OS, trace info)
  • Request details
  • Exception with stack trace
  • Breadcrumbs
  • Spans (with --spans)

Search Events

./scripts/search-events.js [options]

Search for events (transactions, errors) using Sentry Discover.

Time Range Options:

  • --period, -t <period> - Relative time (24h, 7d, 14d)
  • --start <datetime> - Start time (ISO 8601: 2025-12-23T15:00:00)
  • --end <datetime> - End time (ISO 8601)

Filter Options:

  • --org, -o <org> - Organization slug (required)
  • --project, -p <project> - Project slug or ID
  • --query, -q <query> - Discover search query
  • --transaction <name> - Transaction name filter
  • --tag <key:value> - Tag filter (repeatable)
  • --level <level> - Level filter (error, warning, info)
  • --limit, -n <n> - Max results (default: 25, max: 100)
  • --fields <fields> - Comma-separated fields to include

Query Syntax:

transaction:process-*     Wildcard transaction match
level:error               Filter by level
user.email:foo@bar.com    Filter by user
environment:production    Filter by environment
has:stack.filename        Has stack trace

List Issues

./scripts/list-issues.js [options]

List and search issues (grouped errors) in a project.

Options:

  • --org, -o <org> - Organization slug (required)
  • --project, -p <project> - Project slug (repeatable)
  • --query, -q <query> - Issue search query
  • --status <status> - unresolved, resolved, ignored
  • --level <level> - error, warning, info, fatal
  • --period, -t <period> - Time period (default: 14d)
  • --limit, -n <n> - Max results (default: 25)
  • --sort <sort> - date, new, priority, freq, user
  • --json - Output raw JSON

Query Syntax:

is:unresolved             Status filter
is:assigned               Has assignee
assigned:me               Assigned to current user
level:error               Level filter
firstSeen:+7d             First seen > 7 days ago
lastSeen:-24h             Last seen within 24h
times_seen:>100           Event count filter
has:user                  Has user context
error.handled:0           Unhandled errors only

Search Logs

./scripts/search-logs.js [query|url] [options]

Search for logs in Sentry's Logs Explorer.

Options:

  • --org, -o <org> - Organization slug (required unless URL provided)
  • --project, -p <project> - Filter by project slug or ID
  • --period, -t <period> - Time period (default: 24h)
  • --limit, -n <n> - Max results (default: 100, max: 1000)
  • --json - Output raw JSON

Query Syntax:

level:error              Filter by level (trace, debug, info, warn, error, fatal)
message:*timeout*        Search message text with wildcards
trace:abc123             Filter by trace ID
project:my-project       Filter by project slug

Accepts Sentry URLs:

./scripts/search-logs.js "https://myorg.sentry.io/explore/logs/?project=123&statsPeriod=7d"

Tips for Debugging

  1. Start broad, then narrow down: Use search-events.js with a time range first, then drill into specific events

  2. Use breadcrumbs: The --breadcrumbs flag on fetch-event.js shows the full history of what happened before an error

  3. Look for patterns: Use list-issues.js --sort freq to find frequently occurring problems

  4. Check related events: If you find one event, look for others with the same transaction name or trace ID

  5. Tags are your friend: Custom tags like thread_id, user_id, request_id help correlate events

Frequently asked questions about Sentry

Similar skills