By PostHog
Query PostHog analytics, manage feature flags and experiments, debug session recordings, monitor errors and LLM traces, and set up data pipelines — all from your coding tool.
Manually send a Claude Code session log to PostHog LLM Analytics
Set up PostHog LLM Analytics to capture Claude Code sessions
Check if Claude Code sessions are being sent to PostHog LLM Analytics
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results.
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements. TRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap/click data, or to 'analyze/assess/review the heatmap' for a URL. DO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can I clean up?", "are any of my endpoints broken?", "which materialised versions are still being called?", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.
Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.
Audit the health of a PostHog project's data warehouse — find every broken or degraded pipeline item across sources, sync schemas, materialized views, batch exports, and transformations. Use when the user asks "what's broken in my warehouse?", "give me a health check", "audit my data pipeline", "why are some dashboards stale?", or wants a one-shot triage summary before deciding where to spend time. Produces a prioritized report of issues grouped by severity and type, with recommended next steps.
External network access
Connects to servers outside your machine
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Install the plugin:
claude plugin install posthog
Authenticate via OAuth:
# Just enter Claude Code anywhere
claude
# Then, use the /mcp command within Claude, select plugin:posthog:posthog, and press Enter
/mcp
Then follow the browser prompts to log into PostHog.
(Optional) Send Claude Code sessions to PostHog LLM Analytics.
Add to ~/.claude/settings.json (global) or .claude/settings.local.json (per-project):
{
"env": {
"POSTHOG_LLMA_CC_ENABLED": "true",
"POSTHOG_API_KEY": "phc_...",
"POSTHOG_HOST": "https://eu.i.posthog.com"
}
}
Both POSTHOG_LLMA_CC_ENABLED=true and POSTHOG_API_KEY are required. Sessions are sent when Claude Code exits. Set POSTHOG_LLMA_PRIVACY_MODE=true to redact prompt/output content. Add custom properties to all events with POSTHOG_LLMA_CUSTOM_PROPERTIES (JSON string, e.g. '{"ai_product": "my-app"}').
Install from the Cursor Marketplace or add manually in Cursor Settings > Plugins.
Add the marketplace:
codex plugin marketplace add PostHog/ai-plugin
Install the plugin from inside Codex:
codex
# Then run /plugins, select PostHog, and install
/plugins
gemini extensions install https://github.com/PostHog/ai-plugin
Install the plugin:
grok plugin install PostHog/ai-plugin --trust
Authenticate via OAuth:
On first use of a PostHog tool, Grok prompts you to authorize in your browser. Log into PostHog to connect.
Clone and install the plugin:
git clone https://github.com/PostHog/ai-plugin
claude --plugin-dir ./ai-plugin
Authenticate via OAuth:
/mcp
Then follow the browser prompts to log into PostHog.
This plugin provides access to 27+ PostHog tools across these categories:
The plugin also ships 30+ task-specific skills that your AI client loads on demand to follow PostHog best practices — covering HogQL query patterns, experiment creation and lifecycle, feature flags, data warehouse setup and troubleshooting, LLM analytics exploration, session replay diagnostics, and SDK instrumentation. Skills activate automatically when their description matches your request (e.g. "create an experiment", "why isn't my Stripe sync working?", "audit my feature flags"), so you generally don't need to invoke them by name.
> What feature flags do I have?
> Create a feature flag called new-onboarding for 50% of users
> Show me errors from the last 24 hours
> Which errors are affecting the most users?
> How many users signed up this week?
> What's the conversion rate for the checkout funnel?
> Show me all my experiments
> What are the results of the checkout-flow experiment?
> Create a new dashboard called Product Metrics
> Add the signup funnel insight to the Growth dashboard
> What are the responses to the NPS survey?
> Create a feedback survey for the checkout page
> What's my most triggered event?
> Show me the top 10 pages by pageviews
For self-hosted PostHog instances, set the POSTHOG_MCP_URL environment variable to point to your instance:
export POSTHOG_MCP_URL="https://mcp.your-posthog-instance.com/mcp"
MIT
npx claudepluginhub anthropics/claude-plugins-official --plugin posthogShare Claude Code sessions to GitHub repositories
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
Feature development with code-architect/explorer/reviewer agents, CLAUDE.md audit and session learnings, and Agent Skills creation with eval benchmarking from Anthropic.
Production-grade engineering skills for AI coding agents — covering the full software development lifecycle from spec to ship.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
Complete developer toolkit for Claude Code