Agent skill

Posthog

by HybridAIOne in HybridAIOne/hybridclaw

Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets.

MITAuto-check passed

Install Posthog

skills CLI
$ npx skills add HybridAIOne/hybridclaw --skill posthog -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HybridAIOne/hybridclaw posthog --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HybridAIOne/hybridclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/posthog .claude/skills/posthog && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
posthog
GitHub stars
158
Token cost
~2.6k tokens
SKILL.md length
525 words
Files
2
Skills in repo
71
Repo updated
First seen
Licence
MIT

At a glance

Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets.

  • Works in 3 steps: Browser admin: open the active… → Browser /chat or TUI fallback → Local console fallback
  • SKILL.md covers Scope, Out Of Scope, Credential Rules and Default Workflow, plus 1 more section
  • Runs JavaScript scripts from its folder; calls node; reaches us.posthog.com and us.i.posthog.com; needs POSTHOG_PROJECT_TOKEN and POSTHOG_PERSONAL_API_KEY

What it does

Posthog is an agent skill from HybridAIOne/hybridclaw. Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with PostHog. The repository describes itself as: Enterprise-ready self-hosted AI assistant runtime with sandboxed execution, secure credentials, approvals, and memory. The licence is MIT.

Example prompts

  • “/posthog”

Requirements

  • A credential in POSTHOG_PROJECT_TOKEN
  • A credential in POSTHOG_PERSONAL_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Browser admin: open the active HybridClaw admin URL ending in /admin/secrets and set
  2. Browser /chat or TUI fallback
  3. Local console fallback

What it can do on your machine

Read from SKILL.md and the folder at commit 3624072. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • us.posthog.com
    • us.i.posthog.com
    • eu.posthog.com
    • eu.i.posthog.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • POSTHOG_PROJECT_TOKEN
    • POSTHOG_PERSONAL_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Posthog loads about 2.6k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 525 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HybridAIOne/hybridclaw at commit 3624072, republished under its MIT licence (© HybridAIOne). 525 words, ~2,640 tokens.

Download SKILL.mdSave it as .claude/skills/posthog/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
posthog
description
Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets.
user-invocable
true
requires.bins
node

PostHog

Use this skill for PostHog product analytics work: event capture, person property reads and updates, feature flag inspection, feature flag test evaluation, and bounded insight/HogQL queries.

Scope

  • capture a single product analytics event through the public capture endpoint
  • update person properties with a guarded $identify capture event
  • list and retrieve persons through the private persons API
  • list and retrieve feature flag metadata
  • test how a feature flag evaluates for a distinct id without changing the flag
  • run private query API requests for HogQL, trends, funnels, retention, and other PostHog query payloads
  • classify common PostHog auth, permission, validation, and rate-limit errors
  • measure skill run cost through normal HybridClaw UsageTotals

Out Of Scope

  • creating, editing, rolling out, or deleting feature flags
  • deleting persons or bulk deleting data
  • bulk historical imports or migration-sized batch capture
  • exporting large event/person tables on a schedule
  • bypassing PostHog region, project, environment, or credential configuration

Credential Rules

PostHog has two credential rails:

  • POSTHOG_PROJECT_TOKEN is the public project token used in capture payloads.
  • POSTHOG_PERSONAL_API_KEY is a private bearer credential used for persons, feature flags, and query endpoints.

Never paste either token into chat or helper arguments. The helper emits <secret:POSTHOG_PROJECT_TOKEN> inside capture JSON and bearerSecretName: "POSTHOG_PERSONAL_API_KEY" for private APIs, so the gateway injects credentials server-side.

Recommended setup order:

  1. Browser admin: open the active HybridClaw admin URL ending in /admin/secrets and set POSTHOG_PROJECT_TOKEN and POSTHOG_PERSONAL_API_KEY.
  2. Browser /chat or TUI fallback:
bash
/secret set POSTHOG_PROJECT_TOKEN <project-token>
/secret set POSTHOG_PERSONAL_API_KEY <personal-api-key>
/env set POSTHOG_HOST "https://us.posthog.com"
/env set POSTHOG_INGEST_HOST "https://us.i.posthog.com"
/env set POSTHOG_PROJECT_ID "12345"
/env set POSTHOG_ENVIRONMENT_ID "12345"
  1. Local console fallback:
bash
hybridclaw secret set POSTHOG_PROJECT_TOKEN "<project-token>"
hybridclaw secret set POSTHOG_PERSONAL_API_KEY "<personal-api-key>"
hybridclaw env set POSTHOG_HOST "https://us.posthog.com"
hybridclaw env set POSTHOG_INGEST_HOST "https://us.i.posthog.com"
hybridclaw env set POSTHOG_PROJECT_ID "12345"
hybridclaw env set POSTHOG_ENVIRONMENT_ID "12345"

