verify-posthog-instrumentation
What it does
This skill combines several checks to confirm a website's PostHog setup is working from start to finish. It is for site owners and developers who want a clear answer after installing or changing tracking.
When to use it
- βWhen you have just installed PostHog and want to confirm it works.
- βWhen a deploy changed analytics code and you want to check that events still arrive.
- βWhen a customer says they are not seeing events in PostHog.
Skill link
https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI just added PostHog to my website. Can you check that it is installed on every page and that events are arriving?β
5 new skills a week. 1 minute to read.
How it works
The agent first checks each key page for the PostHog snippet and its settings. It then sends simulated new and returning visits to confirm that events are received, and reports a pass or fail summary.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Verify PostHog instrumentation
End-to-end check that the PostHog SDK is loaded and emitting events as expected. This skill orchestrates the three traffic-sim tools to give a complete picture of a site's instrumentation health.
When to use
- After running
npx @posthog/wizardto confirm the install actually works. - After a deploy that touches analytics, tracking, or layout code.
- When a customer reports "I'm not seeing events in PostHog" β to disambiguate between snippet issues, network issues, or filtering issues.
- As a smoke test before launching a new site or marketing page.
Workflow
Step 1 β Confirm the snippet is loaded everywhere
Run the check_posthog_loading MCP tool against the URLs you care about
(homepage, key product pages, login, checkout, marketing pages). It returns
which pages have PostHog initialized, the load method (head_snippet / snippet
/ array_js_only), and the init config.
Look for:
- Pages where
loaded: falseβ PostHog is missing from those pages. - Inconsistent
api_keyvalues across pages β multiple projects in use. - Inconsistent
api_hostvalues across pages β events going to different ingestion endpoints.
Step 2 β Send synthetic traffic and confirm events arrive
Pick one URL where Step 1 confirmed PostHog is loaded. Call:
simulate_new_userβ a few fresh-browser visits. Confirms$pageviewfires for first-time visitors and that an anonymous distinct_id is assigned.simulate_returning_userβ a few page views in a single session. Confirms cookies persist and$pageviewkeeps firing across navigations.
The tools return verified: true when at least one $pageview was captured
and there were no errors.
Step 3 β Cross-check in PostHog
If Steps 1 and 2 pass but events don't show up in the PostHog UI, the issue is downstream of the snippet:
- Check for ingestion lag (events can take ~30s to appear).
- Check that the
api_hostmatches the project's ingestion host. - Check feature flag and ingestion warnings in the PostHog UI.
What "verified" means in this skill
A site is verified when:
check_posthog_loadingreportsloaded: trueon every URL we expect.simulate_new_userandsimulate_returning_userboth return at least one$pageviewevent per visit, with no errors.- (Optional) The events appear in the PostHog UI within 1-2 minutes.
What this skill does not check
- Whether your custom events (e.g.
signup_completed) are being sent β the tool watches for any PostHog event, but you'd need to drive the actual user flow to see custom events fire. Use it as a starting point, then add user-flow simulation on top. - Server-side ingestion. The tool only sees what the browser SDK sends.
- Session recording quality. The tool reports whether recording is enabled in the init config but doesn't validate the recording itself.
FAQ
What does the check look at first?
Whether PostHog is loaded on each page, and whether the project key and host match across pages.
Does this replace the PostHog dashboard?
No. It confirms that events are being sent, and you still view the results in PostHog.
Why would events go missing?
Common causes are a missing snippet, a network problem, or a filter that hides the events.
Details
Original description by the author
Use this skill to verify that PostHog instrumentation is firing correctly on a website. Drives a real browser at one or more URLs, observes which PostHog events actually arrive, and reports a pass/fail summary. Use after installing the PostHog SDK on a site, after a deploy that touches tracking code, or when events appear missing in the PostHog dashboard.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6988
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.