PostHog Instrumentation Skill
SkillDatabases & dataAutomatically add PostHog analytics instrumentation to code. Triggers when user asks to add tracking, instrument events, add analytics, or implement feature flags in their codebase.
Use PostHog Instrumentation Skill in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add PostHog Instrumentation Skill and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the PostHog Instrumentation Skill skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by motormetrics/motormetrics in .agents/skills/posthog-instrumentation/SKILL.md and read by ahel’s review.
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
- Identify the framework (React, Next.js, Python, Node.js, etc.)
- Check for existing PostHog setup
- 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 feature
React
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
Signals
- GitHub stars
- 22
- Forks
- 2
- Last commit
- Oct 2026
ahel recommends instead
Advanced
- Item type
- skill
- Key
posthog-instrumentation- Source
- github.com/motormetrics/motormetrics
github.com/motormetrics/motormetrics
More in Databases & data
Skill · supabase
More in Databases & dataconnect
Skill · composiohq
More in Databases & dataanalytics
Skill · coreyhaines31
More in Databases & dataazure-kusto
Skill · microsoft
More in Databases & dataagentic-os
Skill · affaan-m
More in Databases & dataai-regression-testing
Skill · affaan-m
More in Databases & data