authoring-log-alerts
O que ela faz
Esta skill escolhe quais serviços monitorar, define limites de alerta a partir de padrões reais de log e os testa antes de você ativá-los. É para equipes que querem alertas úteis sem uma enxurrada de ruído.
Quando usar
- ✓Quando você quer configurar alertas para seus logs e não sabe por onde começar.
- ✓Quando você quer verificar se um serviço gera logs que valem um alerta.
- ✓Quando você acabou de ativar alertas de log e precisa de um conjunto inicial.
Link da skill
https://github.com/PostHog/posthog/blob/master/products/logs/skills/authoring-log-alerts/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Configure alguns alertas de log úteis para meus serviços, para que eu só fique sabendo de problemas reais.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Ela encontra os serviços mais movimentados e suas taxas de erro, analisa uma linha de base normal e rascunha os limites. Depois testa os limites com dados passados antes de você escolher para onde vão as notificações.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Com que frequência um alerta deve disparar?
A meta é que cada alerta dispare cerca de 0 a 3 vezes por semana, para que os alertas continuem úteis.
Ela consegue ajustar um alerta que já existe?
Não. Ajustar um alerta existente é uma tarefa separada que esta skill não cobre.
Ela ajuda durante um incidente ativo?
Não. Durante um incidente, é melhor olhar os logs diretamente em vez de criar alertas.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 41 mil
- Posição no ranking
- #6888
- Licença
- —
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
depot-ci
41 milAjuda seu agente a configurar e executar fluxos de trabalho do Depot CI, uma alternativa ao GitHub Actions, incluindo a migração de fluxos existentes e a leitura dos logs de execução.
depot-container-builds
41 milAjuda seu agente a criar imagens Docker nos builders remotos do Depot, incluindo imagens multiplataforma, envio para registros e correção de falhas de build.
depot-github-runners
41 milAjuda seu agente a levar tarefas do GitHub Actions para runners gerenciados pelo Depot, escolhendo os tamanhos e os rótulos dos runners e resolvendo problemas de configuração.
editing-agents-md
41 milAjuda seu agente a decidir se uma regra deve ficar em um arquivo AGENTS.md ou CLAUDE.md, e a escrevê-la de forma que seja seguida sem deixar o arquivo inchado.
Skills parecidas
openclaw-update
394 milAjuda seu agente a atualizar um OpenClaw Gateway existente, escolhendo o método que combina com a instalação e mantendo sua sessão funcionando.
diagnose-gateway
394 milAjuda seu agente a descobrir por que seu OpenClaw Gateway está falhando, verificando configurações, canais e portas sem alterar nada.
crabbox-apps
394 milAjuda seu agente a abrir e executar um app em uma máquina temporária na nuvem e depois mostrar a visualização dele no painel lateral do seu chat.