Sentry (Read-only Observability)
Quick start
- If not already authenticated, ask the user to provide a valid
SENTRY_AUTH_TOKEN (read-only scopes such as project:read, event:read) or to log in and create one before running commands.
- Set
SENTRY_AUTH_TOKEN as an env var.
- Optional defaults:
SENTRY_ORG, SENTRY_PROJECT, SENTRY_BASE_URL.
- Defaults: org/project
{your-org}/{your-project}, time range 24h, environment prod, limit 20 (max 50).
- Always call the Sentry API (no heuristics, no caching).
If the token is missing, give the user these steps:
- Create a Sentry auth token: https://sentry.io/settings/account/api/auth-tokens/
- Create a token with read-only scopes such as
project:read, event:read, and org:read.
- Set
SENTRY_AUTH_TOKEN as an environment variable in their system.
- Offer to guide them through setting the environment variable for their OS/shell if needed.
- Never ask the user to paste the full token in chat. Ask them to set it locally and confirm when ready.
Core tasks (use bundled script)
Use scripts/sentry_api.py for deterministic API calls. It handles pagination and retries once on transient errors.
Skill path (set once)
export AGENT_SKILLS_HOME="${AGENT_SKILLS_HOME:-$HOME/.agent-skills}"
export SENTRY_API="$AGENT_SKILLS_HOME/skills/sentry/scripts/sentry_api.py"
User-scoped skills install under $AGENT_SKILLS_HOME/skills (default: ~/.agent-skills/skills).
1) List issues (ordered by most recent)
python3 "$SENTRY_API" \
list-issues \
--org {your-org} \
--project {your-project} \
--environment prod \
--time-range 24h \
--limit 20 \
--query "is:unresolved"
2) Resolve an issue short ID to issue ID
python3 "$SENTRY_API" \
list-issues \
--org {your-org} \
--project {your-project} \
--query "ABC-123" \
--limit 1
Use the returned id for issue detail or events.
3) Issue detail
python3 "$SENTRY_API" \
issue-detail \
1234567890
4) Issue events
python3 "$SENTRY_API" \
issue-events \
1234567890 \
--limit 20
5) Event detail (no stack traces by default)
python3 "$SENTRY_API" \
event-detail \
--org {your-org} \
--project {your-project} \
abcdef1234567890
API requirements
Always use these endpoints (GET only):
- List issues:
/api/0/projects/{org_slug}/{project_slug}/issues/
- Issue detail:
/api/0/issues/{issue_id}/
- Events for issue:
/api/0/issues/{issue_id}/events/
- Event detail:
/api/0/projects/{org_slug}/{project_slug}/events/{event_id}/
Inputs and defaults
org_slug, project_slug: default to {your-org}/{your-project} (avoid non-prod orgs).
time_range: default 24h (pass as statsPeriod).
environment: default prod.
limit: default 20, max 50 (paginate until limit reached).
search_query: optional query parameter.
issue_short_id: resolve via list-issues query first.
Output formatting rules
- Issue list: show title, short_id, status, first_seen, last_seen, count, environments, top_tags; order by most recent.
- Event detail: include culprit, timestamp, environment, release, url.
- If no results, state explicitly.
- Redact PII in output (emails, IPs). Do not print raw stack traces.
- Never echo auth tokens.
Golden test inputs
- Org:
{your-org}
- Project:
{your-project}
- Issue short ID:
{ABC-123}
Example prompt: “List the top 10 open issues for prod in the last 24h.”
Expected: ordered list with titles, short IDs, counts, last seen.
1---
2name: sentry
3description: Inspect Sentry issues, summarize production errors, and pull health data via the Sentry API (read-only). Use when user says "check Sentry", "what errors in production?", "summarize Sentry issues", "recent crashes", or "production error report". Requires SENTRY_AUTH_TOKEN. Do NOT use for setting up Sentry SDK, configuring alerts, or non-Sentry error monitoring.
4metadata:
5 author: github.com/openai/skills
6 version: '1.0.0'
7---
8
9# Sentry (Read-only Observability)
10
11## Quick start
12
13- If not already authenticated, ask the user to provide a valid `SENTRY_AUTH_TOKEN` (read-only scopes such as `project:read`, `event:read`) or to log in and create one before running commands.
14- Set `SENTRY_AUTH_TOKEN` as an env var.
15- Optional defaults: `SENTRY_ORG`, `SENTRY_PROJECT`, `SENTRY_BASE_URL`.
16- Defaults: org/project `{your-org}`/`{your-project}`, time range `24h`, environment `prod`, limit 20 (max 50).
17- Always call the Sentry API (no heuristics, no caching).
18
19If the token is missing, give the user these steps:
20
211. Create a Sentry auth token: <https://sentry.io/settings/account/api/auth-tokens/>
222. Create a token with read-only scopes such as `project:read`, `event:read`, and `org:read`.
233. Set `SENTRY_AUTH_TOKEN` as an environment variable in their system.
244. Offer to guide them through setting the environment variable for their OS/shell if needed.
25
26- Never ask the user to paste the full token in chat. Ask them to set it locally and confirm when ready.
27
28## Core tasks (use bundled script)
29
30Use `scripts/sentry_api.py` for deterministic API calls. It handles pagination and retries once on transient errors.
31
32## Skill path (set once)
33
34```bash
35export AGENT_SKILLS_HOME="${AGENT_SKILLS_HOME:-$HOME/.agent-skills}"
36export SENTRY_API="$AGENT_SKILLS_HOME/skills/sentry/scripts/sentry_api.py"
37```
38
39User-scoped skills install under `$AGENT_SKILLS_HOME/skills` (default: `~/.agent-skills/skills`).
40
41### 1) List issues (ordered by most recent)
42
43```bash
44python3 "$SENTRY_API" \
45 list-issues \
46 --org {your-org} \
47 --project {your-project} \
48 --environment prod \
49 --time-range 24h \
50 --limit 20 \
51 --query "is:unresolved"
52```
53
54### 2) Resolve an issue short ID to issue ID
55
56```bash
57python3 "$SENTRY_API" \
58 list-issues \
59 --org {your-org} \
60 --project {your-project} \
61 --query "ABC-123" \
62 --limit 1
63```
64
65Use the returned `id` for issue detail or events.
66
67### 3) Issue detail
68
69```bash
70python3 "$SENTRY_API" \
71 issue-detail \
72 1234567890
73```
74
75### 4) Issue events
76
77```bash
78python3 "$SENTRY_API" \
79 issue-events \
80 1234567890 \
81 --limit 20
82```
83
84### 5) Event detail (no stack traces by default)
85
86```bash
87python3 "$SENTRY_API" \
88 event-detail \
89 --org {your-org} \
90 --project {your-project} \
91 abcdef1234567890
92```
93
94## API requirements
95
96Always use these endpoints (GET only):
97
98- List issues: `/api/0/projects/{org_slug}/{project_slug}/issues/`
99- Issue detail: `/api/0/issues/{issue_id}/`
100- Events for issue: `/api/0/issues/{issue_id}/events/`
101- Event detail: `/api/0/projects/{org_slug}/{project_slug}/events/{event_id}/`
102
103## Inputs and defaults
104
105- `org_slug`, `project_slug`: default to `{your-org}`/`{your-project}` (avoid non-prod orgs).
106- `time_range`: default `24h` (pass as `statsPeriod`).
107- `environment`: default `prod`.
108- `limit`: default 20, max 50 (paginate until limit reached).
109- `search_query`: optional `query` parameter.
110- `issue_short_id`: resolve via list-issues query first.
111
112## Output formatting rules
113
114- Issue list: show title, short_id, status, first_seen, last_seen, count, environments, top_tags; order by most recent.
115- Event detail: include culprit, timestamp, environment, release, url.
116- If no results, state explicitly.
117- Redact PII in output (emails, IPs). Do not print raw stack traces.
118- Never echo auth tokens.
119
120## Golden test inputs
121
122- Org: `{your-org}`
123- Project: `{your-project}`
124- Issue short ID: `{ABC-123}`
125
126Example prompt: “List the top 10 open issues for prod in the last 24h.”
127Expected: ordered list with titles, short IDs, counts, last seen.