By PostHog
Access PostHog analytics, A/B testing, feature flags, error tracking, and session replay via your AI coding assistant. Automatically capture AI coding sessions for LLM cost and latency insights.
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
Explore PostHog MCP intent clusters — agent goals grouped by semantic similarity, with each cluster's tool distribution and error rates. Use when the user asks "what are agents trying to do with the MCP?", "group the intents", "which goals fail most?", "what does each cluster route to?", wants to recompute the clustering, or pastes an MCP analytics intent-clustering URL.
Investigate individual PostHog MCP sessions — the sequence of tool calls a single agent made in one run, what it was trying to do, and where it went wrong. Use when the user asks "what did this MCP session do?", "show me the tool calls for session X", "what was the agent's goal?", "which sessions had errors?", or pastes an MCP analytics sessions URL.
Investigate the quality of PostHog MCP tool calls — error rates, latency, reach, and which tools are failing or slow. Use when the user asks "which MCP tool has the highest error rate?", "what's the slowest tool?", "which tools fail most often?", "how reliable is tool X?", wants a tool-quality matrix, or pastes an MCP analytics tool-quality / dashboard URL and asks what it shows.
Diagnose why a PostHog endpoint is slow or expensive and propose a concrete fix — bump the cache TTL, enable materialisation, restructure variables, or rewrite the query. Use when the user says "this endpoint is slow", "my endpoint times out", "we're hitting the cost cap on this one", or asks "should I materialise this?". Focuses on a single named endpoint, not a project-wide audit.
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.
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 claimnpx claudepluginhub anthropics/claude-plugins-official --plugin posthogBased 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
Share Claude Code sessions to GitHub repositories
Use Amplitude like an expert - instrument analytics, discover product opportunities, analyze charts, create dashboards, manage experiments, and understand users and accounts
Amplitude-powered analytics skills — analyze dashboards, charts, experiments, feedback, and account health with AI.
Claude Code skill pack for PostHog (24 skills)
AI agent skills that make SaaS products data-ready for product analytics — from codebase scan to tracking plan to working instrumentation code.
PROACTIVELY use this agent when experiments are started, modified, or when results need analysis. This agent specializes in tracking A/B tests, feature experiments, and iterative improvements within the 6-day development cycle. Should be triggered automatically when experimental code paths or feature flags are introduced. Examples:\n\n<example>\nContext: When implementing feature flags or A/B test variants\nuser: "Add a feature flag to test the new onboarding flow"\nassistant: "I've implemented the feature flag for the onboarding flow A/B test. Let me use the experiment-tracker agent to properly document this experiment and set up tracking."\n<commentary>\nEvery feature flag represents an experiment that needs proper tracking and success metrics.\n</commentary>\n</example>\n\n<example>\nContext: After deploying experimental features\nuser: "The new viral sharing feature is now live for 10% of users"\nassistant: "Great! The viral sharing feature is deployed. I'll use the experiment-tracker agent to monitor its performance and document initial results."\n<commentary>\nLive experiments need immediate tracking setup to capture valuable data from the start.\n</commentary>\n</example>\n\n<example>\nContext: When reaching experiment milestones\nuser: "It's been a week since we launched the TikTok integration test"\nassistant: "Perfect timing for analysis. Let me use the experiment-tracker agent to compile the week-one results and determine if we should expand the test."\n<commentary>\nRegular experiment checkpoints ensure data-driven decisions about feature rollouts.\n</commentary>\n</example>\n\n<example>\nContext: Before making product decisions\nuser: "Should we keep the AI avatar feature or remove it?"\nassistant: "Let me analyze the experiment data to inform this decision. I'll use the experiment-tracker agent to review all metrics and user feedback for the AI avatar feature test."\n<commentary>\nProduct decisions should be backed by experiment data, not gut feelings.\n</commentary>\n</example>
Data analytics skills for PMs: SQL query generation and cohort analysis. Analyze user data, generate queries, and identify retention patterns.