authoring-log-alerts
Qué hace
Esta skill elige qué servicios vigilar, establece umbrales de alerta a partir de patrones reales de logs y los prueba antes de activarlos. Está pensada para equipos que quieren alertas útiles sin una avalancha de ruido.
Cuándo usarla
- ✓Cuando quieres configurar alertas para tus logs y no sabes por dónde empezar.
- ✓Cuando quieres comprobar si un servicio genera logs que merezcan una alerta.
- ✓Cuando acabas de activar las alertas de logs y necesitas un conjunto inicial.
Link de la skill
https://github.com/PostHog/posthog/blob/master/products/logs/skills/authoring-log-alerts/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Configura unas cuantas alertas de logs útiles para mis servicios, para que solo me avisen de problemas reales.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Encuentra los servicios con más actividad y sus tasas de error, observa una línea base normal y redacta los umbrales. Después prueba los umbrales con datos pasados antes de que elijas a dónde van las notificaciones.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Con qué frecuencia debería dispararse una alerta?
El objetivo es que cada alerta se dispare entre 0 y 3 veces por semana, para que sigan siendo útiles.
¿Puede ajustar una alerta que ya existe?
No. Ajustar una alerta existente es una tarea aparte que esta skill no cubre.
¿Puede ayudar durante un incidente activo?
No. Durante un incidente conviene mirar los logs directamente en lugar de crear alertas.
Detalles
Descripción original del 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
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6888
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
depot-ci
41 milAyuda a tu agente a configurar y ejecutar flujos de Depot CI, una alternativa a GitHub Actions, y a leer los registros de ejecución.
depot-container-builds
41 milAyuda a tu agente a crear imágenes de Docker en los constructores remotos de Depot, incluidas las multiplataforma, y a corregir fallos.
depot-github-runners
41 milAyuda a tu agente a pasar los trabajos de GitHub Actions a runners gestionados por Depot, elegir su tamaño y etiquetas y resolver problemas de configuración.
editing-agents-md
41 milAyuda a tu agente a decidir si una regla debe ir en un archivo AGENTS.md o CLAUDE.md, y a escribirla para que se cumpla sin sobrecargar el archivo.
Skills parecidas
openclaw-update
394 milAyuda a tu agente a actualizar una Gateway de OpenClaw que ya existe, eligiendo el método de actualización que encaja con cómo se instaló y manteniendo tu sesión activa.
diagnose-gateway
394 milAyuda a tu agente a averiguar por qué falla tu Gateway de OpenClaw, revisando ajustes, canales y puertos sin cambiar nada.
crabbox-apps
394 milAyuda a tu agente a abrir y ejecutar una app en una máquina temporal en la nube y mostrar su vista en el panel lateral de tu chat.