Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

posthog-debugger

БесплатноБез исполняемых скриптовНе проверен

Debug and inspect PostHog implementations on any website. Use this skill when a user wants to understand how PostHog is implemented on a page, troubleshoot…

PostHogот PostHog★ 81 звезда на GitHub

Об этом скилле

PostHog Debugger

Inspect and debug PostHog implementations on any website using browser automation tools. This skill helps developers and product teams understand exactly how PostHog is configured and what data is being captured.

Critical Rules

  1. Always ask for the URL first if not provided.
  2. Always ask if the page requires login. If yes, guide the user to log in via Chrome first.
  3. Use browser tools to navigate and inspect. Prefer Chrome DevTools MCP (mcp__chrome-devtools__*) or Playwright MCP (mcp__playwright__*) tools.
  4. Check multiple signals. PostHog can be implemented in various ways - check scripts, network requests, and the window object.
  5. Report findings clearly. Summarize what you find in a structured format.
  6. Never modify anything. This is read-only inspection.

Initial Flow

When a user asks to inspect a PostHog implementation:

  1. Get the URL (if not provided)
  2. Navigate to the URL with ?__posthog_debug=true appended
  3. Check if login is required by taking a snapshot and looking for login indicators
  4. If login required, ask the user to authenticate in the browser
  5. Once authenticated, proceed with inspection

Detecting Login Pages

After navigating, take a snapshot and look for login indicators:

  • Page title contains "login", "sign in", "authenticate"
  • URL contains "login", "signin", "auth", "sso"
  • Page has username/password fields
  • Page shows "Sign in with Google/GitHub/etc." buttons

Authenticated Pages Workflow

If you detect a login page or the user mentions the page requires auth:

  1. Keep the browser open - you've already navigated there

  2. Ask the user to log in:

    "This page requires authentication. Please log in using the Chrome browser I just opened. Let me know when you're logged in and on the page you want to inspect."
    
  3. Once the user confirms, take a new snapshot to verify they're authenticated

  4. Add the debug parameter if not already present and reload if needed

  5. Proceed with inspection

Available Browser Tools

Chrome DevTools MCP

  • mcp__chrome-devtools__navigate_page - Navigate to URL
  • mcp__chrome-devtools__take_snapshot - Get page accessibility tree
  • mcp__chrome-devtools__evaluate_script - Run JavaScript to inspect PostHog
  • mcp__chrome-devtools__list_network_requests - See network traffic
  • mcp__chrome-devtools__get_network_request - Get request details
  • mcp__chrome-devtools__list_console_messages - Check for errors

Playwright MCP

  • mcp__playwright__browser_navigate - Navigate to URL
  • mcp__playwright__browser_snapshot - Get page snapshot
  • mcp__playwright__browser_evaluate - Run JavaScript
  • mcp__playwright__browser_network_requests - See network traffic
  • mcp__playwright__browser_console_messages - Check console

Inspection Workflow

Step 1: Navigate to the Page with Debug Mode

Always add ?__posthog_debug=true to the URL to enable PostHog's debug mode. This outputs detailed logs to the console.

  • If URL has no query string: https://example.com?__posthog_debug=true
  • If URL already has query string: https://example.com?foo=bar&__posthog_debug=true

Workflow:

  1. Navigate to the URL with the debug parameter
  2. Take a snapshot to see what loaded
  3. Check for login page indicators:
    • URL redirected to /login, /signin, /auth, /sso
    • Page title contains "log in", "sign in"
    • Page has login form fields
  4. If login detected:
    • Tell the user: "I've opened the page but it requires login. Please log in using Chrome, then let me know when you're ready."
    • Wait for user confirmation
    • Take a new snapshot to verify authentication
    • Add debug parameter to the new URL if needed
  5. If no login needed: Proceed with inspection

Step 2: Check PostHog Global Object

Execute JavaScript to inspect the posthog object on the window:

(() => {
  if (typeof posthog === 'undefined') {
    return { installed: false };
  }

  const ph = posthog;
  return {
    installed: true,
    version: ph.version || ph.LIB_VERSION || 'unknown',
    config: {
      token: ph.config?.token || ph.get_config?.('token') || 'not accessible',
      apiHost: ph.config?.api_host || ph.get_config?.('api_host') || 'not accessible',
      autocapture: ph.config?.autocapture ?? ph.get_config?.('autocapture') ?? 'not accessible',
      capturePageview: ph.config?.capture_pageview ?? ph.get_config?.('capture_pageview') ?? 'not accessible',
      capturePageleave: ph.config?.capture_pageleave ?? ph.get_config?.('capture_pageleave') ?? 'not accessible',
      sessionRecording: ph.config?.enable_recording_console_log !== undefined ||
                        ph.sessionRecording?.started ||
                        'check network',
      persistence: ph.config?.persistence || ph.get_config?.('persistence') || 'not accessible',
      debug: ph.config?.debug ?? ph.get_config?.('debug') ?? fa
Полный SKILL.md на GitHub

Установить posthog-debugger в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.claude-plugin/plugin.jsonREADME.md

FAQ

Что делает скилл posthog-debugger?

Debug and inspect PostHog implementations on any website. Use this skill when a user wants to understand how PostHog is implemented on a page, troubleshoot tracking issues, verify configuration, check what events are being sent, or audit a PostHog setup. Works with Chrome DevTools MCP and Playwright MCP to inspect live websites.

Как установить скилл posthog-debugger?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл posthog-debugger запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить posthog-debugger с