Loading...
Loading...
Product analytics expert using PostHog MCP. Triggers on requests to understand user behavior, surface insights, create dashboards, analyze funnels, track metrics, set up experiments, or answer questions about product performance. Use when working with PostHog data, discussing analytics strategy, investigating user journeys, retention, conversion, feature adoption, or when asked to help understand what's happening in the product.
npx skill4agent add petekp/claude-code-setup posthog-analytics.claude/product-context.md.claude/product-context.mdevent-definitions-listproperties-listinsights-get-alldashboards-get-all.claude/product-context.md# Product Context
## Product Overview
[What the product does, target users]
## Key Events
| Event | Meaning | Importance |
|-------|---------|------------|
| $pageview | Page visit | Navigation tracking |
| signup_completed | User registered | Core conversion |
| [custom events discovered] | | |
## Important Properties
- user_tier: free/pro/enterprise
- [other key properties]
## Key Metrics
- Primary: [e.g., Weekly Active Users, Conversion Rate]
- Secondary: [e.g., Feature Adoption, Retention]
## Funnels
- Activation: signup → onboarding_complete → first_value_action
- [other key funnels]
## Last Updated: [date]1. Trends Analysis
- query-run: Total events over 30 days (spot volume changes)
- query-run: DAU/WAU/MAU trends (engagement health)
- query-run: Key conversion events over time
2. Funnel Health
- query-run: Core activation funnel
- query-run: Conversion funnel (trial → paid if SaaS)
- Look for: Drop-off points, conversion changes
3. Retention Check
- query-run: Cohort retention (week-over-week)
- Look for: Retention curve shape, changes over time
4. Feature Adoption
- query-run: Feature usage by user segment
- Look for: Underused features, power user patterns
5. Error Impact
- list-errors: Top errors by occurrence
- error-details: Impact on user journeys## [Insight Title]
**Finding**: [One sentence summary]
**Evidence**: [Specific numbers/data]
**Impact**: [Why this matters]
**Recommended Action**: [What to do about it]| Question Pattern | Approach |
|---|---|
| "How many users..." | |
| "What % convert..." | |
| "Where do users drop off..." | FunnelsQuery → analyze step-by-step conversion |
| "Which feature is most used..." | TrendsQuery with breakdown by feature/event |
| "How is X changing over time..." | TrendsQuery with |
| "Who are our power users..." | TrendsQuery with breakdown by user property |
| "What's causing errors..." | |
dashboard-createquery-runinsight-create-from-queryadd-insight-to-dashboarddashboard-reorder-tilesfeature-flag-get-allevent-definitions-listexperiment-create1. Define cohort criteria (user properties, behaviors)
2. Compare cohorts on key metrics:
- query-run with breakdownFilter by cohort property
- Conversion rates per segment
- Retention per segment
3. Identify highest-value segments
4. Recommend targeting strategies{
"kind": "InsightVizNode",
"source": {
"kind": "TrendsQuery",
"dateRange": {"date_from": "-30d"},
"interval": "day",
"series": [{
"kind": "EventsNode",
"event": "event_name",
"custom_name": "Display Name",
"math": "total"
}]
}
}totaldauweekly_activemonthly_activeunique_sessionavgsumminmax{
"kind": "InsightVizNode",
"source": {
"kind": "FunnelsQuery",
"dateRange": {"date_from": "-30d"},
"series": [
{"kind": "EventsNode", "event": "step_1", "custom_name": "Step 1"},
{"kind": "EventsNode", "event": "step_2", "custom_name": "Step 2"},
{"kind": "EventsNode", "event": "step_3", "custom_name": "Step 3"}
],
"funnelsFilter": {
"funnelWindowInterval": 7,
"funnelWindowIntervalUnit": "day"
}
}
}"breakdownFilter": {
"breakdown": "property_name",
"breakdown_type": "event" // or "person"
}| Metric | Query Approach | Why It Matters |
|---|---|---|
| Activation Rate | Funnel: signup → key_action | Validates onboarding |
| DAU/MAU Ratio | Trends: DAU ÷ MAU | Engagement stickiness |
| Feature Adoption | Trends: feature_used by user | Product-market fit signals |
| Retention (D7, D30) | Cohort retention query | Long-term value predictor |
| Conversion (Trial→Paid) | Funnel: trial_start → subscription | Revenue health |
| Expansion Revenue | Trends: upgrade events | Growth efficiency |
| Churn Indicators | Declining usage patterns | Early warning system |