Agent skill

Posthog Instrumentation

by trycompai in trycompai/crm

Automatically add PostHog analytics instrumentation to code.

MITAuto-check passedFrontend & Design

Install Posthog Instrumentation

skills CLI
$ npx skills add trycompai/crm --skill posthog-instrumentation -a claude-code

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

GitHub CLI
$ gh skill install trycompai/crm posthog-instrumentation --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/trycompai/crm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/posthog-instrumentation .claude/skills/posthog-instrumentation && 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-instrumentation
GitHub stars
11k
Token cost
~420 tokens
SKILL.md length
97 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Automatically add PostHog analytics instrumentation to code.

  • Works in 3 steps: Identify the framework (React, Next.js,… → Check for existing PostHog setup → Add appropriate instrumentation
  • User asks to add tracking
  • SKILL.md covers When to Use, Workflow, Code Patterns and Best Practices
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Posthog Instrumentation is an agent skill from trycompai/crm. Automatically add PostHog analytics instrumentation to code. Triggers when user asks to add tracking, instrument events, add analytics, or implement feature flags in their codebase.

Its SKILL.md is about 420 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. It works with PostHog. The repository describes itself as: Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM. The licence is MIT.

When your agent uses it

  • User asks to add tracking
  • Instrument events
  • Implement feature flags in their codebase

Example prompts

  • “/posthog-instrumentation”

Requirements

  • Python 3
  • Node.js

Workflow steps

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

  1. Identify the framework (React, Next.js, Python, Node.js, etc.)
  2. Check for existing PostHog setup
  3. Add appropriate instrumentation

What it can do on your machine

Read from SKILL.md and the folder at commit 6d4793d. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and python).

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Posthog Instrumentation loads about 420 tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 97 words of instructions outside code blocks.

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

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 trycompai/crm at commit 6d4793d, republished under its MIT licence (© trycompai). 97 words, ~420 tokens.

