investigating-logs
Ce qu’il fait
Cette skill lit vos logs PostHog pour répondre à la question de savoir si un service est en bonne santé, ce qui a causé un pic d'erreurs, ou ce qu'un flux de logs signale. Elle s'adresse aux développeurs et aux personnes d'astreinte qui ont besoin de réponses rapides.
Quand l’utiliser
- ✓Quand vous voulez vérifier qu'un service ou un déploiement fonctionne après une modification.
- ✓Quand les erreurs ont augmenté et que vous voulez savoir ce qui a changé.
- ✓Quand vous avez besoin de preuves dans les logs pour une panne signalée par une alerte ou un utilisateur.
Lien du skill
https://github.com/PostHog/posthog/blob/master/products/logs/skills/investigating-logs/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Mon dernier déploiement a-t-il cassé quelque chose ? Vérifie les logs et dis-moi ce qui a changé.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La skill regroupe d'abord les logs en schémas répétés et les compare à une période antérieure, pour voir ce qui est différent. Ce n'est qu'à la fin qu'elle lit les lignes de log brutes.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Investigating logs
Investigation is a narrowing problem: summarize before you read.
One posthog:logs-patterns call compresses millions of lines into at most 200 templates,
and one posthog:logs-patterns-diff call answers "what is different about now vs. before" directly.
Raw rows (posthog:query-logs) are the last step of an investigation, never the first.
When to use this skill
- "Check the logs" / "is service X healthy?" / "did my deploy (or model bump, config change, migration) break anything?"
- "Why are errors up?" / "explain this spike" / incident triage — "what changed?"
- "What is this service logging?" — orienting in an unfamiliar or noisy stream.
- Finding the log evidence for a failure reported elsewhere (an alert, an error-tracking issue, a user complaint).
When not to use this skill
- Creating or tuning log alerts — that's
authoring-log-alerts. - Analytics over product events, persons, or insights — that's
querying-posthog-data. - HogQL exposes a
logstable viaposthog:execute-sql, but do not investigate through it: hand-written SQL over logs routinely hits read-byte caps and re-derives what the tools below do in one cheap call. Reserve SQL for the rare case of joining log-derived facts with non-log data.
Tools
| Tool | Job |
|---|---|
posthog:logs-services-create |
Top-25 services with log_count, error_count, error_rate, sparkline. Orientation. |
posthog:logs-patterns |
Mine one window's message templates, ordered by frequency. "What is this stream saying?" |
posthog:logs-patterns-diff |
Diff templates between two windows: new / rate-shifted / gone. "What changed?" |
posthog:logs-count / posthog:logs-count-ranges |
Scalar and time-bucketed counts for a filter. Localize volume before pulling rows. |
posthog:logs-sparkline-query |
Volume over time broken down by severity or service (the one bucketed view with a breakdown). |
posthog:logs-facet-values-create |
Distribution of severity/service (or a resource attribute) under a filter. |
posthog:logs-attributes-list / posthog:logs-attribute-values-list |
Discover attribute keys and values before building filters. |
posthog:query-logs |
Raw rows. Endpoint of every drill-down, entry point of none. |
Each tool's own description documents its parameters and response shape — read it before calling.
Pick the workflow by question shape
"Is it healthy?" — post-deploy / post-change verification
The user changed something (deploy, model bump, config, migration) and wants to know the logs still look right.
- Pin down the change time and the affected service(s). Ask if the user hasn't said; the diff is meaningless without a boundary.
- Orient with
posthog:logs-services-create: is the service still logging at all, and what is its error_rate now? A service that went silent fails verification just as hard as one that started erroring. posthog:logs-patterns-diffwithquery.dateRangefrom the change time to now andbaselineDateRangeset to a comparable window just before the change, scoped toserviceNames. New error/fatal templates right after a change are the classic regression signature; largerate_ratioshifts on existing error templates are the second thing to check.- Check volume continuity with
posthog:logs-count-rangesspanning before and after the boundary: a rate discontinuity (crash loop, restart storm, silence) shows up here even when message content looks unchanged. - Drill only the suspects: pivot each suspicious pattern to raw lines via its
match_regexwithposthog:query-logs.
A pass verdict needs all three: no new error templates, no large error rate_ratio shifts, and continuous volume. Say which windows you compared — "healthy" is o
Questions fréquentes
Pourquoi ne pas lire d'abord les lignes brutes ?
Il y en a trop pour être lues. Le résumé montre d'abord les schémas importants.
Faut-il écrire du SQL pour interroger les logs ?
En général non. La skill recommande ses outils de synthèse, car le SQL écrit à la main sur les logs atteint souvent des limites de lecture.
Peut-elle aussi créer des alertes ?
Non. La création ou le réglage des alertes de logs relève d'une autre skill.
Détails
Description originale de l’auteur
Investigate logs in a PostHog project: verify a service or deployment is healthy, explain an error spike, triage an incident, or understand what a log stream is saying. Use when the user asks to "check the logs", asks whether a service, deploy, release, or change is working or broke anything, asks why errors are up or what changed, or wants the root cause of failures visible in logs. Routes the logs MCP tools (services overview, pattern mining, before/after pattern diffing, bucketed counts, facets, raw rows) so investigations start from summaries instead of raw rows or hand-written SQL over th
repo: PostHog/posthog
Popularité
- Étoiles GitHub
- 41k
- Position au classement
- #6889
- Licence
- —
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
depot-ci
41kAide votre agent à configurer et exécuter des workflows Depot CI, alternative à GitHub Actions, en migrant les workflows existants et en lisant les journaux.
depot-container-builds
41kAide votre agent à construire des images Docker sur les constructeurs distants de Depot, y compris les images multiplateformes et la correction des échecs.
depot-github-runners
41kAide votre agent à faire tourner les jobs GitHub Actions sur les machines gérées par Depot, à choisir la taille des runners et leurs labels, et à résoudre les problèmes de configuration.
editing-agents-md
41kAide votre agent à décider si une règle doit figurer dans un fichier AGENTS.md ou CLAUDE.md, et à la rédiger pour qu'elle soit suivie sans alourdir le fichier.
Skills similaires
openclaw-update
394kAide votre agent à mettre à jour une passerelle OpenClaw existante, en choisissant la méthode adaptée à son installation et en gardant votre session active.
diagnose-gateway
394kAide votre agent à trouver pourquoi votre passerelle OpenClaw échoue, en vérifiant les paramètres, les canaux et les ports sans rien modifier.
crabbox-apps
394kAide votre agent à ouvrir et exécuter une application sur une machine cloud temporaire, puis à afficher sa vue dans le panneau latéral de votre chat.