Generated banner for Posthog
Generated logo for Posthog

Posthog

OpenAIOfficialCreated by PostHog, IncDistributed by OpenAI

  • Skill
  • Tool integration
  • Business and productivity
  • MIT
  • No issues found

From the author

Analyze product data and manage product tooling in PostHog. Use when the user wants product analytics or insights, HogQL/SQL queries, feature flags, experiments and A/B tests, error tracking, session replay, surveys, LLM analytics, dashboards, data warehouse, or PostHog documentation.
— the description by PostHog, Inc

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill enables an AI agent to interact with the PostHog product platform. It provides a structured approach to querying product data, managing feature flags, running experiments, and performing error tracking. By leveraging the connected PostHog application, the agent can execute HogQL queries, retrieve insights, and manage product tooling directly, ensuring that data-driven decisions are supported by live, project-specific information.

What it does

  • Executes HogQL and SQL queries to extract product insights and event data.
  • Manages feature flags, including creation, auditing, and toggling.
  • Facilitates the setup and readout of A/B tests and experiments.
  • Investigates software bugs and exceptions via error tracking tools.
  • Provides access to session replay data and qualitative user surveys.
  • Searches official PostHog documentation for syntax and product behavior guidance.

When to use it

  • When you need to analyze user behavior, trends, funnels, or retention metrics.
  • When managing product releases through feature flags or A/B testing.
  • When investigating application errors or performance issues.
  • When you need to track LLM-specific metrics like cost and latency.
  • When building or updating dashboards for team reporting.

Advantages

  • Uses live tool calls rather than potentially outdated pre-trained knowledge.
  • Provides a standardized workflow for reading data before performing write operations.
  • Enables direct management of product experiments and flags within the chat interface.
  • Supports complex data analysis through HogQL integration.
  • Reduces context switching by bringing product analytics into the agent environment.

Usage examples

“Show me the signups by week for this quarter.”
The agent queries the PostHog analytics surface to generate a trend report for user signups over the specified date range.
“Create a new feature flag for the beta release.”
The agent uses the feature flag tool to initialize a new flag, ensuring all required fields are populated correctly.
“What is the current status of the homepage A/B test?”
The agent retrieves the experiment readout, summarizing the performance metrics and providing a link to the PostHog UI.
“Find the most frequent error in the last 24 hours.”
The agent queries the error tracking surface to identify and report on the top exception issues.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/openai/posthog/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip posthog.zip -d .agents/skills

Documentation by PostHog, Inc

PostHog

Overview

This skill provides a structured workflow for working with PostHog from ChatGPT and Codex. It assumes the bundled PostHog app is connected so the PostHog tools are available for analytics, feature flags, experiments, error tracking, and more.

PostHog is an all-in-one product platform. The same project's data backs every surface below, so most questions can be answered by querying analytics or running HogQL, and most product changes (flags, experiments, surveys) can be made directly.

Prefer live tools over pre-trained knowledge. Your baked-in knowledge of PostHog's API, HogQL functions, and tool shapes may be outdated. The connected PostHog app advertises its own skills and tools at runtime and asks clients to prioritize its skills over raw tools — discover and follow those rather than guessing. When in doubt about syntax, limits, or product behavior, use the documentation-search tool.

Prerequisites

  • The PostHog app must be connected and accessible via OAuth.

  • Confirm which PostHog organization and project the request targets before reading or writing.

  • Self-hosted users connect against their own instance during the app's OAuth flow.

Required Workflow

Follow these steps in order. Do not skip steps.

Step 0: Connect the PostHog app (if not already configured)

If PostHog tools are unavailable, pause and ask the user to connect the PostHog app:

  1. Enable the bundled PostHog app for this plugin or session.

  2. Complete the PostHog OAuth flow if prompted, and select the correct organization/project.

  3. Restart Codex or the current session if the tools still do not appear.

After the app is connected, finish your answer and tell the user to retry so they can continue with Step 1.

Step 1

Clarify the user's goal and scope (e.g., a metric over a time range, a funnel, a new feature flag, an experiment readout, an error investigation). Confirm the target project, date range, event/property names, and any filters or cohorts.

Step 2

Discover the available PostHog skills/tools the connected app exposes and pick the right one for the task. Resolve identifiers (project ID, flag key, experiment ID, insight/dashboard ID, error issue ID) before calling tools. For anything involving syntax, function names, or product behavior, search the docs first.

Step 3

Execute PostHog tool calls in logical batches:

  • Read first — list/get/query (insights, events, HogQL/SQL, error issues) to build context.

  • Write next — create or update flags, experiments, surveys, dashboards, or insights with all required fields.

  • For destructive or broad changes (e.g., toggling a flag in production, ending an experiment), state the impact and confirm before applying.

Step 4

Summarize results with concrete numbers and links to the PostHog UI where available, call out caveats (sampling, person-on-events timing, date ranges), and propose next actions.

Capability Map

Use this to route a request to the right PostHog surface, then discover the exact tool the app exposes for it.

If the user wants to…PostHog surface
Answer a metric/trend/funnel/retention/path questionInsights & queries (trends, funnels, retention, paths, lifecycle, stickiness)
Run arbitrary SQL over events/personsHogQL / SQL execution
Create, toggle, or audit a feature flagFeature flags
Launch or read out an A/B testExperiments
Investigate a bug or exceptionError tracking (issues + events)
Watch how users actually behaveSession replay
Gather qualitative feedback (NPS, surveys)Surveys
Track LLM cost/latency/usageLLM analytics
Build or update a dashboardDashboards & insights
Connect or query external dataData warehouse
Look up how something works in PostHogDocumentation search

HogQL & Querying Tips

  • HogQL is PostHog's SQL dialect over the events/persons schema. Read the data schema before writing queries, and confirm event and property names exist.

  • With person-on-events enabled, person.properties.* on the events table reflect the value at ingestion time, not the person's current value — the same person can show different values across events. Don't build workarounds for "query-time" person properties.

  • Respect the project timezone when bucketing by day.

  • Start narrow (small date range, limited rows), validate, then widen.

Tips for Maximum Productivity

  • Batch related reads before writes; confirm identifiers up front.

  • Use natural-language asks where the app supports them ("signups by week this quarter").

  • Reference prior insights/dashboards instead of rebuilding from scratch.

  • For experiments and flags, double-check rollout conditions and targeting before enabling.

Troubleshooting

  • Tools missing: re-run the app connection/OAuth flow (Step 0); verify org/project access.

  • Empty or surprising results: re-check event/property names, date range, filters, and timezone; confirm the events exist via a small query.

  • Permission errors: confirm the connected account has access to the target project and the action (some changes require elevated roles).

  • Unsure about syntax or limits: search the PostHog docs rather than guessing.

Files

Requirements and compatibility

Written for: OpenAI Codex

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
PostHog, Inc
Publisher
OpenAI (Official)
Distributed by
OpenAI
Source
openai/plugins · plugins/posthog/skills/posthog · commit d420d13
Licence
MIT License (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by PostHog, Inc or OpenAI.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download posthog.zip