Claude Agent Skill · by Posthog

Posthog Instrumentation

Install Posthog Instrumentation skill for Claude Code from posthog/posthog-for-claude.

Works with Paperclip

How Posthog Instrumentation fits into a Paperclip company.

Posthog Instrumentation drops into any Paperclip agent that handles this kind of work. Assign it to a specialist inside a pre-configured PaperclipOrg company and the skill becomes available on every heartbeat — no prompt engineering, no tool wiring.

S
SaaS FactoryPaired

Pre-configured AI company — 18 agents, 18 skills, one-time purchase.

$27$59
Explore pack
Source file
SKILL.md70 lines
Expand
---name: posthog-instrumentationdescription: 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 setup3. Add appropriate instrumentation ## Code Patterns ### JavaScript/TypeScript```javascript// Event trackingposthog.capture('button_clicked', { button_name: 'signup' }) // Feature flagsif (posthog.isFeatureEnabled('new-feature')) {  // Show new feature} // User identificationposthog.identify(userId, { email: user.email })``` ### Python```pythonfrom posthog import Posthogposthog = Posthog(api_key='<ph_project_api_key>') # Event trackingposthog.capture(distinct_id='user_123', event='purchase_completed') # Feature flagsif posthog.feature_enabled('new-feature', 'user_123'):    # Show new feature``` ### React```jsximport { 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