PostHog API Skill for Openclaw

A comprehensive integration for managing PostHog analytics, feature flags, and HogQL queries via the REST API.

simonfunk
v1.0.0
Feb 17, 2026
0
1.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install posthog

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install posthog using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is PostHog API Skill?

This skill enables AI agents to interact directly with PostHog, a powerful open-source product analytics platform. By leveraging the REST API, the skill provides programmatic access to event capture, person management, and data visualization. Whether you are automating insights or managing experiments, this addition to your Openclaw Skills library streamlines the connection between your application data and your product intelligence strategy.

The integration supports two primary communication pathways: public endpoints for high-volume ingestion and private endpoints for management tasks. This dual-architecture ensures that developers can scale event tracking without hitting limits while maintaining full administrative control over dashboards, cohorts, and feature flags through authenticated requests.

PostHog API Skill Use Cases

  • Automating the capture of custom events and user actions within a workflow.
  • Evaluating and managing feature flags for A/B testing or progressive rollouts.
  • Running complex HogQL queries to extract data-driven insights without leaving the terminal.
  • Synchronizing person profiles and cohorts across different platforms.
  • Programmatically creating and managing dashboards for team reporting.

How PostHog API Skill Works

  1. The skill authenticates with PostHog using either a Personal API Key for private management or a Project API Key for public ingestion.
  2. Users interact with the API via the provided helper script or direct curl commands to specific regional endpoints (US or EU).
  3. Public endpoints handle high-volume event capture and flag evaluation without traditional rate limiting.
  4. Private endpoints enable CRUD operations for resources like dashboards, persons, and experiments, subject to organization-level rate limits.
  5. Data is queried using the HogQL engine, allowing for SQL-like syntax to filter and aggregate analytics data efficiently.

PostHog API Skill Setup

To get started with this skill, configure your environment with your PostHog credentials:

# 1. Export required environment variables
export POSTHOG_API_KEY="phx_your_personal_key"
export POSTHOG_PROJECT_ID="12345"
export POSTHOG_PROJECT_API_KEY="phc_your_project_key"

# 2. Configure regional hosts if using EU Cloud (Optional)
# export POSTHOG_HOST="https://eu.posthog.com"
# export POSTHOG_INGEST_HOST="https://eu.i.posthog.com"

# 3. Verify the installation
bash scripts/posthog.sh whoami

PostHog API Skill Data Schema & Taxonomy

The skill interacts with several primary data entities within the PostHog ecosystem as part of the Openclaw Skills framework:

Entity Description
Events Individual data points capturing user actions via the capture endpoint.
Persons Unique users identified by distinct IDs and properties.
Feature Flags Toggles and rollout logic for feature management and A/B testing.
HogQL SQL-like query language for events, persons, and sessions tables.
Dashboards Collections of insights and visualizations managed via private API.

PostHog API Skill Advanced Features

  • High-performance HogQL query execution for deep data analysis and custom reporting.
  • Support for regional multi-tenancy with US and EU Cloud configurations.
  • Automated feature flag rollout management including percentage-based triggers.
  • Integrated session recording and experiment management via private endpoints.
  • Rate-limit aware operations with specific handling for analytics and CRUD thresholds.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*