К основному содержанию
скилл CX Codex

sentry-create-alert — скилл Claude Code: что делает и установка

Создаёт алерты и автоматизации в Sentry через workflow engine API. Помогает настроить оповещения в Slack, PagerDuty или на почту прямо из диалога с агентом.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add getsentry/sentry-for-ai --skill sentry-create-alert -a claude-code
Открыть на GitHub

Что делает sentry-create-alert

Скилл инструктирует агента настраивать уведомления через workflow engine API Sentry. Сначала агент запрашивает параметры: слаг организации, токен, регион (us или de), тип события и каналы связи. Через curl и однострочники на python3 модель находит числовые идентификаторы пользователей и интеграций.

Затем формируется JSON-манифест с блоками триггеров (triggers), условий (actionFilters) и действий (actions). Скилл поддерживает триггеры вроде first_seen_event или regression_event, а также фильтры по частоте ошибок и тегам. Действия задаются внутри фильтров. Среди поддерживаемых каналов — Slack, PagerDuty, email, Discord, Opsgenie, Jira и GitHub.

API находится в статусе beta, поэтому созданные правила могут не отображаться в старом интерфейсе Alerts UI. Для работы обязателен токен организации с правами alerts:write, org:admin или org:write.

Какие задачи решает

  • настроить оповещения о новых ошибках Sentry в канал Slack
  • отправлять уведомление при повторном появлении решённой проблемы
  • фильтровать алерты по частоте событий за выбранный интервал
  • привязать автоматическое создание задач в Jira или GitHub к инцидентам

Примеры запросов агенту

  • Создай алерт в Sentry для критических ошибок с отправкой в наш канал Slack
  • Настрой уведомление на email, если ошибка повторяется чаще 50 раз за час
  • Сделай оповещение в PagerDuty при регрессии решённой проблемы

Как установить sentry-create-alert

1Через Skills CLI (Vercel)

npx skills add getsentry/sentry-for-ai --skill sentry-create-alert -a claude-code

2Вручную: положить файлы

~/.claude/skills/sentry-create-alert/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/sentry-create-alert/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о sentry-create-alert

Как установить sentry-create-alert в Claude Code?

Выполните в терминале команду npx skills add getsentry/sentry-for-ai --skill sentry-create-alert -a claude-code.

Что делает sentry-create-alert?

Скилл пошагово ведёт агента через опрос параметров, получение ID через API Sentry, сборку структуры правила и отправку запроса на создание воркфлоу.

Что нужно подготовить перед запуском?

Понадобится утилита curl в командной строке и токен авторизации Sentry со скоупом alerts:write, org:admin или org:write.

Исходный текст

SKILL.md · Apache-2.0
---
name: sentry-create-alert
description: Create Sentry alerts using the workflow engine API. Use when asked to create alerts, set up notifications, configure issue priority alerts, or build workflow automations. Supports email, Slack, PagerDuty, Discord, and other notification actions.
license: Apache-2.0
---
# Create Sentry Alert

Create alerts via Sentry’s workflow engine API.

**Note:** This API is currently in **beta** and may be subject to change.
It is part of New Monitors and Alerts and may not be viewable in the legacy Alerts UI.

## Invoke This Skill When

- User asks to “create a Sentry alert” or “set up notifications”
- User wants to be emailed or notified when issues match certain conditions
- User mentions priority alerts, de-escalation alerts, or workflow automations
- User wants to configure Slack, PagerDuty, or email notifications for Sentry issues

## Prerequisites

- `curl` available in shell
- Sentry org auth token with `alerts:write` scope (also accepts `org:admin` or
  `org:write`)

## Phase 1: Gather Configuration

Ask the user for any missing details:

| Detail | Required | Example |
| --- | --- | --- |
| Org slug | Yes | `sentry`, `my-org` |
| Auth token | Yes | `sntryu_...` (needs `alerts:write` scope) |
| Region | Yes (default: `us`) | `us` → `us.sentry.io`, `de` → `de.sentry.io` |
| Alert name | Yes | `"High Priority De-escalation Alert"` |
| Trigger events | Yes | Which issue events fire the workflow |
| Conditions | Optional | Filter conditions before actions execute |
| Action type | Yes | `email`, `slack`, or `pagerduty` |
| Action target | Yes | User email, team, channel, or service |

## Phase 2: Look Up IDs

Use these API calls to resolve names to IDs as needed.

