{"id":24621,"plugin_id":"plugins~Plugin_051b067fbd20819195157b75a34efe0a","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:18:31.081Z","digest":"09357cb0a7ccdd2f44874474c745e541c6e2d10743e1ee5e0feae45d90d43dfe","against":null,"payload":{"name":"sentry","description":"Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","included_files":[{"relative_path":"LICENSE.txt","size_in_bytes":10776},{"relative_path":"agents/openai.yaml","size_in_bytes":316},{"relative_path":"assets/sentry-small.svg","size_in_bytes":661},{"relative_path":"assets/sentry.png","size_in_bytes":1998},{"relative_path":"scripts/sentry_api.py","size_in_bytes":7855}],"skill_md_contents":"---\nname: \"sentry\"\ndescription: \"Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.\"\n---\n\n\n# Sentry (Read-only Observability)\n\n## Quick start\n\n- 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.\n- Set `SENTRY_AUTH_TOKEN` as an env var.\n- Optional defaults: `SENTRY_ORG`, `SENTRY_PROJECT`, `SENTRY_BASE_URL`.\n- Defaults: org/project `{your-org}`/`{your-project}`, time range `24h`, environment `prod`, limit 20 (max 50).\n- Always call the Sentry API (no heuristics, no caching).\n\nIf the token is missing, give the user these steps:\n1. Create a Sentry auth token: https://sentry.io/settings/account/api/auth-tokens/\n2. Create a token with read-only scopes such as `project:read`, `event:read`, and `org:read`.\n3. Set `SENTRY_AUTH_TOKEN` as an environment variable in their system.\n4. Offer to guide them through setting the environment variable for their OS/shell if needed.\n- Never ask the user to paste the full token in chat. Ask them to set it locally and confirm when ready.\n\n## Core tasks (use bundled script)\n\nUse `scripts/sentry_api.py` for deterministic API calls. It handles pagination and retries once on transient errors.\n\n## Bundled script path\n\n```bash\nexport SENTRY_API=\"plugins/sentry/skills/sentry/scripts/sentry_api.py\"\n```\n\nIf you are running from an installed plugin copy instead of this repo checkout, use the same\n`skills/sentry/scripts/sentry_api.py` path inside the installed plugin directory.\n\n### 1) List issues (ordered by most recent)\n\n```bash\npython3 \"$SENTRY_API\" \\\n  --org {your-org} \\\n  --project {your-project} \\\n  list-issues \\\n  --environment prod \\\n  --time-range 24h \\\n  --limit 20 \\\n  --query \"is:unresolved\"\n```\n\n### 2) Resolve an issue short ID to issue ID\n\n```bash\npython3 \"$SENTRY_API\" \\\n  --org {your-org} \\\n  --project {your-project} \\\n  list-issues \\\n  --query \"ABC-123\" \\\n  --limit 1\n```\n\nUse the returned `id` for issue detail or events.\n\n### 3) Issue detail\n\n```bash\npython3 \"$SENTRY_API\" \\\n  --org {your-org} \\\n  issue-detail \\\n  1234567890\n```\n\n### 4) Issue events\n\n```bash\npython3 \"$SENTRY_API\" \\\n  --org {your-org} \\\n  issue-events \\\n  1234567890 \\\n  --environment prod \\\n  --time-range 24h \\\n  --limit 20\n```\n\n### 5) Event detail (no stack traces by default)\n\n```bash\npython3 \"$SENTRY_API\" \\\n  --org {your-org} \\\n  --project {your-project} \\\n  event-detail \\\n  abcdef1234567890\n```\n\n## API requirements\n\nAlways use these endpoints (GET only):\n\n- List issues: `/api/0/projects/{org_slug}/{project_slug}/issues/`\n- Issue detail: `/api/0/organizations/{org_slug}/issues/{issue_id}/`\n- Events for issue: `/api/0/organizations/{org_slug}/issues/{issue_id}/events/`\n- Event detail: `/api/0/projects/{org_slug}/{project_slug}/events/{event_id}/`\n\n## Inputs and defaults\n\n- `org_slug`: default to `{your-org}` (required for issue detail, issue events, and event detail).\n- `project_slug`: default to `{your-project}` (required for list issues and event detail).\n- `time_range`: default `24h` (pass as `statsPeriod` for list issues and issue events).\n- `environment`: default `prod` (used by list issues and issue events).\n- `limit`: default 20, max 50 (paginate until limit reached).\n- `search_query`: optional `query` parameter.\n- `issue_short_id`: resolve via list-issues query first.\n\n## Output formatting rules\n\n- Issue list: show title, short_id, status, first_seen, last_seen, count, environments, top_tags; order by most recent.\n- Event detail: include culprit, timestamp, environment, release, url.\n- If no results, state explicitly.\n- Redact PII in output (emails, IPs). Do not print raw stack traces.\n- Never echo auth tokens.\n\n## Golden test inputs\n\n- Org: `{your-org}`\n- Project: `{your-project}`\n- Issue short ID: `{ABC-123}`\n\nExample prompt: “List the top 10 open issues for prod in the last 24h.”\nExpected: ordered list with titles, short IDs, counts, last seen.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}