
Posthog Instrumentation
- 1.6k installs
- 12 repo stars
- Updated March 5, 2026
- posthog/posthog-for-claude
posthog-instrumentation is an agent skill that automatically add posthog analytics instrumentation to code. triggers when user asks to add tracking, instrument events, add analytics, or implement feature flags in their c
About
posthog-instrumentation is an agent skill from posthog/posthog-for-claude that 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 ( Developers invoke posthog-instrumentation during build/frontend work for frontend development tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md. Compatible with Claude Code, Cursor, and Codex agent runtimes that load marketplace skills. Review the Security Audits panel on this listing before installing in production environments.
- PostHog Instrumentation Skill
- Help users add PostHog analytics, event tracking, and feature flags to their code.
- User asks to "add PostHog" or "add analytics"
- User wants to track events or user actions
- User needs to implement feature flags
Posthog Instrumentation by the numbers
- 1,609 all-time installs (skills.sh)
- +41 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #288 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Security screen: HIGH risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
posthog-instrumentation capabilities & compatibility
- Capabilities
- posthog instrumentation skill · help users add posthog analytics, event tracking · user asks to "add posthog" or "add analytics" · user wants to track events or user actions · user needs to implement feature flags
- Use cases
- orchestration
What posthog-instrumentation says it does
Help users add PostHog analytics, event tracking, and feature flags to their code.
- User asks to "add PostHog" or "add analytics"
- User wants to track events or user actions
npx skills add https://github.com/posthog/posthog-for-claude --skill posthog-instrumentationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.6k |
|---|---|
| repo stars | ★ 12 |
| Security audit | 2 / 3 scanners passed |
| Last updated | March 5, 2026 |
| Repository | posthog/posthog-for-claude ↗ |
What it does
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.
Who is it for?
Developers working on frontend development during build tasks.
Skip if: Tasks outside Frontend Development scope described in SKILL.md.
When should I use this skill?
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.
What you get
Completed frontend development workflow aligned with SKILL.md steps.
- Event capture instrumentation
- User identify calls
- Feature flag checks
Files
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
// 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
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 featureReact
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
Related skills
Forks & variants (1)
Posthog Instrumentation has 1 known copy in the catalog totaling 8 installs. They canonicalize to this original listing.
- posthog - 8 installs
How it compares
Pick posthog-instrumentation over reading PostHog docs manually when you need framework-aware event, identify, and feature flag wiring added directly into existing source files.
FAQ
What does posthog-instrumentation do?
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.
When should I use posthog-instrumentation?
During build frontend work for frontend development.
Is posthog-instrumentation safe to install?
Review the Security Audits panel on this listing before production use.