Use the right regional hosts. For PostHog US Cloud, private API calls use https://us.posthog.com and capture calls use https://us.i.posthog.com. For EU Cloud, use https://eu.posthog.com and https://eu.i.posthog.com. For self-hosted deployments, use the self-hosted base URL for both when that is how the instance is exposed.

Show full SKILL.md (256 more words)Show less

Default Workflow

  1. Use plan for natural-language requests when you need to classify read vs write risk before executing.
  2. Run the bundled helper for live PostHog calls so request construction, gateway submission, credentials, and error interpretation stay in one place:
    bash
    node skills/posthog/posthog.cjs --format json run ...
  3. Use http-request only when you need to inspect the generated request or when a runtime exposes the built-in http_request tool but cannot run the helper against the gateway directly:
    bash
    node skills/posthog/posthog.cjs --format json http-request ...
  4. Pass only the emitted httpRequest object to the built-in http_request tool in that fallback path. Do not handcraft PostHog API calls from memory.
  5. For amber operations, run approval-plan first, get explicit operator confirmation, then rerun the exact helper command with --operator-grant.
  6. Keep capture payloads small and business-relevant. Do not send passwords, access tokens, full message bodies, contracts, or raw support transcripts as event/person properties.
  7. If a live PostHog call returns 401 or 403, stop after that first failure and ask the operator to verify the matching stored credential and scopes.
  8. If a private response is paginated and includes next, call the next URL only when the user needs another page.

Command Contract

Inspect the helper surface:

bash
node skills/posthog/posthog.cjs --help

Plan a request without contacting PostHog:

bash
node skills/posthog/posthog.cjs --format json plan "Show active flags for checkout"
node skills/posthog/posthog.cjs --format json plan "Capture a trial_started event for user_123"

Build an approval plan for a capture write:

bash
node skills/posthog/posthog.cjs --format json approval-plan capture-event \
  --event trial_started \
  --distinct-id user_123 \
  --properties-json '{"plan":"pro"}'

Capture a single event after explicit approval:

bash
node skills/posthog/posthog.cjs --format json run capture-event \
  --event trial_started \
  --distinct-id user_123 \
  --properties-json '{"plan":"pro"}' \
  --operator-grant

node skills/posthog/posthog.cjs --format json http-request capture-event \
  --event trial_started \
  --distinct-id user_123 \
  --properties-json '{"plan":"pro"}' \
  --operator-grant

Update person properties after explicit approval:

bash
node skills/posthog/posthog.cjs --format json http-request identify-person \
  --distinct-id user_123 \
  --set-json '{"company":"Acme GmbH","plan":"pro"}' \
  --operator-grant

Read persons:

bash
node skills/posthog/posthog.cjs --format json run list-persons \
  --environment-id 12345 \
  --search acme \
  --limit 50

node skills/posthog/posthog.cjs --format json http-request get-person \
  --environment-id 12345 \
  --person-id 018f6c8f-...

Read feature flags and test evaluation:

bash
node skills/posthog/posthog.cjs --format json http-request list-feature-flags

node skills/posthog/posthog.cjs --format json http-request get-feature-flag \
  --flag-id 42

node skills/posthog/posthog.cjs --format json http-request test-feature-flag \
  --flag-id 42 \
  --distinct-id user_123

Run an analytics query:

bash
node skills/posthog/posthog.cjs --format json http-request query \
  --hogql "select event, count() from events where timestamp > now() - interval 7 day group by event order by count() desc limit 10"

Use --query-json for PostHog query payloads beyond HogQL:

bash
node skills/posthog/posthog.cjs --format json http-request query \
  --query-json '{"kind":"TrendsQuery","series":[{"kind":"EventsNode","event":"$pageview"}]}'

Interpret a saved http_request error:

bash
node skills/posthog/posthog.cjs --format json explain-error --payload-file /tmp/posthog-error.json

© HybridAIOne, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/posthog of HybridAIOne/hybridclaw.

  • SKILL.md
  • posthog.cjs

Open the folder on GitHubat commit 3624072

Compare with similar skills

Posthog next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Posthog compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Posthog this skillHybridAIOne/hybridclaw158—~2.6kAutomated safety check: PassMIT
Opik Analytics Instrumentationcomet-ml/opik22k—~4.4kAutomated safety check: PassApache-2.0
C15tc15t/c15t1.9k1 repos~1.6kAutomated safety check: PassApache-2.0
Define Feature Flagmacro-inc/macro4.6k—~780Automated safety check: PassAGPL-3.0
Soku CLIAbout-Intelligence/soku-cli305—~2.4kAutomated safety check: PassMIT
Compare Array Bundle SizePostHog/posthog-js628—~599Automated safety check: PassCustom licence

