본문으로 건너뛰기
Skillpedia
일반 코딩12k · #11524

posthog-instrumentation

하는 일

이 스킬은 AI가 코드에 PostHog 추적을 추가하도록 돕습니다. 사용자의 행동을 측정하거나 기능 플래그로 새 기능을 테스트하려는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓앱에서 버튼 클릭 등 사용자 행동을 추적하고 싶을 때.
  • ✓웹사이트나 소프트웨어 프로젝트에 PostHog나 기본 분석 기능을 추가하고 싶을 때.
  • ✓일부 사용자에게만 새 기능을 켜거나 끄려고 기능 플래그를 쓰는 경우.

스킬 링크

https://github.com/trycompai/crm/blob/release/.agents/skills/posthog-instrumentation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/trycompai/crm/blob/release/.agents/skills/posthog-instrumentation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“앱에 PostHog 추적을 추가해서, 사람들이 가입 버튼을 언제 클릭하는지 볼 수 있게 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 프로젝트가 사용하는 프레임워크를 확인하고, PostHog가 이미 설정되어 있는지 점검한 뒤, 맞는 추적 코드를 추가합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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 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
자주 묻는 질문

이 스킬은 React와 Python 프로젝트에서 작동하나요?

네. JavaScript, TypeScript, React, Python 예시 코드가 포함되어 있습니다.

PostHog 계정이 필요한가요?

예시는 PostHog 프로젝트 API 키를 사용하므로, 본인의 PostHog 계정에서 키를 받아야 합니다.

이벤트 이름은 어떻게 짓나요?

button_clicked처럼 snake_case로 쓴 짧은 이벤트 이름을 권장합니다.

상세 정보

작성자의 원본 설명

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.

repo: trycompai/crm

인기도

GitHub 스타
12k
순위
#11524
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