warden-service — скилл для Claude Code: запросы к Warden API
Скилл для чтения данных Warden Service: поиск и экспорт запусков, находок, затрат и метрик через персональный токен. Работает во всех популярных AI-редакторах.
Apache-2.0 189 установок ★ 426 обновлён 2026-10-24
npx skills add getsentry/warden --skill warden-service -a claude-codeЧто делает warden-service
Скилл оборачивает read-only API Warden Service и позволяет агенту искать, фильтровать и суммировать данные о запусках, находках, затратах, результатах, репозиториях, скиллах и памяти. Запросы отправляются с персональным токеном через переменную окружения WARDEN_PAT, без вывода значения токена в логи или чат.
Внутри скилла — семь шагов: проверка окружения и токена, чтение документации API (references/read-api.md), выбор маршрута и фильтров, URL-кодирование параметров, отправка GET-запроса, обработка курсорной пагинации для /api/v1/runs и /api/v1/findings, итоговое резюме с указанием маршрута и фильтров. Токен никогда не кешируется, не логируется и не передаётся в команде буквально.
Для работы нужен доступ к Warden Service и экспортированный личный токен. Скилл не поддерживает запись (POST, PUT, PATCH, DELETE) — только чтение. Если API не даст ответ на вопрос, скилл скажет об этом вместо попытки подмены через другие операции.
Какие задачи решает
- найти все findings с высокой серьёзностью в нужном репозитории за период
- посчитать стоимость прошедших запусков по скиллам и затратам
- экспортировать данные о памяти, результатах или метриках для анализа
- проверить статус последних запусков и вывести ошибки
- профильтровать находки по скиллу, серьёзности или хранилищу
Примеры запросов агенту
- Покажи все findings с серьёзностью high за последнюю неделю
- Найди запуски скилла security-review и выведи затраты
- Экспортируй данные о памяти из warden-service в JSON
Как установить warden-service
1Через Skills CLI (Vercel)
npx skills add getsentry/warden --skill warden-service -a claude-code2Вручную: положить файлы
~/.claude/skills/warden-service/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/warden-service/
1Через Skills CLI (Vercel)
npx skills add getsentry/warden --skill warden-service -a codex2Вручную: положить файлы
.agents/skills/warden-service/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add getsentry/warden --skill warden-service -a cursor2Вручную: положить файлы
.cursor/skills/warden-service/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install getsentry/warden skills/warden-service2Вручную: положить файлы
.github/skills/warden-service/SKILL.md1Через Skills CLI (Vercel)
npx skills add getsentry/warden --skill warden-service -a gemini-cli2Командой платформы
gemini skills install https://github.com/getsentry/warden --path skills/warden-serviceВручную: положить файлы
.devin/skills/warden-service/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add getsentry/warden --skill warden-service -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о warden-service
Как установить warden-service в Claude Code?
Выполни npx skills add getsentry/warden --skill warden-service -a claude-code, затем открой ~/.claude/skills/warden-service/SKILL.md. Для других редакторов замени флаг: -a codex для Codex, -a cursor для Cursor, -a gemini-cli для Gemini CLI, -a opencode для OpenCode. Для GitHub Copilot используй gh skill install getsentry/warden warden-service.
Что нужно, чтобы запустить warden-service?
Создай личный токен в Warden Service (меню API access в дашборде) и экспортируй его как переменную окружения: export WARDEN_PAT=<твой_токен>. Никогда не вставляй токен в команду или чат прямо. Скилл прочитает токен из WARDEN_PAT при каждом запросе.
Какие операции поддерживает warden-service?
Только чтение: поиск runs, findings, costs, outcomes, repositories, skills и memories через GET-запросы к read API. Запись (POST, PUT, PATCH, DELETE) не поддерживается. Для пагинации используется опaque cursor, автоматически передаваемый в следующий запрос.
Исходный текст
SKILL.md · Apache-2.0
---
name: warden-service
description: Queries and summarizes the Warden Service read API. Use when asked to inspect, search, summarize, or export Warden runs, findings, costs, outcomes, repositories, skills, or memories through Warden Service.
spec_hash: c2fea93e547a
---
# Warden Service
Query Warden Service with a read-only personal token and return a bounded, evidence-based answer.
## Workflow
1. Identify the Warden Service origin and confirm `WARDEN_PAT` is set without displaying its value.
2. If the token is missing, direct the user to **API access** in the Warden Service dashboard. Have them create a personal token and export it as `WARDEN_PAT`; never ask them to paste it into chat or a command literal.
3. Read `references/read-api.md` to select the exact route, supported filters, pagination behavior, and response fields for the question.
4. Narrow the request to the user's repository, time range, skill, severity, or other stated scope. Use a bounded `limit` for runs and findings.
5. Send a `GET` request with the token read from the environment. URL-encode every query value.
6. Follow `nextCursor` only while more results are needed. Preserve all original filters and stop when the requested scope is satisfied or the response omits `nextCursor`.
7. Summarize the relevant JSON fields. State the route and filters used, and distinguish an empty result from a failed request.
## Request Pattern
Use `--get` with `--data-urlencode` instead of assembling a query string manually:
```bash
curl --fail-with-body --silent --show-error --get \
-H 'Accept: application/json' \
-H "Authorization: Bearer ${WARDEN_PAT}" \
--data-urlencode 'severity=high' \
--data-urlencode 'skill=security-review' \
--data-urlencode 'limit=30' \
"${WARDEN_SERVICE_URL%/}/api/v1/findings"
```
Keep the token in `WARDEN_PAT`. Do not enable verbose or trace output that could expose the authorization header.
## Pagination
Only `/api/v1/runs` and `/api/v1/findings` use cursor pagination. Treat `nextCursor` as opaque and pass it back unchanged through URL encoding:
```bash
curl --fail-with-body --silent --show-error --get \
-H 'Accept: application/json' \
-H "Authorization: Bearer ${WARDEN_PAT}" \
--data-urlencode "cursor=${NEXT_CURSOR}" \
--data-urlencode 'severity=high' \
--data-urlencode 'limit=100' \
"${WARDEN_SERVICE_URL%/}/api/v1/findings"
```
## Errors
Use the HTTP status and the JSON `error.code` and `error.message` together:
| Status | Meaning | Action |
| --- | --- | --- |
| 400 | Invalid query filters | Correct the parameter names, values, or RFC 3339 timestamps. |
| 401 | Missing, invalid, or expired authentication | Verify the origin and replace the personal token through API access. |
| 403 | Insufficient role or disallowed personal-token operation | Keep the request read-only and within the token's repository scope. |
| 404 | Unknown or unauthorized route/resource | Verify the documented route or ID without assuming the resource exists. |
| 429 | Rate limited | Wait and retry later; do not create a tight retry loop. |
## Boundaries
- Use personal tokens only for `GET` or `HEAD`. Never attempt `POST`, `PUT`, `PATCH`, or `DELETE` with them.
- Never reveal, log, persist, embed as a command literal, or ask the user to paste a token.
- Respect the token's tenant, role, and repository restrictions. Never attempt to bypass them.
- Use only routes, filters, and response fields documented in `references/read-api.md`.
- Fetch and display only the data required for the user's stated scope. Use the export route only when the user explicitly requests an export.
- If the read API cannot answer the question, say so. Do not substitute an ingest, memory-recall, token-management, retention, or deletion request.
© getsentry · Apache-2.0 · getsentry/warden