posthog-automation
Automate PostHog Analytics and Feature Flags
Manually managing PostHog events and feature flags is time-consuming and error-prone. This skill enables AI assistants to capture events, query analytics, and manage feature flags through natural language commands via MCP tool orchestration.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「posthog-automation」。 Capture a pageview event for user visitor_789
預期結果:
Successfully captured event '$pageview' for distinct_id 'visitor_789'. Event ingested at 2024-01-15T14:32:00Z with properties: current_url, referrer, and device_type.
正在使用「posthog-automation」。 List feature flags for project 12345
預期結果:
Found 5 feature flags: (1) new-dashboard-beta - Active, 50% rollout. (2) dark-mode - Active, 100% rollout. (3) checkout-v2 - Inactive. (4) premium-tier - Active, enterprise only. (5) mobile-redesign - Active, 25% rollout.
安全審計
安全Static analyzer detected 65 external_commands patterns and 1 network pattern, but all are false positives. The skill is purely documentation (SKILL.md) describing MCP tool usage. Backtick patterns are markdown inline code formatting, not shell execution. The URL reference is configuration documentation, not hardcoded network calls. No actual code execution or network requests occur within the skill itself.
品質評分
你能建構什麼
Product Analytics Automation
Product managers can query user events, analyze feature adoption, and track conversion funnels without writing SQL or using the PostHog UI directly.
Feature Flag Management
Engineering teams can create, update, and monitor feature flags for gradual rollouts, A/B tests, and beta releases through natural language commands.
Customer Support Insights
Support teams can look up user event history, verify feature access, and debug user-reported issues by querying PostHog profiles and events.
試試這些提示
Send a 'user_signed_up' event to PostHog for user ID 'user_123' with properties: email, signup_source, and plan_type.
Show me all 'purchase_completed' events from the last 24 hours for project ID 12345, limited to 50 results.
Create a feature flag called 'new-checkout-flow' for project 12345. Target users with email domain '@enterprise.com' at 100% rollout, and 10% rollout for all other users.
Query all events for user 'user_456' in the last week, filter for feature interaction events, and summarize which features they used most frequently.
最佳實務
- Always call RUBE_SEARCH_TOOLS first to get current tool schemas before executing workflows
- Resolve project names to numeric IDs using POSTHOG_LIST_PROJECTS_IN_ORGANIZATION_WITH_PAGINATION before other operations
- Use kebab-case for feature flag keys and avoid the '$' prefix for custom event names
- Implement pagination handling for large result sets by iterating until results are empty
- Verify connection status shows ACTIVE after authentication before running any PostHog workflows
避免
- Using '$' prefix for custom event names (reserved for PostHog system events)
- Skipping project ID resolution and assuming hardcoded project IDs
- Ignoring pagination limits and expecting all results in a single API call
- Creating feature flags with active:true without testing targeting rules first
- Assuming immediate event availability without accounting for ingestion delay