Sentry

From seaworld008/Commonly-used-high-value-skills · View interactive version

Sentry is an AI agent skill from the GitHub repository seaworld008/Commonly-used-high-value-skills. Read Sentry issues and events with a scoped token to summarize production error trends and event details.

How to use this skill

Skill file

Sentry (Read-only Observability)

Quick start

If the token is missing, give the user these steps:

  1. Create a Sentry auth token: https://sentry.io/settings/account/api/auth-tokens/
  2. Create a token with read-only scopes such as project:read, event:read, and org:read.
  3. Set SENTRY_AUTH_TOKEN as an environment variable in their system.
  4. Offer to guide them through setting the environment variable for their OS/shell if needed.

Core tasks (use bundled script)

Use scripts/sentry_api.py for deterministic API calls. It handles pagination and retries once on transient errors.

Optional installed CLI

The newer sentry CLI is an alternative only when already installed and compatible. Check its local version/help for the required command and flags; do not confuse it with sentry-cli or install it automatically with a remote shell pipeline.

Script location

# From the current installed skill directory:
SENTRY_API="$PWD/scripts/sentry_api.py"

Pass global options such as --org and --project before the subcommand.

1) List issues (ordered by most recent)

python3 "$SENTRY_API" --org {your-org} --project {your-project} list-issues \
  --environment prod \
  --time-range 24h \
  --limit 20 \
  --query "is:unresolved"

2) Resolve an issue short ID to issue ID

python3 "$SENTRY_API" --org {your-org} --project {your-project} list-issues \
  --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" --org {your-org} --project {your-project} event-detail \
  abcdef1234567890

API requirements

Always use these endpoints (GET only):

Inputs and defaults

Output formatting rules

Golden test inputs

Example prompt: “List the top 10 open issues for prod in the last 24h.”

Expected: ordered list with titles, short IDs, counts, last seen.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.