/check-posthog-loading
Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).
$ npx -y skills add posthog/posthog --skill check-posthog-loading --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/check-posthog-loading
Context preview
The summary Claude sees to decide when to auto-load this skill.
Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).
SKILL.md
check-posthog-loading.SKILL.mdname: check-posthog-loading
description: >
Inspect how the PostHog JavaScript SDK is loaded across a list of URLs.
Use to confirm consistent installation across pages, find pages missing
the snippet, detect mismatched API keys or hosts between pages, and verify
the load method (head snippet vs deferred vs array.js).
Check PostHog loading
For each URL, navigates a real browser to the page, waits for PostHog to initialize, and reports:
- Whether `window.posthog` is defined and `__loaded`.
- Which load method was used: `head_snippet`, `snippet`, `array_js_only`, or `none`.
- Where in the document the snippet lives (`head` / `body`).
- The init config: `api_key`, `api_host`, `person_profiles`.
- Runtime state including the assigned `distinct_id`.
When to use
- Sanity-check a fresh install — does the snippet actually load on every page?
- After a page-template change — did one page lose the snippet?
- When investigating split data — are some pages pointing at a different
`api_host` or `api_key` than others?
- Onboarding a new customer — confirm SDK is wired up before debugging events.
How to invoke
Call the `check_posthog_loading` MCP tool with:
- `urls` (required) — list of URLs to inspect.
- `posthog_host` (default `https://us.i.posthog.com`).
Returns a structured summary with which URLs loaded successfully, which didn't, and the load-method distribution.
Interpreting the result
Look for these red flags:
- **Empty `loaded` list, full `not_loaded` list** — snippet not present
anywhere. Re-run install or check that the layout includes the snippet.
- **Mixed `loaded` / `not_loaded`** — snippet missing from some pages.
Common cause: a page rendered by a different template or layout.
- **Multiple distinct `api_key` values across pages** — a page is pointing
at the wrong PostHog project.
- **Multiple distinct `api_host` values** — a page is pointing at the wrong
ingestion endpoint (e.g. EU cloud vs US cloud, or vs a self-hosted reverse proxy). This causes events to land in different projects than expected.
- **`load_method: array_js_only`** with no init config — `array.js` was
loaded but `posthog.init()` was never called. Common with manual installs that miss the second half.
Read more
name: check-posthog-loading description: > Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).
Check PostHog loading
For each URL, navigates a real browser to the page, waits for PostHog to initialize, and reports:
- Whether `window.posthog` is defined and `__loaded`.
- Which load method was used: `head_snippet`, `snippet`, `array_js_only`, or `none`.
- Where in the document the snippet lives (`head` / `body`).
- The init config: `api_key`, `api_host`, `person_profiles`.
- Runtime state including the assigned `distinct_id`.
When to use
- Sanity-check a fresh install — does the snippet actually load on every page?
- After a page-template change — did one page lose the snippet?
- When investigating split data — are some pages pointing at a different
`api_host` or `api_key` than others?
- Onboarding a new customer — confirm SDK is wired up before debugging events.
How to invoke
Call the `check_posthog_loading` MCP tool with:
- `urls` (required) — list of URLs to inspect.
- `posthog_host` (default `https://us.i.posthog.com`).
Returns a structured summary with which URLs loaded successfully, which didn't, and the load-method distribution.
Interpreting the result
Look for these red flags:
- **Empty `loaded` list, full `not_loaded` list** — snippet not present
anywhere. Re-run install or check that the layout includes the snippet.
- **Mixed `loaded` / `not_loaded`** — snippet missing from some pages.
Common cause: a page rendered by a different template or layout.
- **Multiple distinct `api_key` values across pages** — a page is pointing
at the wrong PostHog project.
- **Multiple distinct `api_host` values** — a page is pointing at the wrong
ingestion endpoint (e.g. EU cloud vs US cloud, or vs a self-hosted reverse proxy). This causes events to land in different projects than expected.
- **`load_method: array_js_only`** with no init config — `array.js` was
loaded but `posthog.init()` was never called. Common with manual installs that miss the second half.
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
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 LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

