posthog
Skill by stagewise-io
Gives an AI assistant access to the PostHog REST API using a stored Personal API Key. It is for analysts and developers who want to query PostHog analytics, feature flags and related data.
Install posthog
Built from the published package, never by AI.
git clone --depth 1 https://github.com/stagewise-io/stagewise /tmp/stagewise && mkdir -p ~/.claude/skills && cp -r /tmp/stagewise/apps/browser/bundled/plugins/posthog ~/.claude/skills/posthogRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/stagewise-io/stagewise /tmp/stagewise && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/stagewise/apps/browser/bundled/plugins/posthog ~/.gemini/antigravity-cli/skills/posthogAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The PostHog skill gives an AI assistant access to the PostHog REST API using a stored Personal API Key. It can run HogQL queries against analytics data, list and inspect events and persons, read saved insights, and create, update or delete feature flags. It also reads experiments, cohorts, actions, dashboards, surveys and web analytics stats.
The assistant needs to know whether the user is on the US or EU PostHog Cloud region and the numeric project ID. It can take the project ID from the dashboard URL or ask the user. Requests use Bearer authentication through a sandbox fetch proxy that substitutes the key. The skill suits developers and analysts who want to query PostHog data from an AI assistant.
Written from the project's SKILL.md and checked against it.
What it can do
- HogQL queriesRuns SQL-like HogQL queries against PostHog analytics data such as events and persons.
- EventsLists events with filters and gets a single event by ID.
- PersonsLooks up persons by ID, email, or search term.
- InsightsLists saved insights and reads their definitions and last results.
- Feature flagsLists, reads, creates, updates and deletes feature flags.
- ExperimentsLists experiments and reads their details and results.
- Cohorts and actionsLists and reads cohorts and actions in the project.
- AnnotationsLists, creates, updates and deletes annotations on the project timeline.
- Dashboards and surveysLists and reads dashboards and surveys.
- Web statsRuns web analytics stats queries such as breakdowns by page.
What you need
- PostHog account
- PostHog Personal API Key stored in the skill settings
- PostHog Cloud project ID
- Access to the US or EU PostHog Cloud region
Try asking
- Show the top 20 events from the last 7 days in PostHog
- Find the PostHog person with the email user@example.com
- List my active feature flags and their rollout percentages
Good to know
- Works with PostHog Cloud only, in the US or EU region.
- Most endpoints need a numeric project ID.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: apps/browser/bundled/plugins/posthog/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md13 KB -
logo.svg2 KB -
metadata.json229 B
Alternatives to posthog
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
posthog: common questions
Which PostHog regions are supported?
The source lists two PostHog Cloud regions: US (us.posthog.com) and EU (eu.posthog.com). The assistant must determine which one the user is on.
How does the skill authenticate with PostHog?
It reads a stored Personal API Key (phx_...) through the credential store and sends it as a Bearer token. The sandbox fetch proxy substitutes the real value.
Can the skill run custom analytics queries?
Yes. It can run arbitrary HogQL queries against the analytics database, which the source describes as the most powerful endpoint for analytics.
How do I install posthog?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is posthog free?
The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.
Is posthog safe to use?
It scores 86 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to posthog?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
