authoring-log-alerts
Что он делает
Этот скилл выбирает, за какими сервисами следить, задаёт пороги оповещений по реальным шаблонам логов и проверяет их перед включением. Он предназначен для команд, которым нужны полезные оповещения без потока шума.
Когда использовать
- ✓Когда вы хотите настроить оповещения по логам и не знаете, с чего начать.
- ✓Когда вы хотите проверить, создаёт ли сервис логи, по которым стоит настроить оповещения.
- ✓Когда вы только что включили оповещения по логам и вам нужен стартовый набор.
Ссылка на скилл
https://github.com/PostHog/posthog/blob/master/products/logs/skills/authoring-log-alerts/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Настрой для моих сервисов несколько полезных оповещений по логам, чтобы я получал уведомления только о реальных проблемах.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл находит самые загруженные сервисы и их долю ошибок, смотрит на обычный базовый уровень и предлагает пороги. Затем он проверяет пороги на прошлых данных, прежде чем вы выберете, куда отправлять уведомления.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Authoring log alerts
Authoring an alert is a measurement problem, not a guessing problem. You are not trying to be exhaustive — you are trying to land thresholds that fire 0–3 times per week on real production patterns, on services that matter.
When to use this skill
- The user asks to "set up alerts" / "suggest alerts" for their project.
- The user wants to evaluate whether a service is producing alertable signal.
- The user has just enabled log alerting and wants a starter set.
When not to use this skill
- Tuning an alert that already exists — that's a different job (use
posthog:logs-alerts-events-listto inspect fire/resolve cadence andposthog:logs-alerts-partial-updateto adjust). - Investigating an active incident — pull rows with
posthog:query-logs, don't author an alert mid-incident.
Tools
| Tool | Job | Where it fits |
|---|---|---|
posthog:logs-services |
Top-25 services in window with log_count, error_count, error_rate, sparkline. | Step 1 — triage. |
posthog:logs-attributes-list / posthog:logs-attribute-values-list |
Discover keys/values for narrower filters. | Step 2, optional. |
posthog:logs-count-ranges |
Adaptive time-bucketed counts for a filter. | Step 3 — baseline. |
posthog:logs-alerts-simulate-create |
Replay a draft config against -7d history with full state machine. |
Step 4 — validate. |
posthog:logs-alerts-create |
Persist the alert. | Step 5 — ship. |
posthog:logs-alerts-destinations-create |
Wire the alert to Slack, webhook, or Microsoft Teams. | Step 5: ship. |
Do not call posthog:query-logs during authoring. You need distributions, not rows. Reserve posthog:query-logs for
the very end if the user asks "show me a sample of what would have fired" — limit: 10 is plenty.
Workflow
1. Triage — pick candidate services
Call posthog:logs-services for the last 24h with no filters. The response is capped at 25 services and includes a
sparkline, so it is small and bounded.
A service is a candidate when both are true:
log_countis non-trivial (≥ ~1k in 24h — quieter services produce too little signal to alert on).error_rateis non-zero, or the user has named the service explicitly.
Skip services with high volume but error_rate == 0 unless the user wants a volume-shape alert (e.g. "warn me
if api-gateway suddenly stops producing logs"). Volume-floor alerts use threshold_operator: below and need
different reasoning — see references/volume-floor-alerts.md.
If the user names a service, treat it as a candidate even without error signal.
2. (Optional) Narrow the filter
If a service has many error sub-types, an alert on "all errors" is usually too broad. Use
posthog:logs-attributes-list (try attribute_type: log) and posthog:logs-attribute-values-list to find a discriminator —
common ones are http.status_code, error.type, k8s.container.name. Add the narrowing filter to your draft.
Keep it simple: one severity filter + one or two attribute filters is plenty. Multi-clause filters are harder to reason about and rarely improve precision.
3. Baseline — characterise the candidate over 7 days
Call posthog:logs-count-ranges with the candidate's filters, dateRange: { date_from: "-7d" }, and
targetBuckets: 24 (one bucket ≈ 7h). The response gives you bucket counts.
Do not eyeball the percentiles or scale the threshold to the alert window manually. Pipe the count-ranges response into the helper script:
echo '<count-ranges JSON>' | python3 scripts/baseline_stats.py --window-minutes 5
The script returns:
{
"n_buckets": 12,
"bucket_minutes": 420.0,
"alert_window_minutes": 5,
"stats": { "p50": 12.0, "p95": 71.25, "p99": 126.25, "max": 140 },
"suggested_thresho
Частые вопросы
Как часто должно срабатывать оповещение?
Цель — чтобы каждое оповещение срабатывало примерно от 0 до 3 раз в неделю, чтобы оно оставалось полезным.
Может ли он настроить уже существующее оповещение?
Нет. Корректировка существующего оповещения — отдельная задача, которую этот скилл не охватывает.
Может ли он помочь во время активного инцидента?
Нет. Во время инцидента лучше смотреть логи напрямую, а не создавать оповещения.
Подробности
Оригинальное описание автора
Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.
repo: PostHog/posthog
Популярность
- Звёзды на GitHub
- 41k
- Место в рейтинге
- #6888
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
depot-ci
41kПомогает агенту настроить и запускать workflow в Depot CI, альтернативе GitHub Actions, включая перенос существующих workflow и чтение логов запусков.
depot-container-builds
41kПомогает агенту собирать Docker-образы на удалённых сборщиках Depot, включая мультиплатформенные образы, отправку в реестры и исправление ошибок сборки.
depot-github-runners
41kПомогает агенту переносить задачи GitHub Actions на раннеры Depot: выбирать размер и метки раннера и устранять проблемы настройки.
editing-agents-md
41kПомогает агенту решить, нужно ли правило в файле AGENTS.md или CLAUDE.md, и записать его так, чтобы оно работало, не раздувая файл.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.