Similar skills

  • Shows how to add product analytics events to Opik's frontend, Java backend and Python SDK, all reporting through Segment to PostHog with an opik_ name prefix.

    22k GitHub stars~4.4k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • C15t

    c15t/c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.

    1.9k GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • Define Feature Flag

    macro-inc/macro

    Define a frontend feature flag with defineFlag and wire its readers.

    4.6k GitHub stars~780 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Soku CLI

    About-Intelligence/soku-cli

    Guides an agent through the soku command line tool for ads, GA4 and PostHog data reads, ads writes, SEO hosting, automations, files and skill management.

    305 GitHub stars~2.4k tokensUpdated today
    Marketing & SEOAuto-check passed
  • Compare Array Bundle Size

    PostHog/posthog-js

    Official

    Quickly compare the posthog-js array.js bundle size in the current working tree against a git baseline using the repository's esbuild proxy.

    628 GitHub stars~599 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Authoring Log Alerts

    PostHog/posthog

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed

More from HybridAIOne/hybridclaw

All 71 skills in this repo
  • Hermes3000 Writing

    HybridAIOne/hybridclaw

    Use Hermes3000 to plan, draft, revise, save, check consistency, and export long-form manuscripts through the Hermes3000 AI writing portal API.

    158 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Manim Video

    HybridAIOne/hybridclaw

    Plan, script, render, and stitch Manim Community Edition videos in Python.

    158 GitHub stars~4.7k tokensUpdated today
    Auto-check: notes
  • Skill Creator

    HybridAIOne/hybridclaw

    Create and update SKILL.md-based skills with strong trigger metadata, lean docs, and reliable init, validate, package, and publish workflows.

    158 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • XLSX

    HybridAIOne/hybridclaw

    Create, edit, inspect, and analyze .xlsx spreadsheets and Excel workbooks.

    158 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Excalidraw

    HybridAIOne/hybridclaw

    Create and revise editable .excalidraw diagrams as Excalidraw JSON for architecture diagrams, flowcharts, sequence diagrams, concept maps, and other hand-drawn explainers.

    158 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Google Ads

    HybridAIOne/hybridclaw

    Manage Google Ads accounts with safe GAQL reporting, campaign planning, guarded mutations, and gateway-proxied REST API calls.

    158 GitHub stars~4k tokensUpdated today
    Auto-check passed

Works with

Questions about Posthog

What does Posthog do?

Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets. Posthog is an agent skill from HybridAIOne/hybridclaw. Capture PostHog events, update person properties, read persons, inspect feature flags, test flag evaluation, and run bounded analytics queries through gateway-managed secrets.

How do I install Posthog in Claude Code?

Run `npx skills add HybridAIOne/hybridclaw --skill posthog -a claude-code`. Or copy the skill folder (skills/posthog in HybridAIOne/hybridclaw) into .claude/skills/posthog in your project. Claude Code loads it when a task matches its description.

How do I install Posthog in Codex?

Run `npx skills add HybridAIOne/hybridclaw --skill posthog -a codex`. Or copy the skill folder (skills/posthog in HybridAIOne/hybridclaw) into .agents/skills/posthog in your project. Codex loads it when a task matches its description.

Can I use Posthog in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HybridAIOne/hybridclaw --skill posthog -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/posthog, .gemini/skills/posthog, .github/skills/posthog and .opencode/skills/posthog in your project.

What does Posthog need to run?

Going by SKILL.md and its folder, Posthog needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node) and credentials named POSTHOG_PROJECT_TOKEN and POSTHOG_PERSONAL_API_KEY. Our summary lists: A credential in POSTHOG_PROJECT_TOKEN; A credential in POSTHOG_PERSONAL_API_KEY.

Does Posthog access the network?

SKILL.md names 4 domains. In commands or code: us.posthog.com, us.i.posthog.com, eu.posthog.com and eu.i.posthog.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Posthog safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Posthog use?

Posthog is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Posthog use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Posthog?

Skills that share tags, products or a category with Posthog: Opik Analytics Instrumentation (comet-ml/opik, 22k stars), C15t (c15t/c15t, 1.9k stars), Define Feature Flag (macro-inc/macro, 4.6k stars) and Soku CLI (About-Intelligence/soku-cli, 305 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Posthog?

HybridAIOne (a GitHub organization) maintains it in HybridAIOne/hybridclaw, which has 158 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on October 9, 2026.

Source: HybridAIOne/hybridclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.