Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Connects to PostHog via its REST API to capture events, evaluate feature flags, run HogQL queries, and manage analytics resources: persons, dashboards, experiments, surveys, cohorts, and session recordings. Two authentication modes are supported: a public project API key for capture and flags endpoints, and a personal API key for all private read/write operations.
HogQL lets you run SQL-style queries directly against events, persons, and sessions without exporting data to a separate warehouse or BI tool.
When to use it
- Capturing a user signup event with plan metadata attached
- Evaluating feature flags before rendering a new UI component
- Querying top events over the last 7 days with HogQL
- Creating a 50% rollout feature flag for a new dashboard
- Listing session recordings to debug a checkout funnel drop-off
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: What were the top 10 events in my PostHog project over the last 7 days?
- 1Authenticates with the personal API key via Authorization header
- 2Constructs a HogQL query selecting event name and count with a 7-day timestamp filter and LIMIT 10
- 3POSTs the query to /api/projects/:project_id/query/
- 4Parses the response rows and formats them as a ranked list
A ranked table of event names and their occurrence counts for the past 7 days
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.