# Sentry

> Monitor and resolve Sentry issues, view project stats, and manage error tracking.

- Skill: `qhkm/sentry` (Agent Skill)
- Install (CLI): `npx skillmds@latest add qhkm/sentry`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhkm/sentry/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: qhkm (https://skillmd.com/u/qhkm)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/qhkm/sentry

---


# Sentry Skill

Monitor errors, resolve issues, and check project health using the Sentry API.

## Setup

1. Go to [sentry.io/settings/auth-tokens/](https://sentry.io/settings/auth-tokens/) → Create Token
2. Select scopes: `project:read`, `event:read`, `org:read`
3. Note your organization slug from URL: `sentry.io/organizations/`**`your-org`**

```bash
export SENTRY_AUTH_TOKEN="sntrys_xxx..."
export SENTRY_ORG="your-org"
export SENTRY_PROJECT="your-project"
```

## List Unresolved Issues

```bash
curl -s "https://sentry.io/api/0/projects/$SENTRY_ORG/$SENTRY_PROJECT/issues/?query=is:unresolved" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  | jq '.[] | {id, title, culprit, count, firstSeen, lastSeen}' | head -40
```

## Get Issue Details

```bash
ISSUE_ID="issue-id-from-list"
curl -s "https://sentry.io/api/0/issues/$ISSUE_ID/" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  | jq '{id, title, status, count, userCount, firstSeen, lastSeen}'
```

## Resolve an Issue

```bash
ISSUE_ID="issue-id-from-list"
curl -s -X PUT "https://sentry.io/api/0/issues/$ISSUE_ID/" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "resolved"}' | jq '{id, status}'
```

## Project Stats (24h error count)

```bash
curl -s "https://sentry.io/api/0/projects/$SENTRY_ORG/$SENTRY_PROJECT/stats/?stat=received&resolution=1h" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  | jq 'map(.[1]) | add'
```

## Tips

- Rate limit: 40 requests/second for organization tokens
- Use `?query=is:unresolved+level:error` to filter by level
- Issue IDs are numeric strings
- `culprit` field shows the function/method where the error occurred
- Pagination: use `Link` header for next page URL

