Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: sentry description: "Fetch and analyze Sentry issues, events, transactions, and logs. Helps agents debug errors, find root causes, and understand what happened at specific times."
Sentry
Access Sentry data via the Sentry API for debugging and investigation.
Requirements
- Node.js (recommended: Node 18+ so
fetchis available). - A Sentry auth token available to the scripts (by default they read
~/.sentryclirc).
Quick reference
| Task | Command |
|---|---|
| Find errors on a date | "$HOME/.agents/skills/sentry/scripts/search-events.js" --org X --start 2025-12-23T15:00:00 --level error |
| List open issues | "$HOME/.agents/skills/sentry/scripts/list-issues.js" --org X --status unresolved |
| Get issue details | "$HOME/.agents/skills/sentry/scripts/fetch-issue.js" <issue-id-or-url> --latest |
| Get event details | "$HOME/.agents/skills/sentry/scripts/fetch-event.js" <event-id> --org X --project Y |
| Search logs | "$HOME/.agents/skills/sentry/scripts/search-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
"$HOME/.agents/skills/sentry/scripts/search-events.js" --org myorg --project backend \
--start 2025-12-23T15:00:00 --end 2025-12-23T17:00:00
# Filter to just errors
"$HOME/.agents/skills/sentry/scripts/search-events.js" --org myorg --start 2025-12-23T15:00:00 \
--level error
# Find a specific transaction type
"$HOME/.agents/skills/sentry/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
"$HOME/.agents/skills/sentry/scripts/list-issues.js" --org myorg --status unresolved --level error --period 24h
# Find high-frequency issues
"$HOME/.agents/skills/sentry/scripts/list-issues.js" --org myorg --query "times_seen:>50" --sort freq
# Issues affecting users
"$HOME/.agents/skills/sentry/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
"$HOME/.agents/skills/sentry/scripts/fetch-issue.js" 5765604106 --latest
"$HOME/.agents/skills/sentry/scripts/fetch-issue.js" https://sentry.io/organizations/myorg/issues/123/ --latest
"$HOME/.agents/skills/sentry/scripts/fetch-issue.js" MYPROJ-123 --org myorg --latest
# Get specific event with all breadcrumbs
"$HOME/.agents/skills/sentry/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)
"$HOME/.agents/skills/sentry/scripts/search-events.js" --org myorg --tag thread_id:th_abc123
# Find by user email
"$HOME/.agents/skills/sentry/scripts/search-events.js" --org myorg --query "user.email:*@example.com"
Fetch issue
"$HOME/.agents/skills/sentry/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)
Options:
--latestinclude the latest event with full stack trace--org <org>organization slug (for short IDs)--jsonoutput raw JSON
Fetch event
"$HOME/.agents/skills/sentry/scripts/fetch-event.js" <event-id> --org <org> --project <project> [options]
Options:
--org, -o <org>organization slug (required)--project, -p <project>project slug (required)--breadcrumbs, -bshow all breadcrumbs (default: last 30)--spansshow span tree for transactions--jsonoutput raw JSON
Search events (Discover)
"$HOME/.agents/skills/sentry/scripts/search-events.js" [options]
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 (Discover):
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
"$HOME/.agents/skills/sentry/scripts/list-issues.js" [options]
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--jsonoutput raw JSON
Search logs (Logs Explorer)
"$HOME/.agents/skills/sentry/scripts/search-logs.js" [query|url] [options]
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)--jsonoutput raw JSON
Tips
- Start broad (time window + simple query), then drill into a single event/issue.
- Use
--breadcrumbsonfetch-event.jsfor the full lead-up to an error. - Use
list-issues.js --sort freqto find recurring problems. - Use tags (
request_id,user_id, etc.) to correlate events.
More by goncalossilva
View allUpdate CHANGELOG.md following Keep a Changelog (https://keepachangelog.com/en/1.1.0/)
Design and implement distinctive, production-ready web interfaces with strong aesthetic direction. Use when asked to create or restyle web pages, components, or applications (HTML/CSS/JS, React, Vue, etc.).
Reimplement the current Git branch on a fresh branch off `main` with a clean, narrative-quality commit history.
Operate a Home Assistant instance via the official REST/WebSocket APIs and backups, with safe plan/apply workflows for bulk, reviewable changes.
