Claude Skills for PostHog: 10 HogQL Skills + Copy-Paste Prompts
Quick answer: Save each recurring PostHog question as a Claude skill that names the HogQL query to run. Ryze AI is the best Claude connector for running these skills when you want PostHog next to ad and SEO data in one connection, with one caveat: it connects one PostHog project per workspace.
Below: 10 SKILL.md files, the PostHog tables and fields each uses, install steps and quick prompts.
Used by 2,000+ marketers
The 10 Claude skills for PostHog at a glance
Eight skills only read. Two (cohort builder and dashboard builder) create objects, and you can leave them off.
- 01Weekly product digestEvents and visitors, week over week
Main PostHog fields: event, distinct_id, timestamp
Access: Read
- 02Top pagesMost viewed URLs and their trend
Main PostHog fields: properties.$current_url, $pageview
Access: Read
- 03Traffic source qualityWhich channels bring engaged sessions
Main PostHog fields: $channel_type, $entry_utm_source, $is_bounce
Access: Read
- 04Landing page bounceEntry pages that lose visitors
Main PostHog fields: $entry_pathname, $is_bounce, $session_duration
Access: Read
- 05UTM and click id auditMissing or inconsistent campaign tags
Main PostHog fields: $entry_utm_campaign, $entry_gclid
Access: Read
- 06Signup funnelWhere visitors drop between steps
Main PostHog fields: event, distinct_id
Access: Read
- 07Event auditEvents that stopped or never fire
Main PostHog fields: event definitions, event counts
Access: Read
- 08Feature flag reviewFlags to clean up or check
Main PostHog fields: feature flags
Access: Read
- 09Cohort builderSave a segment as a cohort
Main PostHog fields: persons, events
Access: Write
- 10Dashboard builderGroup insights into one dashboard
Main PostHog fields: insights, dashboards
Access: Write
| # | Skill | Job | Main PostHog fields | Access |
|---|---|---|---|---|
| 01 | Weekly product digest | Events and visitors, week over week | event, distinct_id, timestamp | Read |
| 02 | Top pages | Most viewed URLs and their trend | properties.$current_url, $pageview | Read |
| 03 | Traffic source quality | Which channels bring engaged sessions | $channel_type, $entry_utm_source, $is_bounce | Read |
| 04 | Landing page bounce | Entry pages that lose visitors | $entry_pathname, $is_bounce, $session_duration | Read |
| 05 | UTM and click id audit | Missing or inconsistent campaign tags | $entry_utm_campaign, $entry_gclid | Read |
| 06 | Signup funnel | Where visitors drop between steps | event, distinct_id | Read |
| 07 | Event audit | Events that stopped or never fire | event definitions, event counts | Read |
| 08 | Feature flag review | Flags to clean up or check | feature flags | Read |
| 09 | Cohort builder | Save a segment as a cohort | persons, events | Write |
| 10 | Dashboard builder | Group insights into one dashboard | insights, dashboards | Write |
Every query in these skills uses a table or field named in PostHog's own docs, listed in Sources. PostHog was not connected to a test workspace when this page was written, so run each skill once on your project and check the first answer against a PostHog insight.
What are Claude skills for PostHog?
A Claude skill for PostHog is a saved SKILL.md file that tells Claude which HogQL query to run and what to hand back. Per Anthropic's Agent Skills docs, the file starts with a name and a description, and Claude loads the rest only when a request matches the description.
The name allows up to 64 lowercase letters, numbers and hyphens and cannot contain the words claude or anthropic, so every skill here starts with posthog. The description, up to 1,024 characters, says what the skill does and when to use it.
What it is
- One-off prompt
- A question in chat
- Skill
- A saved file with a fixed query and output
- PostHog connection
- Tools Claude uses to query PostHog
Setup
- One-off prompt
- None
- Skill
- Save once per Claude app
- PostHog connection
- A PostHog personal API key and host
Same result each run
- One-off prompt
- No
- Skill
- Yes
- PostHog connection
- Depends on the prompt or skill
| One-off prompt | Skill | PostHog connection | |
|---|---|---|---|
| What it is | A question in chat | A saved file with a fixed query and output | Tools Claude uses to query PostHog |
| Setup | None | Save once per Claude app | A PostHog personal API key and host |
| Same result each run | No | Yes | Depends on the prompt or skill |
The queries are written in HogQL, PostHog's SQL dialect. It reads the events and persons tables, and event properties use dot notation such as properties.$current_url. Session fields such as $entry_utm_source and $channel_type live in the sessions table.
How to install the skills in Claude Code and claude.ai
Claude Code
Save each block as ~/.claude/skills/<skill-name>/SKILL.md for yourself, or .claude/skills/<skill-name>/SKILL.md in a project to share it with the team. Claude picks a skill when your request matches it, or you type /posthog-weekly-digest (Claude Code skills docs).
claude.ai
Zip each skill folder and upload it as a custom skill. Anthropic lists custom skills on Pro, Max, Ultra, Team and Enterprise plans with code execution enabled.
Connect the data
The PostHog MCP page lists the 3 PostHog tools on the Ryze AI connector. The setup below covers the PostHog key and the connector.
Custom skills do not sync across surfaces: a skill uploaded to claude.ai is not in Claude Code, and the reverse. Anthropic advises using skills only from sources you trust, so read each file before you save it. More free skills are in the Claude skills library.
Reporting skills: the weekly and page view
These two answer the weekly questions. Every query carries a time window and a LIMIT of 1,000 or less, because PostHog stops unbounded HogQL queries.
01. Weekly product digest
Compares the last 7 complete days with the 7 before, by event name, and names the events behind each change in visitors.
Use it when: you send a Monday update or need one line per event.
02. Top pages
Lists the most viewed URLs from the $pageview event and compares them with the previous period.
Use it when: you plan content or check what a release changed.
Acquisition skills: where visitors come from
These three read the sessions table, which holds the entry page, referrer, UTM values and channel for each session.
03. Traffic source quality
Ranks channels by what visitors do after landing and flags channels with many sessions and a high bounce rate.
Use it when: you plan next month's channel mix.
04. Landing page bounce
Lists entry pages with traffic and a high bounce share, using the entry path of each session.
Use it when: you need a short, traffic-ordered list of pages to fix.
05. UTM and click id audit
Finds campaigns written several ways and sessions that arrive with a Google click id but no UTM campaign.
Use it when: before a monthly report, or when PostHog campaign counts differ from the ad platform.
Product skills: funnels, events and flags
These three check what visitors do in the product and whether the setup is healthy. They only read.
06. Signup funnel
Counts distinct people at each step event. This is an approximation: it does not check order. PostHog's funnel insight offers sequential, strict order and any order, with a conversion window, so use it when order matters (funnel docs).
Use it when: you need a first look at the drop-off before building a funnel insight.
07. Event audit
Lists the event definitions in the project and compares them with the events that fired recently, to find dead or duplicated events.
Use it when: you take over a project, or right after a release to confirm an event still fires.
08. Feature flag review
Reads the feature flags of the project and lists the ones to look at before a cleanup.
Use it when: you run a monthly flag cleanup. Changes stay in PostHog or in a separate request.
Build skills: cohorts and dashboards
These two use posthog__write to create objects. They only work when the PostHog key has write scopes, and PostHog rejects any change on a read-only key. In Claude, set write and delete tools to Needs approval if you want to confirm each change.
09. Cohort builder
Turns a plain description of a segment into a cohort, after the user confirms the definition.
Use it when: you want to reuse a segment in insights or flags.
10. Dashboard builder
Groups the insights a recurring review needs into one dashboard.
Use it when: you set up a recurring review. The integrations hub lists the other platforms Ryze AI connects.
Quick PostHog prompts: no skill file needed
For a one-time question, a plain prompt is enough once Claude can reach PostHog. Replace the words in brackets and keep the time window.
If an answer looks off, ask Claude to show the HogQL query it sent.
How to run the skills on live PostHog data
A skill only describes the query; Claude needs a connection to run it. The Ryze AI connector gives Claude 3 PostHog tools:
posthog__read
- What it does
- Reads projects, insights, dashboards, feature flags, cohorts, persons and event definitions, and runs HogQL queries
- Used by
- Skills 01 to 10
posthog__write
- What it does
- Creates or updates insights, dashboards, feature flags and cohorts
- Used by
- Skills 09 and 10
posthog__delete
- What it does
- Deletes a PostHog object by path, such as a cohort; irreversible
- Used by
- None of these skills
| Tool | What it does | Used by |
|---|---|---|
| posthog__read | Reads projects, insights, dashboards, feature flags, cohorts, persons and event definitions, and runs HogQL queries | Skills 01 to 10 |
| posthog__write | Creates or updates insights, dashboards, feature flags and cohorts | Skills 09 and 10 |
| posthog__delete | Deletes a PostHog object by path, such as a cohort; irreversible | None of these skills |
Connect PostHog in 4 steps
Create a key
In PostHog, open Settings, Personal API keys, click Create key, grant read access to the project with the Query and Insight scopes, and copy the phx_ key. Add write scopes only for skills 09 and 10.
Connect in Ryze AI
In the Ryze AI app, open Integrations, click Connect on the PostHog card, paste the key, enter the host (https://us.posthog.com, https://eu.posthog.com or a self-hosted URL), then pick the Project and click Save.
Add the connector
Add https://connector.get-ryze.ai/mcp in Claude under Customize, Connectors and include the workspace. If you added it before connecting PostHog, remove and re-add it, then start a new chat.
Run a skill
Ask a question that matches a skill description, or type the skill name in Claude Code, and check the query Claude sent.
Details are in the Ryze AI help center PostHog page and the Claude connect guide. The full tool reference is on the PostHog MCP page. Connecting the connector is free; the tools need an active plan or trial, from Paid Ads at $89 a month with a 7-day free trial (see pricing).
Ryze AI connects one PostHog project per connection, and what the agent can change is limited by the scopes on the key. The same connector carries the other Ryze AI platforms, so the Ryze AI chat can read PostHog next to ad and SEO data. PostHog also runs its own hosted MCP server at https://mcp.posthog.com/mcp, which routes you to the US or EU region from your PostHog login and covers more of PostHog, such as error tracking and experiments (PostHog MCP docs). Skills work with either; the table names in these skills do not change.
In the Ryze AI app, the same instructions can run as a scheduled task every day, week or month. Scheduled tasks run without an approval step, so use a read-only key for tasks that should never change PostHog.
Approvals
The Ryze AI chat starts on Skip all approvals, so the agent runs PostHog tools on its own by default. Switch the Tool approvals picker to Approve write & delete (reads run freely, changes need approval) or Manual approve. In Claude, set write and delete tools to Needs approval under Customize, Connectors, Ryze AI, Tool permissions.
Troubleshooting: when a PostHog skill returns a wrong answer
Claude has no PostHog tools
Claude keeps the tool list from when you added the connector. Remove and re-add it, then start a new chat (Ryze AI connector FAQ).
The query is stopped
PostHog stops unbounded HogQL queries. Add a time window on timestamp or $start_timestamp and a LIMIT of 1,000 or less.
A change is rejected
The personal API key has read scopes only. Add the write scope for that object type in PostHog, or make the change in PostHog.
A field name is rejected
Ask Claude to list the columns of the table and retry. Session fields start with $ and live in the sessions table, while event properties use properties.$name.
Wrong project
Ryze AI holds one PostHog project per connection. To switch, click View on the PostHog card, disconnect and connect again, or use another workspace.
Rate limit errors
PostHog lists limits per key: 240 a minute and 1,200 an hour for analytics endpoints, and 2,400 an hour for the query endpoint (PostHog API docs). Run fewer skills at once.
Numbers differ from the ad platform
PostHog and ad platforms count visits and conversions differently. Pick one source per decision.
Sources
Checked November 10, 2026
- PostHog docs: HogQL
- PostHog docs: Sessions data
- PostHog docs: Events data
- PostHog docs: Funnels
- PostHog docs: API and rate limits
- PostHog docs: MCP server
- Anthropic: Agent Skills overview
- Claude Code: Skills
- Ryze AI help center: Connect PostHog
- Ryze AI help center: Claude connector FAQ
- Ryze AI help center: Scheduled tasks
The verdict
Turn each recurring PostHog question into a skill with a fixed HogQL query. Start with the weekly digest and traffic source quality, run the event audit before you trust the numbers, and keep one-off questions as prompts.
Ryze AI runs these skills in Claude on live PostHog data through 3 tools. Use a read-only key unless you want skills 09 and 10, and check the first answer of each skill against a PostHog insight.





