verify-posthog-instrumentation
Что он делает
Этот скилл объединяет несколько проверок, чтобы подтвердить, что настройка PostHog на сайте работает от начала до конца. Он нужен владельцам сайтов и разработчикам, которые хотят получить ясный ответ после установки или изменения отслеживания.
Когда использовать
- ✓Когда вы только что установили PostHog и хотите убедиться, что он работает.
- ✓Когда деплой изменил код аналитики и вы хотите проверить, что события все еще приходят.
- ✓Когда клиент говорит, что не видит события в PostHog.
Ссылка на скилл
https://github.com/PostHog/posthog/blob/master/tools/traffic-sim/skills/verify-posthog-instrumentation/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Я только что добавил PostHog на свой сайт. Можешь проверить, что он установлен на каждой странице и что события приходят?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент сначала проверяет каждую ключевую страницу на наличие фрагмента PostHog и его настроек. Затем он отправляет имитированные новые и вернувшиеся визиты, чтобы подтвердить получение событий, и выдает итог «пройдено» или «не пройдено».
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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.
Частые вопросы
Что проверка смотрит в первую очередь?
Загружен ли PostHog на каждой странице и совпадают ли ключ проекта и хост на всех страницах.
Это заменяет дашборд PostHog?
Нет. Проверка подтверждает, что события отправляются, а результаты вы по-прежнему смотрите в PostHog.
Почему события могут пропадать?
Частые причины: отсутствующий фрагмент, сетевая проблема или фильтр, который скрывает события.
Подробности
Оригинальное описание автора
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
Популярность
- Звёзды на GitHub
- 41k
- Место в рейтинге
- #6988
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
depot-ci
41kПомогает агенту настроить и запускать workflow в Depot CI, альтернативе GitHub Actions, включая перенос существующих workflow и чтение логов запусков.
depot-container-builds
41kПомогает агенту собирать Docker-образы на удалённых сборщиках Depot, включая мультиплатформенные образы, отправку в реестры и исправление ошибок сборки.
depot-github-runners
41kПомогает агенту переносить задачи GitHub Actions на раннеры Depot: выбирать размер и метки раннера и устранять проблемы настройки.
editing-agents-md
41kПомогает агенту решить, нужно ли правило в файле AGENTS.md или CLAUDE.md, и записать его так, чтобы оно работало, не раздувая файл.
Похожие скиллы
test-driven-development
311kУчит агента сначала писать падающий тест, увидеть, что он падает, и только затем писать минимальный код, который его проходит, прежде чем создавать любую функцию или исправление.
verification-before-completion
311kУчит агента запускать настоящие проверки и читать их вывод, прежде чем утверждать, что задача, исправление или сборка готовы или проходят.
migrate-to-shoehorn
310kЗаменяет рискованные приведения типов в тестовых файлах на библиотеку shoehorn, чтобы тесты могли использовать неполные данные и проходить проверку типов.