Download SKILL.mdSave it as .claude/skills/posthog-instrumentation/SKILL.md (or your agent's skills folder).
name
posthog-instrumentation
description
Automatically add PostHog analytics instrumentation to code. Triggers when user asks to add tracking, instrument events, add analytics, or implement feature flags in their codebase.

PostHog Instrumentation Skill

Help users add PostHog analytics, event tracking, and feature flags to their code.

When to Use

  • User asks to "add PostHog" or "add analytics"
  • User wants to track events or user actions
  • User needs to implement feature flags
  • User asks about instrumenting their code

Workflow

  1. Identify the framework (React, Next.js, Python, Node.js, etc.)
  2. Check for existing PostHog setup
  3. Add appropriate instrumentation

Code Patterns

JavaScript/TypeScript
javascript
// Event tracking
posthog.capture('button_clicked', { button_name: 'signup' })

// Feature flags
if (posthog.isFeatureEnabled('new-feature')) {
  // Show new feature
}

// User identification
posthog.identify(userId, { email: user.email })
Python
python
from posthog import Posthog
posthog = Posthog(api_key='<ph_project_api_key>')

# Event tracking
posthog.capture(distinct_id='user_123', event='purchase_completed')

# Feature flags
if posthog.feature_enabled('new-feature', 'user_123'):
    # Show new feature
React
jsx
import { usePostHog } from 'posthog-js/react'

function MyComponent() {
  const posthog = usePostHog()

  const handleClick = () => {
    posthog.capture('button_clicked')
  }
}

Best Practices

  • Use consistent event naming (snake_case recommended)
  • Include relevant properties with events
  • Identify users early in their session
  • Use feature flags for gradual rollouts

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

Files

Just SKILL.md in .agents/skills/posthog-instrumentation of trycompai/crm.

Open the folder on GitHubat commit 6d4793d

Compare with similar skills

Posthog Instrumentation 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 Instrumentation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Posthog Instrumentation this skilltrycompai/crm11k—~420Automated safety check: PassMIT
Define Feature Flagmacro-inc/macro4.6k—~780Automated safety check: PassAGPL-3.0
Compare Array Bundle SizePostHog/posthog-js613—~599Automated safety check: PassCustom licence
Integration Astro Staticwill-be-done/will-be-done152—~636Automated safety check: PassAGPL-3.0
Designlang TokensManavarya09/design-extract4.2k—~214Automated safety check: PassMIT
Dev Toolbar Reviewsupabase/supabase111k—~1.5kAutomated safety check: PassApache-2.0

Similar skills

  • 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
  • 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.

    613 GitHub stars~599 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Integration Astro Static

    will-be-done/will-be-done

    PostHog integration for static Astro sites using SSG. An agent skill from will-be-done/will-be-done.

    152 GitHub stars~636 tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed
  • Designlang Tokens

    Manavarya09/design-extract

    A skill your agent uses when styling UI for posthog.com — references the extracted design system tokens instead of inventing colors, spacing, or typography.

    4.2k GitHub stars~214 tokensUpdated 8 days ago
    Frontend & DesignAuto-check passed
  • Dev Toolbar Review

    supabase/supabase

    Official

    Safety rules for the dev toolbar, PostHog client, and feature flags.

    111k GitHub stars~1.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Quill Code

    PostHog/code

    Official

    Edit the @posthog/quill design system locally and consume the change in this repo (posthog-code) before it is published to npm.

    179 GitHub stars~1.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed

More from trycompai/crm

All 9 skills in this repo
  • Install Anti Slop

    trycompai/crm

    Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository.

    11k GitHub starsUsed in 1 repo~881 tokens
    Auto-check passed
  • Nuqs

    trycompai/crm

    nuqs (type-safe URL query state) best practices for Next.js and other React frameworks.

    11k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Nestjs Trpc

    trycompai/crm

    Build end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod…

    11k GitHub stars~2.8k tokensUpdated 26 days ago
    Auto-check passed
  • Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers.

    11k GitHub stars~3.1k tokensUpdated 26 days ago
    Auto-check passed
  • Better Colors

    trycompai/crm

    OKLCH color space and color usage for web projects. An agent skill from trycompai/crm.

    11k GitHub stars~1.9k tokensUpdated 26 days ago
    Auto-check passed
  • Better Typography

    trycompai/crm

    Web typography from choosing fonts to spacing, wrapping and accessibility.

    11k GitHub stars~3.8k tokensUpdated 26 days ago
    Auto-check passed

Works with

Questions about Posthog Instrumentation

What does Posthog Instrumentation do?

Automatically add PostHog analytics instrumentation to code. Posthog Instrumentation is an agent skill from trycompai/crm. Automatically add PostHog analytics instrumentation to code.

When should I use Posthog Instrumentation?

Posthog Instrumentation fits situations like: user asks to add tracking; instrument events; implement feature flags in their codebase.

How do I install Posthog Instrumentation in Claude Code?

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

How do I install Posthog Instrumentation in Codex?

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

Can I use Posthog Instrumentation 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 trycompai/crm --skill posthog-instrumentation -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-instrumentation, .gemini/skills/posthog-instrumentation, .github/skills/posthog-instrumentation and .opencode/skills/posthog-instrumentation in your project.

What does Posthog Instrumentation need to run?

SKILL.md names no scripts, command-line tools or credentials: Posthog Instrumentation is instructions for the agent only. Our summary lists: Python 3; Node.js.

Does Posthog Instrumentation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Posthog Instrumentation 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 Instrumentation use?

Posthog Instrumentation 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 Instrumentation use?

About 420 tokens (SKILL.md is roughly 1.7k 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 Instrumentation?

Skills that share tags, products or a category with Posthog Instrumentation: Define Feature Flag (macro-inc/macro, 4.6k stars), Compare Array Bundle Size (PostHog/posthog-js, 613 stars), Integration Astro Static (will-be-done/will-be-done, 152 stars) and Designlang Tokens (Manavarya09/design-extract, 4.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Posthog Instrumentation?

trycompai (a GitHub organization) maintains it in trycompai/crm, which has 11,132 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 11, 2026.

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