posthog

posthog is a skill for Claude Code, Codex from byaan-ai/byaan. It costs 15 tokens per session (2,566 once invoked), scanned A, original, MIT.

A connection to PostHog, a product-analytics service that stores events such as feature use and can show users, reports, and feature flags. It lets the agent query that data with HogQL, PostHog's query language.

In plain words
What is it for?
Use it to query events, analyze product usage, inspect users and reports, or read feature-flag data through PostHog's API.
Why use it?
It avoids manually searching PostHog for product data and lets the agent answer questions from event and user records. A PostHog personal API key and project ID are required.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to query events, analyze product usage, inspect users and reports, or read feature-flag data through PostHog's API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/byaan-ai/byaan/posthog
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add byaan-ai/byaan --skill posthog
Clone the repo
git clone --depth 1 https://github.com/byaan-ai/byaan

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for posthog

README.md
[![agentmods](https://agentmods.dev/badge/skills/byaan-ai/byaan/posthog/github.svg)](https://agentmods.dev/skills/byaan-ai/byaan/posthog)
Your own site
<a href="https://agentmods.dev/skills/byaan-ai/byaan/posthog"><img src="https://agentmods.dev/badge/skills/byaan-ai/byaan/posthog/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for posthog

Your own site · 80×15
<a href="https://agentmods.dev/skills/byaan-ai/byaan/posthog"><img src="https://agentmods.dev/badge/skills/byaan-ai/byaan/posthog.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,566 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.02566
Opus 5 $0.00008 $0.01283
Sonnet 5 $0.00003 $0.00513
Haiku 4.5 $0.00002 $0.00257

Measured 12d ago against content hash 8158ec21d4b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

posthog scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

server/skills/posthog/SKILL.md · 387 lines

How it starts

The opening of the file, as written. The whole thing — 387 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostHog

Use the PostHog API to query events, run HogQL analytics, and access product data like persons, insights, and feature flags.

Setup Guide

Before using this skill, you need to create a Personal API Key and find your Project ID.

1. Create a Personal API Key

  1. Open PostHog and click your avatar in the bottom-left corner
  2. Click "Settings"
  3. Navigate to the "Personal API Keys" tab
  4. Click "Create personal API key"
  5. Give it a label (e.g., "Byaan")
  6. Configure scopes as described below
  7. Click "Create key"
  8. Copy the key (starts with phx_)
  9. Paste this key in Settings > Skills > PostHog in the app

2. Find Your Project ID

  1. In PostHog, go to Project Settings (gear icon in sidebar)
  2. Look at the URL — it contains the numeric project ID: https://us.posthog.com/project/12345/settings
  3. The number after /project/ is your Project ID (e.g., 12345)
  4. Enter this ID in Settings > Skills > PostHog in the app

3. Required Scopes

When creating the Personal API Key, enable Read access for the following scopes:

Scope Access Purpose
Query Read Execute HogQL queries
Event Read Access event data
Person Read Access person/user data
Insight Read Access saved insights
Dashboard Read Access dashboards
Feature flag Read Access feature flag configurations
Cohort Read Access cohort definitions

All other scopes can be set to "No access" for maximum security.

4. Base URL (Region)

The default base URL is https://us.posthog.com (US Cloud). If you use a different region:

Region Base URL
US Cloud https://us.posthog.com
EU Cloud https://eu.posthog.com
Self-hosted Your custom domain

How Authentication Works

You do not need to handle authentication manually. When you call execute_skill_api(), the system automatically:

  1. Retrieves the API key from the configured credentials
  2. Adds the Authorization: Bearer <api_key> header
  3. Sends the request with proper content-type headers

Read the full file on GitHub · 387 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 387 lines · 15 tokens per session scan A 8158ec21d4b2

Subscribe to this mod's changes

posthog is a skill published in the GitHub repository byaan-ai/byaan (95 stars, last pushed 16d ago), licensed MIT. It adds 15 tokens to every session and 2,566 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.