P
posthog-instrumentation
by @posthogv1.0.0
0.0(0)
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.
安装方式
npx skills add posthog/posthog-for-claude --skill posthog-instrumentationcompare_arrows
Before / After 效果对比
0 组description 文档
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
- 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
forum用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价,来写第一条吧
统计数据
安装量367
评分0.0 / 5.0
版本1.0.0
更新日期2026年3月16日
对比案例0 组
用户评分
0.0(0)
5
0%
4
0%
3
0%
2
0%
1
0%
为此 Skill 评分
0.0
兼容平台
🔧Claude Code
时间线
创建2026年3月16日
最后更新2026年3月16日