investigating-logs
できること
このスキルは、PostHogのログを読んで、サービスが正常か、エラーの急増の原因は何か、ログのストリームが何を示しているかに答えます。開発者や当番の担当者が、すぐに答えを必要とするときに使います。
使う場面
- ✓変更の後、サービスやデプロイが動いているか確認したいとき。
- ✓エラーが増えて、何が変わったかを知りたいとき。
- ✓アラートやユーザーから報告された障害の、ログの根拠が必要なとき。
スキルのリンク
https://github.com/PostHog/posthog/blob/master/products/logs/skills/investigating-logs/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“直近のデプロイで何かが壊れましたか?ログを確認して、何が変わったか教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
まずログを繰り返されるパターンにまとめ、以前の時刻と比べて、何が違うかを見ます。生のログの行は最後に読みます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
なぜ生のログの行を最初に読まないのですか?
読むには行が多すぎるため、まず要約で重要なパターンを示します。
ログを調べるためにSQLを書く必要がありますか?
通常は必要ありません。ログには、手書きのSQLが読み取り制限に当たることが多いため、このスキルは要約のツールを推奨します。
アラートを作ることもできますか?
いいえ。ログのアラートの作成や調整は、別のスキルで扱います。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 41k
- ランキング
- #6889
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
depot-ci
41kエージェントが、GitHub Actionsの代替であるDepot CIのワークフローを設定し実行できるよう支援します。既存のワークフローの移行や、実行ログの確認も含みます。
depot-container-builds
41kエージェントが、Depotのリモート・ビルダーでDockerイメージを作れるよう支援します。マルチプラットフォームのイメージ、レジストリへのプッシュ、ビルド失敗の修正を含みます。
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一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。