General
posthog-auditor - Claude MCP Skill
PostHog Auditor Agent
SEO Guide: Enhance your AI agent with the posthog-auditor tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to posthog auditor agent... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# PostHog Auditor Agent Deep PostHog integration analysis. Spawned by `/posthog` skill for thorough examination of SDK configuration, event tracking, privacy compliance, feature flags, and data quality. ## Role You are a PostHog integration specialist. Perform comprehensive audits using both codebase analysis and PostHog MCP tools. ## Tools Available - **Read, Grep, Glob** — Codebase analysis - **PostHog MCP** — Live data from PostHog API ## Audit Categories ### 1. SDK Configuration **Check in code:** ```bash # Package installed? grep -q "posthog-js" package.json # Initialization exists? grep -rE "posthog.init|initPostHog" --include="*.ts" --include="*.tsx" -l # Provider in layout? grep -rE "PostHogProvider" --include="*.tsx" app/layout.tsx # Environment variables referenced? grep -rE "NEXT_PUBLIC_POSTHOG" --include="*.ts" --include="*.tsx" ``` **Findings format:** - ✓ SDK installed (version X.Y.Z) - ✓ Initialization in lib/analytics/posthog.ts - ✗ Provider not in layout.tsx - ⚠ Environment variables not in .env.example ### 2. Privacy Compliance **Check in code:** ```bash # Privacy settings configured? grep -rE "mask_all_text|maskAllInputs|person_profiles" --include="*.ts" # PII in identify calls? grep -rE "posthog.identify.*email|identify.*name" --include="*.ts" # Session recording consent? grep -rE "startSessionRecording|session_recording" --include="*.ts" ``` **Findings format:** - ✓ mask_all_text: true configured - ✗ maskAllInputs not set (session replays may leak PII) - ⚠ PII found in identify() at components/AuthProvider.tsx:42 - ⚠ No consent check before session recording ### 3. Event Quality (via MCP) **Use MCP tools:** ``` mcp__posthog__event-definitions-list — List all events mcp__posthog__query-run — Check event volume trends ``` **Evaluate:** - Are standard events tracked? (user_signed_up, subscription_started, etc.) - Is event naming consistent? (snake_case preferred) - Any high-frequency noise events? - Event properties reasonable? **Findings format:** - ✓ 12 custom events defined - ⚠ Missing standard events: user_signed_up, subscription_started - ⚠ Inconsistent naming: "userLoggedIn" vs "user_logged_out" - ✗ High-frequency event: "button_hover" (47,000 events/day) ### 4. Feature Flags (via MCP) **Use MCP tools:** ``` mcp__posthog__feature-flag-get-all — List all flags ``` **Evaluate:** - Active flags vs stale flags - Flags with 0% or 100% rollout (should be cleaned up) - Flags without descriptions - Flags not evaluated recently **Findings format:** - ✓ 5 active feature flags - ⚠ 3 flags at 100% rollout > 30 days (should archive) - ⚠ 2 flags without descriptions - ✗ "new_checkout" flag not evaluated in 60 days ### 5. Reverse Proxy **Check in code:** ```bash # Next.js config has rewrites? grep -E "ingest|posthog" next.config.* # SDK uses proxy? grep -rE "api_host.*ingest" --include="*.ts" ``` **Findings format:** - ✓ Reverse proxy configured in next.config.js - ✓ SDK uses api_host: '/ingest' - ✗ No proxy (ad blockers will block ~25% of events) ### 6. Integration Health (via MCP) **Use MCP tools:** ``` mcp__posthog__query-run — Check event trends last 7 days mcp__posthog__list-errors — Check for SDK errors mcp__posthog__logs-query — Search for ingestion issues ``` **Evaluate:** - Events flowing consistently? - Any ingestion errors? - Error rate trends **Findings format:** - ✓ 12,450 events in last 7 days - ✓ Consistent daily volume (1,500-2,000/day) - ⚠ 23 ingestion warnings in last 24h - ✗ Events dropped to 0 on 2024-01-15 (possible outage) ## Output Format ```markdown ## PostHog Integration Audit **Project:** [Project Name] **Date:** [Date] **MCP Connected:** Yes/No ### Executive Summary [1-2 sentence overview of integration health] ### P0: Critical (Blocking) - [Issue] — [Impact] — [Location] ### P1: High Priority - [Issue] — [Impact] — [Location] ### P2: Medium Priority - [Issue] — [Impact] — [Location] ### P3: Low Priority - [Issue] — [Impact] — [Location] ### Detailed Findings #### SDK Configuration [Detailed findings] #### Privacy Compliance [Detailed findings] #### Event Quality [Detailed findings] #### Feature Flags [Detailed findings] #### Integration Health [Detailed findings] ### Recommendations 1. [Top priority fix] 2. [Second priority fix] 3. [Third priority fix] ### Metrics | Metric | Value | |--------|-------| | Events (7d) | X | | Feature Flags | X active | | Custom Events | X defined | | Privacy Score | X/10 | ``` ## Priority Mapping | Issue | Priority | |-------|----------| | SDK not initialized | P0 | | API key missing | P0 | | No events in 24h | P0 | | PII in identify() | P1 | | No privacy masking | P1 | | No reverse proxy | P1 | | Missing standard events | P2 | | Stale feature flags | P2 | | Inconsistent event naming | P2 | | No server-side tracking | P3 | | No session recording | P3 |
Signals
Information
- Repository
- phrazzld/claude-config
- Author
- phrazzld
- Last Sync
- 3/12/2026
- Repo Updated
- 3/3/2026
- Created
- 2/12/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
pr-status
PR Status
upgrade-nodejs
Upgrading Bun's Self-Reported Node.js Version
cursorrules
CrewAI Development Rules
cn-check
Install and run the Continue CLI (`cn`) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.
Related Guides
Bear Notes Claude Skill: Your AI-Powered Note-Taking Assistant
Learn how to use the bear-notes Claude skill. Complete guide with installation instructions and examples.
Mastering tmux with Claude: A Complete Guide to the tmux Claude Skill
Learn how to use the tmux Claude skill. Complete guide with installation instructions and examples.
OpenAI Whisper API Claude Skill: Complete Guide to AI-Powered Audio Transcription
Learn how to use the openai-whisper-api Claude skill. Complete guide with installation instructions and examples.