adding-warehouse-perso…
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Explore and diagnose a PostHog endpoint's execution logs — error messages, failed runs, cache misses, slow runs, or unexpected row counts during endpoint invocations. Use when the user says "my endpoint is failing", "show me the logs for endpoint X", "what error did endpoint Y
$ npx -y skills add PostHog/ai-plugin --skill exploring-endpoint-execution-logs --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/exploring-endpoint-execution-logsContext preview
The summary Claude sees to decide when to auto-load this skill.
Explore and diagnose a PostHog endpoint's execution logs — error messages, failed runs, cache misses, slow runs, or unexpected row counts during endpoint invocations. Use when the user says "my endpoint is failing", "show me the logs for endpoint X", "what error did endpoint Y
name: exploring-endpoint-execution-logs description: > Explore and diagnose a PostHog endpoint's execution logs — error messages, failed runs, cache misses, slow runs, or unexpected row counts during endpoint invocations. Use when the user says "my endpoint is failing", "show me the logs for endpoint X", "what error did endpoint Y produce", "why did endpoint Z return no rows", "is this endpoint hitting cache", or "check the last N runs". Focused on a single named endpoint's runtime log entries, not project-wide auditing or query performance profiling.
Every endpoint run emits one execution log entry to PostHog's `log_entries` store. This skill reads those entries for a specific endpoint to answer "what happened when it ran?". It is the log-level counterpart to `diagnosing-endpoint-performance` (which reasons about cache/materialisation strategy from config and `query_log`).
If the question is "this endpoint is slow, what should I change?", use `diagnosing-endpoint-performance`. If it's project-wide ("what can I clean up?"), use `auditing-endpoints`.
Each run produces exactly one entry. The level is `INFO` on success and `ERROR` on failure, and the message carries the extra data as searchable `key=value` tokens:
Endpoint executed · path=materialized cache=hit duration_ms=142 rows=1024 version=3 Endpoint execution failed · path=inline error=ResolutionError version=3
Token meanings:
| Token | Values | Meaning | | ------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | | `path` | `materialized` / `inline` / `ducklake` / `ducklake_fallback` | Which execution path ran | | `cache` | `hit` / `miss` | Whether the query result cache was used (omitted for ducklake) | | `duration_ms` | integer | Wall-clock execution time | | `rows` | integer | Number of result rows returned | | `version` | integer | Which endpoint version ran | | `error` | e.g. `ResolutionError`, `HogVMException` | Error class / HogQL code name (failures only) |
Each run gets a distinct `instance_id`, so logs group one-per-execution in the viewer.
| Tool | Purpose | | --------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `endpoint-logs` | Primary. Execution log entries for one endpoint by name. Filter by level, search, time range, instance_id; `limit` up to 500. | | `endpoint-get` | Endpoint config for context (current version, materialisation, query kind) | | `execute-sql` | Fallback / aggregation directly against `log_entries` (`log_source='endpoints'`) |
`endpoint-logs` exposes the standard log filters:
`key=value` tokens, you can search `cache=miss`, `path=inline`, `error=ResolutionError`, or a specific `version=3`.
1. Identify the endpoint by name. If given a URL, parse it from `/api/projects/{team_id}/endpoints/{name}/run`. 2. Start broad: `endpoint-logs` for the endpoint with a recent time range. Skim levels and tokens. 3. Narrow to the symptom:
version bump. 4. For counts/trends across many runs (e.g. error rate over a week), drop to `execute-sql` against `log_entries`:
SELECT toDate(timestamp) AS day, upper(level) AS level, count() AS runs FROM log_entries WHERE log_source = 'endpoints' AND log_source_id = '<endpoint_uuid>' GROUP BY day, level ORDER BY day DESC
Get the endpoint UUID from `endpoint-get` (the `log_source_id` is the endpoint id, not its name).
5. Summarize: what's failing, since when, on which version/path, and whether it's a config issue (hand off to `diagnosing-endpoint-performance`) or a query bug.
User: "weekly_signups started erroring this morning" Agent steps: - endpoint-logs weekly_signups, level=ERROR, after=<this morning> → several "Endpoint execution failed · path=inline error=ResolutionError version=5" - endpoint-get weekly_signups → current version is v5 (bumped today) - endpoint-logs weekly_signups, level=INFO, before=<this morning> → prior runs: "path=inline cache=hit ... version=4" succeeded - "v5 (created this morning) is failing with a ResolutionError on the inline path — it can't resolve a table or field refere
Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Repo: PostHog/ai-plugin
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with…
Split a completed PostHog task run into activity records — what the agent tried, whether it worked, what blocked it — and record each one through the…
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by…
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can…