```bash
API="https://{region}.sentry.io/api/0/organizations/{org}"
AUTH="Authorization: Bearer {token}"

# Find user ID by email
curl -s "$API/members/" -H "$AUTH" | python3 -c "
import json,sys
for m in json.load(sys.stdin):
  if m.get('email')=='USER_EMAIL' or m.get('user',{}).get('email')=='USER_EMAIL':
    print(m['user']['id']); break"

# List teams
curl -s "$API/teams/" -H "$AUTH" | python3 -c "
import json,sys
for t in json.load(sys.stdin):
  print(t['id'], t['slug'])"

# List integrations (for Slack/PagerDuty)
curl -s "$API/integrations/" -H "$AUTH" | python3 -c "
import json,sys
for i in json.load(sys.stdin):
  print(i['id'], i['provider']['key'], i['name'])"
```

## Phase 3: Build Payload

### Trigger Events

Pick which issue events fire the workflow.
Use `logicType: "any-short"` (triggers must always use this).

| Type | Fires when |
| --- | --- |
| `first_seen_event` | New issue created |
| `regression_event` | Resolved issue recurs |
| `reappeared_event` | Archived issue reappears |
| `issue_resolved_trigger` | Issue is resolved |

### Filter Conditions

Conditions that must pass before actions execute.
Use `logicType: "all"`, `"any-short"`, or `"none"`.

**The `comparison` field is polymorphic** — its shape depends on the condition `type`:

| Type | `comparison` format | Description |
| --- | --- | --- |
| `issue_priority_greater_or_equal` | `75` (bare integer) | Priority >= Low(25)/Medium(50)/High(75) |
| `issue_priority_deescalating` | `true` (bare boolean) | Priority dropped below peak |
| `event_frequency_count` | `{"value": 100, "interval": "1hr"}` | Event count in time window |
| `event_unique_user_frequency_count` | `{"value": 50, "interval": "1hr"}` | Affected users in time window |
| `tagged_event` | `{"key": "level", "match": "eq", "value": "error"}` | Event tag matches |
| `assigned_to` | `{"targetType": "Member", "targetIdentifier": 123}` | Issue assigned to target |
| `level` | `{"level": 40, "match": "gte"}` | Event level (fatal=50, error=40, warning=30) |
| `age_comparison` | `{"time": "hour", "value": 24, "comparisonType": "older"}` | Issue age |
| `issue_category` | `{"value": 1}` | Category (1=Error, 6=Feedback, 10=Outage: uptime and cron) |
| `issue_occurrences` | `{"value": 100}` | Total occurrence count |

**Interval options:** `"1min"`, `"5min"`, `"15min"`, `"1hr"`, `"1d"`, `"1w"`, `"30d"`

**Tag match types:** `"co"` (contains), `"nc"` (not contains), `"eq"`, `"ne"`, `"sw"`
(starts with), `"ew"` (ends with), `"is"` (set), `"ns"` (not set)

Set `conditionResult` to `false` to invert (fire when condition is NOT met).

### Actions

| Type | Key Config |
| --- | --- |
| `email` | `config.targetType`: `"user"` / `"team"` / `"issue_owners"`, `config.targetIdentifier`: `<id>` |
| `slack` | `integrationId`: `<id>`, `config.targetDisplay`: `"#channel-name"` |
| `pagerduty` | `integrationId`: `<id>`, `config.targetDisplay`: `<service_name>`, `data.priority`: `"critical"` |
| `discord` | `integrationId`: `<id>`, `data.tags`: tag list |
| `msteams` | `integrationId`: `<id>`, `config.targetDisplay`: `<channel>` |
| `opsgenie` | `integrationId`: `<id>`, `data.priority`: `"P1"`-`"P5"` |
| `jira` | `integrationId`: `<id>`, `data`: project/issue config |
| `github` | `integrationId`: `<id>`, `data`: repo/issue config |

### Full Payload Structure

```json
{
  "name": "<Alert Name>",
  "enabled": true,
  "environment": null,
  "config": { "frequency": 30 },
  "triggers": {
    "logicType": "any-short",
    "conditions": [
      { "type": "first_seen_event", "comparison": true, "conditionResult": true }
    ],
    "actions": []
  },
  "actionFilters": [{
    "logicType": "all",
    "conditions": [
      { "type": "issue_priority_greater_or_equal", "comparison": 75, "conditionResult": true },
      { "type": "event_frequency_count", "comparison": {"value": 50, "interval": "1hr"}, "conditionResult": true }
    ],
    "actions": [{
      "type": "email",
      "integrationId": null,
      "data": {},
      "config": {
        "targetType": "user",
        "targetIdentifier": "<user_id>",
        "targetDisplay": null
      },
      "status": "active"
    }]
  }]
}
```

`frequency`: minutes between repeated notifications.
Allowed values: `0`, `5`, `10`, `30`, `60`, `180`, `720`, `1440`.

**Structure note:** `triggers.actions` is always `[]` — actions live inside
`actionFilters[].actions`.

## Phase 4: Create the Alert

