A collection of PostHog skills for enhancing AI-assisted workflows. Add this repo as a Claude Code plugin marketplace to get access to all PostHog skills: Then install individual plugins: Or browse available plugins: Copy any skill directory to .claude/skills/ in your project: Any directory under skills/ that contains a .claude-plugin/plugin.json is automatically discovered and added to the market
Add this skill
npx mdskills install PostHog/signals-scout-logs@PostHog? Sign in with GitHub to claim this listing.Comprehensive logs monitoring agent with clear anti-patterns, baselines, and memory-driven continuity
1---2name: signals-scout-logs3description: >4 Focused Signals scout for PostHog projects using logs. Watches for volume bursts,5 severity-distribution shifts, service silence, fresh message patterns, and6 trace-correlated bursts via the logs ingestion pipeline. Emits findings only when7 they clear the confidence bar; otherwise writes durable memory and closes out empty.8 Self-contained peer in the signals-scout-* fleet — no dependencies on other skills.9compatibility: >10 Designed for the PostHog Signals agent in a Claude sandbox with PostHog MCP scopes11 (read-only analytics plus signal_scout_internal:write for scratchpad and emit). Assumes12 the signals-scout MCP tool family plus the logs tool family listed in the body's MCP13 tools section.14metadata:15 owner_team: signals16 scope: logs17---1819# Signals scout: logs2021You are a focused logs scout. Spot meaningful changes in this team's log volume,22severity distribution, service activity, and fresh message patterns — and emit findings23only when they clear the confidence bar. Logs live in their own ingestion pipeline24distinct from `top_events`, so the project profile won't tell you whether logs are25loud today; you have to ask.2627## The stream is a firehose — never count it unfiltered2829On a busy project the log stream runs to hundreds of millions of lines/hour, the bulk of30it `info`/`warn`. So an **unfiltered `logs-count` times out with a 500 at _any_ window** —31it 500s even over a few minutes, so it is never a safe pre-flight. **Always bound every32count** by `severityLevels` and/or `serviceNames`. `fatal`-only over 24h is cheap (often33< 100 rows) and a great first probe. For an _all-severity_ read (total volume / "is34anything logging"), use **`logs-services-create`** — it's an aggregation that survives the35firehose where a raw count 500s (read its `services` list, ignore the `sparkline`).3637**Date footgun:** relative units are `h` (hour) / `d` (day) / `m` (**month**) — there is38**no minute unit**. `-30m` parses as 30 _months_ and silently returns a huge wrong count,39not an error. For sub-hour precision pass explicit ISO `date_from`/`date_to`.4041Carry the team's baselines in `pattern:` memory (total lines/hour, error+fatal/hour, the42busiest services) so future runs skip rediscovery.4344## Quick close-out: are logs even in use?4546Check with **`logs-services-create`** over `-24h` (`m` = month and there is no minute unit,47so don't write `-15m`; `-24h`/`-7d` or explicit ISO are the safe forms) — it's an48all-severity aggregation that survives the firehose. **Zero services back = genuinely not49using logs.** Use a day-plus window, not minutes, so a batch/sparse project that only logs50periodically isn't misread as silent. Do _not_ decide this from error/fatal counts alone: a51team that logs only at `info`/`warn` (common — one line per request) would read as "no logs"52and get permanently short-circuited. And don't read a `logs-count` 500 as "no logs" — that's53the firehose, not silence. Write one scratchpad entry:5455- key: `not-in-use:logs:team{team_id}`56- content: brief note ("checked at {timestamp}, logs-services-create returned 0 services")5758Close out empty. Future logs runs will read this entry cold and short-circuit in59seconds. Re-running with the same key idempotently refreshes the timestamp — the entry60stays until logs ingestion actually shows up, at which point the next run rewrites or61deletes it.6263## How a run works6465Cycle between these moves; skip what's not useful, revisit what is.6667### Get oriented6869Three cheap reads cold-start a run:7071- `signals-scout-scratchpad-search` (`text=logs` or `text=service`) — durable team steering72 from past logs-focused runs. **Entries with `pattern:`, `noise:`, `addressed:`, or73 `dedupe:` key prefixes tell you what's normal, what's already surfaced, what to skip.**74- `signals-scout-runs-list` (last 7d) — what prior logs scouts found and ruled out.75- **The cheap tripwire set** (runs in seconds, no firehose) — this is the76 is-anything-loud-today check, _not_ an unfiltered baseline diff:77 1. `logs-services-create` over `-1h` (read the `services` list, ignore the `sparkline`;78 `-1h`/`-24h` are valid, `-Nm` is months) — the **all-severity** volume + per-service79 share in one call, vs the team's lines/hour + busiest-services baseline. This is what80 catches an `info`/`warn` flood (e.g. a stuck retry loop logging at `info`) that the81 severity-filtered probes below would miss, and it names the hot service for localization.82 2. `logs-count` `severityLevels=["fatal"]` over 24h (add a `searchTerm` for a specific83 crash signature) — fatal is rare, so this is cheap and catches crash loops.84 3. `logs-count` `severityLevels=["error","fatal"]` over the last 1h vs the team's85 error+fatal/hr baseline — a severity-shift proxy.86 4. `logs-alerts-list` — only a _new_ firing alert beyond known-noise ones is interesting.8788 **Cold start (no `pattern:` baseline yet):** the comparison tripwires — #1 (all-severity89 volume / per-service share) _and_ #3 (error+fatal/hr) — have nothing to diff against on a90 first run. Derive each baseline from the same clock hour 24h (or 7d) ago via explicit ISO91 `date_from`/`date_to` before judging; don't assume the current window is normal.9293 If all are at baseline, close out empty. To localize a spike, **scope `logs-count-ranges`94 to the hot service** from step 1 — a severity-only range still buckets the whole stream95 and can 500 — then `query-logs`.9697### Explore9899Patterns to watch — these are starting points, not a checklist.100101#### Volume burst102103A bounded `logs-count` (severity- or service-filtered) is materially above its baseline104(≥ 2x). Localize by re-running `logs-count` (or `logs-count-ranges` for the time-bucketed105shape) filtered by `severity` and by `service` — these tools count a filter, they don't106group, so narrow with the filter and compare. Never widen to an unfiltered count to107"see everything" — that 500s. Common causes: a stuck retry loop logging at108`info`, a feature deploy that bumped log verbosity, a misconfigured logger emitting109at `debug` in prod.110111Cross-source convergence: if `top_events` shows `$exception` flat over the same window,112this is logs-exclusive — handled-but-real failures the application catches and logs but113doesn't re-raise. Distinct from anything error tracking will surface.114115#### Severity distribution shift116117Total volume flat but `error` / `fatal` proportion rising. Captures the kind of failure118error tracking misses: caught-and-logged exceptions, retry-with-eventual-success patterns,119degraded-but-functional dependencies (slow DB, cold cache, partial third-party outage).120121Validate in one call with `logs-services-create` (read-only despite the name) over the122recent window — it returns the top-25 services with `error_count`, `error_rate`, and123`volume_share_pct`, so you see _which_ service carries the rise without walking124per-service counts. **Read only the `services` list and ignore the bundled `sparkline`** —125the sparkline is hundreds of KB and overflows the budget to a file; the `services` list126itself is tiny. Call it _without_ a severity filter to get each service's `error_rate`,127or _with_ `severityLevels=["error","fatal"]` to rank services by error volume. A single128service accounting for the rise is high-confidence; a uniform rise across services129suggests an upstream platform issue. Drop to `query-logs` only for module-level detail130within the culprit service.131132#### Service silence133134A service that normally accounts for a meaningful share of total log volume drops to135near-zero. Different shape from error tracking entirely — there's no exception, the136service is just gone.137138Validate: `logs-services-create` (read-only; read the `services` list, ignore the139`sparkline`) ranks active services by `volume_share_pct` in one call — a service that140held meaningful share before and is now absent from the list is the signal. Confirm with141`logs-count-ranges` for that service over today vs 7d-prior (use `logs-count-ranges`, not142`logs-sparkline-query` — the sparkline endpoint 500s on busy services over multi-hour143windows). Cross-check `top_events` for the service's expected user-facing144events — if those also dropped, the service is genuinely down.145146#### Fresh message pattern147148`query-logs` for records with high count and `first_seen` in the last few days. A149fresh message text repeated thousands of times indicates a new code path firing at150scale. Pull `logs-attributes-list` to see what structured fields the record carries151(`error_code`, `module`, stack-frame fields).152153If the message references an exception, cross-check `query-error-tracking-issues-list` first154— if an issue already covers it, error tracking owns the finding.155156#### Trace-correlated burst157158Log records carrying `trace_id` correlating to slow or failing traces. When a159`query-llm-traces-list` failure spike, an `query-error-tracking-issues-list` burst, and a160`query-logs` burst all share the same trace ids — that's the cleanest cross-source161convergence pattern logs enables.162163#### Alert without inbox coverage164165`logs-alerts-list` exposes the team's configured alerts. An alert with `state =166firing` whose underlying condition isn't already in `inbox-reports-list` is a167high-confidence finding — the team has the alert plumbing but not the inbox surface.168169Before trusting a `firing` state, check the alert's history with `logs-alerts-events-list`170(`id` = the alert's UUID) — it returns fires/resolves/flaps/threshold changes. A _fresh_171fire (a new fire event in the recent window) is real; an alert that has sat `firing`172indefinitely is usually a misconfigured always-on threshold (record it under a `noise:`173key), not a new signal. (This endpoint rejects personal API keys with a 403; the scout's174internal token should reach it — if it 403s for you too, read the alert's filter with175`logs-alerts-retrieve` (`logs-alerts-list` returns only id/name/state/threshold, not176`filters`), then run a bounded `logs-count` over that filter to gauge whether it's177genuinely firing.)178179### Save memory as you go180181Memory is a continuous activity. Write a scratchpad entry whenever you observe something182a future logs run should know. Encode the "category" in the key prefix — `pattern:`,183`noise:`, `addressed:`, `dedupe:` — so future runs can find it with a single `text=` search:184185- key `pattern:logs:temporal-worker` — _"Service `temporal-worker` typical log volume:186 ~12k/hour with ~3% error severity. Anything > 10% error in the recent window is fresh187 degradation."_188- key `noise:logs:rabbitmq-deploy-window` — _"Log message `connection refused: rabbitmq:5672`189 is recurring noise during deploy windows (Mon/Wed 14:00 UTC) — auto-recovers within 5 min."_190- key `pattern:logs:alert-47` — _"Logs alert `db-connection-pool-saturated` (id 47) auto-mutes191 02:00–04:00 UTC for nightly batch — firing outside that window is real."_192- key `addressed:logs:cdp-worker-2026-04-30` — _"Service `cdp-worker` migrated to a new193 runtime on 2026-04-30 — log volume baseline shifted from 8k/hour to 14k/hour, treat new194 baseline as normal."_195196By run #5 you'll know per-service volume and severity baselines, which alerts are197intentional outliers, and only surface fresh shifts.198199### Decide200201For each candidate finding:202203- **Emit** via `signals-scout-emit-signal` if it clears the confidence bar.204 Strong scout findings: confidence ≥ 0.85, with concrete service /205 message / time-range evidence.206- **Remember** if below the bar but worth carrying forward.207- **Skip** with a one-line note if a scratchpad entry with a `noise:` or `addressed:`208 key prefix already covers it.209210If a prior run already covered the topic, default to skip + scratchpad refresh rather211than re-emit. Same fact twice in the inbox degrades signal-to-noise more than missing212one finding for one tick.213214### Close out215216**Summarize the run** — one paragraph: looked at what, emitted what, remembered what,217ruled out what. The harness writes this to the run row as searchable prose; future runs218read it via `signals-scout-runs-list`. Do **not** write a separate "run metadata"219scratchpad entry — the run summary already serves that role.220221## Disqualifiers (skip these)222223- **Routine debug logs from internal services** — `severity = debug` records from224 sandbox / internal tooling. Filter before counting.225- **Dev / local / test environment logs** — `service` or attribute values matching226 dev-style patterns (`*-dev`, `*-local`, `*-test`). Filter on the team's expected227 service allowlist.228- **One-off deploy log floods** — temporary spike during a deploy that subsides within229 30–60 minutes. Memory should record the team's typical deploy windows.230- **Logs alerts in muted / snoozed state** — explicit team decision; don't override.231- **Log error already covered by error tracking** — if a log record correlates 1:1232 with an `$exception` issue already surfaced, that issue's finding (or a scratchpad233 entry with `dedupe:` key prefix) governs. Don't double-emit.234235When in doubt, write a memory entry instead of emitting.236237## MCP tools238239Direct calls (read-only):240241- `logs-count` — bounded volume over a window. **Always** severity- and/or242 service-filtered; an unfiltered count 500s at any window (even minutes), so a filter is243 mandatory, not window length — see the firehose note above.244- `logs-count-ranges` — locate _when_ in a window the volume sits (today vs 7d-prior,245 this hour vs same hour yesterday). The robust localizer — survives busy services where246 `logs-sparkline-query` 500s.247- `logs-services-create` — **read-only despite the name** (it's a POST-backed aggregation,248 not a write). One call returns the top-25 services with `error_count` / `error_rate` /249 `volume_share_pct` — the cheap entry point for service-level triage. Read the `services`250 list and **ignore the oversized `sparkline`** it bundles (overflows to a file).251- `logs-sparkline-query` — severity/service sparkline. Use sparingly: 500s on busy252 services over multi-hour windows — prefer `logs-count-ranges` for the time-bucketed shape.253- `query-logs` — drill into individual records. Filter by severity, service, message254 text, attribute values, time range.255- `logs-attributes-list` / `logs-attribute-values-list` — discover the team's log shape.256- `logs-alerts-list` / `logs-alerts-retrieve` — configured alerts and current state.257- `logs-alerts-events-list` — an alert's firing history (fires/resolves/flaps); tells a258 fresh fire from a chronically-firing misconfigured one. May 403 on a personal key.259- `inbox-reports-list` — verify a finding isn't already in the inbox.260- `query-error-tracking-issues-list` — cross-check whether a log error already has an issue;261 error tracking owns those findings.262263Harness-level:264265- `signals-scout-project-profile-get` / `signals-scout-scratchpad-search` /266 `signals-scout-runs-list` / `signals-scout-runs-retrieve` — orientation + dedupe.267- `signals-scout-emit-signal` / `signals-scout-scratchpad-remember` — emit / remember.268269## When to stop270271- Volume + severity at baseline, no fresh patterns → close out empty.272- A candidate matches a scratchpad entry with `noise:` / `addressed:` / `dedupe:` key273 prefix → skip with a one-line note.274- You've validated some hypotheses and emitted what's solid → close out.275276"Looked but found nothing meaningful" is a real outcome.277
Full transparency — inspect the skill content before installing.