```bash
curl -s -w "\n%{http_code}" -X POST \
  "https://{region}.sentry.io/api/0/organizations/{org}/workflows/" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{payload}'
```

Expect HTTP `201`. The response contains the workflow `id`.

## Phase 5: Verify

Confirm the alert was created and provide the UI link:

```
https://{org_slug}.sentry.io/monitors/alerts/{workflow_id}/
```

If the org lacks the `workflow-engine-ui` feature flag, the alert appears at:

```
https://{org_slug}.sentry.io/alerts/rules/
```

## Managing Alerts

```bash
# List all workflows
curl -s "$API/workflows/" -H "$AUTH"

# Get one workflow
curl -s "$API/workflows/{id}/" -H "$AUTH"

# Update a workflow
curl -s -X PUT "$API/workflows/{id}/" -H "$AUTH" -H "Content-Type: application/json" -d '{payload}'

# Delete a workflow
curl -s -X DELETE "$API/workflows/{id}/" -H "$AUTH"
# Expect 204
```

## Troubleshooting

| Issue | Solution |
| --- | --- |
| 401 Unauthorized | Token needs `alerts:write` scope |
| 403 Forbidden | Token must belong to the target org |
| 404 Not Found | Check org slug and region (`us` vs `de`) |
| 400 Bad Request | Validate payload JSON structure, check required fields |
| User ID not found | Verify email matches a member of the org |

© getsentry · Apache-2.0 · getsentry/sentry-for-ai

Похожие скиллы

Всё по теме «DevOps и инфраструктура» →
sentry-cocoa-sdk getsentry Скилл проводит агента по шагам настройки Sentry в приложении на Swift или ObjC: сканирует проект, предлагает набор функций и выдаёт код инициализации. CX Codex +1 328установок sentry-mcp getsentry Подключает Sentry к ИИ-ассистенту: разбор ошибок, трейсов и производительности прямо в диалоге. Пригодится, когда баг нужно найти, не уходя из редактора. CX Codex +1 ★ 944звёзд репо on-call-handoff-patterns Seth Hobson Скилл помогает передавать дежурство между инженерами: фиксирует инциденты, расследования и изменения. Нужен для смен, онбординга и передачи инцидента. CX Codex 10 300установок alerting-irm grafana Настраивает Grafana Alerting, IRM и SLO: от правил и маршрутизации до дежурств и эскалаций. Пригодится для YAML- и API-конфигурации. CX Codex +1 5 100установок sentry brianlovin Даёт агенту правила Sentry для отслеживания ошибок и трассировки производительности в Next.js. Нужен при добавлении такой инструментализации в приложение. CX Codex +1 2 800установок fix-sentry-issues brianlovin Скилл находит сбои через Sentry MCP, сортирует их и устраняет первопричину в кодовой базе. Помогает при разборе аварийных всплесков и очистке логов от шума. CX Codex +1 2 700установок

Из того же набора31

sentry-fix-issues Ищет ошибки в Sentry через MCP-сервер, разбирает трейсы и готовит исправления в коде. Пригодится при разборе инцидентов и багов в продакшене. CX Codex +1 10 000установок sentry-react-native-sdk Скилл проводит агента через настройку Sentry в React Native и Expo: сканирует проект, предлагает набор функций и ведёт по шагам установки. CX Codex +1 4 100установок sentry-sdk-setup Определяет язык и фреймворк проекта и подключает нужный SDK Sentry: ошибки, трейсинг, session replay. CX Codex +1 3 600установок sentry-nextjs-sdk Скилл сканирует проект на Next.js и помогает настроить мониторинг Sentry для браузера, Node.js и Edge Runtime. Пригодится при подключении трейсинга, сессий или сборе ошибок с роутов и Server Actions. CX Codex +1 3 600установок sentry-cocoa-sdk Скилл проводит через полную настройку Sentry в iOS, macOS, tvOS, watchOS и visionOS: сканирует проект, предлагает набор функций и ведёт по шагам установки. CX Codex +1 3 400установок sentry-node-sdk Скилл сканирует проект и ведёт по шагам подключения Sentry к серверному JavaScript и TypeScript: ошибки, трейсинг, логи, кроны. CX Codex +1 3 300установок sentry-sdk-upgrade Скилл помогает обновить Sentry JavaScript SDK между мажорными версиями, например с v7 до v8 или v9. Он находит устаревший код, обновляет импорты и проверяет сборку проекта. CX Codex +1 3 100установок sentry-react-sdk Скилл проводит через полную настройку Sentry в React-проекте: сканирует зависимости, предлагает набор функций и пишет конфиг. Пригодится, когда нужно подключить мониторинг ошибок без ручного разбора документации. CX Codex +1 3 100установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой