Skip to main content
skill CX Codex

user-deep-dive — Claude Code skill: PostHog user profile by email

user-deep-dive turns an email address into a PostHog user profile: what the person does in the product and which reports they keep open. Handy before a customer call.

MIT 212 installs ★ 80 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PostHog/skills --skill user-deep-dive -a claude-code
Open on GitHub

What user-deep-dive does

First the skill asks which period to cover. Say nothing, or answer “default”, and it takes the last 14 days. Then it fires seven SQL queries at once through the PostHog MCP query-run tool: event counts, pageviews, insight views, watched replays, error-tracking actions, AI feature usage, and the pages where Max gets opened. A separate Vitally lookup adds the person's role, title and account.

What comes back reads like a briefing: a short summary, a profile block, activity numbers, the projects and product areas in play, a replay link filtered by that email, and a few angles for the next call. None of it runs without the PostHog MCP server and Vitally access, because both the queries and the CRM lookup go through those tools.

Two things to know. Vitally's lastSeenTimestamp goes stale, so activity is read from PostHog events instead. And a 503 from PostHog means a short wait and one retry of that query; curl is the fallback when MCP is unreachable.

What it helps with

  • brief yourself on a PostHog user before a call
  • see which insights and dashboards someone keeps coming back to
  • find where a person opens Max and what they ask it about
  • tell active error triage apart from browsing the issue list
  • draft talking points from real product activity

Example prompts for the agent

How to install user-deep-dive

1Skills CLI (Vercel)

npx skills add PostHog/skills --skill user-deep-dive -a claude-code

2Manually: put the files in place

~/.claude/skills/user-deep-dive/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/user-deep-dive/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about user-deep-dive

How do I install user-deep-dive in Claude Code?

Run npx skills add PostHog/skills --skill user-deep-dive -a claude-code. The skill file lands at ~/.claude/skills/user-deep-dive/SKILL.md.

What does user-deep-dive do?

It builds a profile of one PostHog user from their email: events, pages, reports they open, how they handle errors, and how much they lean on PostHog's AI. You get a summary, a replay link and talking points.

What does it need in order to work?

The PostHog MCP server with the query-run tool, plus access to Vitally. If MCP is unavailable, the queries can go through curl instead.

Source text

SKILL.md · MIT
---
name: user-deep-dive
description: Deep dive on a PostHog user by email address. Analyze what they do, where they spend time, and what products they use.
---

Deep dive on a PostHog user by email address. Analyse what they do, where they spend time, and what products they use.

**Input**: $ARGUMENTS (email address, e.g. `[email protected]`)

## Process

### Step 0: Ask for time window

Before running any queries, ask the user:

> "What time window would you like to analyse? (default: last 14 days)"

If they don't respond or say "default", use **14 days**. Use their answer to set `{days}` in all queries below.

---

### Step 1: Run queries in parallel

Run all of the following queries simultaneously via the `query-run` MCP tool.

**1. Activity overview** — event breakdown (excluding PostHog internals):
```sql
SELECT event, count() as cnt
FROM events
WHERE person.properties.email = '{email}'
  AND timestamp >= now() - interval {days} day
  AND event NOT IN (
    '$feature_flag_called',
    '$ai_span',
    '$ai_trace',
    '$autocapture',
    '$web_vitals',
    'react_framerate',
    'spinner_unloaded',
    'replay_parse_timing',
    '$dead_click'
  )
GROUP BY event
ORDER BY cnt DESC
LIMIT 30
```

**2. Page views** — where they spend their time:
```sql
SELECT properties.$current_url as url, count() as cnt
FROM events
WHERE person.properties.email = '{email}'
  AND event = '$pageview'
  AND timestamp >= now() - interval {days} day
GROUP BY url
ORDER BY cnt DESC
LIMIT 25
```

**3. Insight details** — which insights/dashboards they view:
```sql
SELECT properties.insight as insight_type, properties.insight_name as name, count() as views
FROM events
WHERE person.properties.email = '{email}'
  AND event = 'insight viewed'
  AND timestamp >= now() - interval {days} day
GROUP BY insight_type, name
ORDER BY views DESC
LIMIT 20
```

**4. Session replay views** — replays they've watched:
```sql
SELECT
  properties.session_id as session_id,
  properties.$current_url as url,
  timestamp
FROM events
WHERE person.properties.email = '{email}'
  AND event = '$recording_viewed'
  AND timestamp >= now() - interval {days} day
ORDER BY timestamp DESC
LIMIT 20
```

**5. Error tracking usage** — how they interact with error tracking in PostHog:
```sql
SELECT event, properties.issue_id as issue_id, properties.issue_name as issue_name, count() as cnt
FROM events
WHERE person.properties.email = '{email}'
  AND event IN ('error tracking issue viewed', 'error tracking issue resolved', 'error tracking issue assigned', 'error tracking issue suppressed', 'error tracking list viewed')
  AND timestamp >= now() - interval {days} day
GROUP BY event, issue_id, issue_name
ORDER BY cnt DESC
LIMIT 20
```

**6. PostHog AI usage** — Max and insight analysis counts:
```sql
SELECT event, count() as cnt
FROM events
WHERE person.properties.email = '{email}'
  AND event IN ('$ai_generation', '$conversations_loaded', 'insight analyzed', 'chat with data opened')
  AND timestamp >= now() - interval {days} day
GROUP BY event
ORDER BY cnt DESC
```

**7. Where they open Max** — which pages/contexts they use Max on:
```sql
SELECT
  properties.$current_url as url,
  count() as cnt
FROM events
WHERE person.properties.email = '{email}'
  AND event = '$conversations_loaded'
  AND timestamp >= now() - interval {days} day
  AND properties.$current_url LIKE '%posthog.com/project%'
GROUP BY url
ORDER BY cnt DESC
LIMIT 20
```

### Step 2: Cross-reference with Vitally

Use Vitally tools to look up the user by email — get their role, title, account name, and any CRM data available.

---

## Output Format

### Executive Summary
2–3 sentences capturing who this person is, what they primarily use PostHog for, and the single most interesting or actionable thing about their usage. Write it as if briefing someone before a call with this user.

---

### Profile
- Name, email, role/title, LinkedIn (if available)
- Location (from timezone or geo data)
- Account they belong to

### Activity Summary (last {days} days)
- Total events, key event types
- How many queries run, insights viewed, dashboards checked, exports done

### Where They Spend Time
- Which PostHog projects (extract project IDs from URLs)
- Which product areas (analytics, replay, flags, LLM analytics, data management, error tracking, etc.)
- Specific dashboards or insights they revisit

### What They're Doing
- Interpret the insight names and patterns — what business questions are they answering?
- Are they building things (creating insights, actions, destinations) or consuming (viewing dashboards, exporting)?
- Error tracking: are they actively triaging errors (resolving, assigning, suppressing) or just browsing?

### Session Recordings
- Link directly to PostHog session replay filtered to this user:
  `https://us.posthog.com/replay?filters={"type":"AND","values":[{"type":"AND","values":[{"key":"email","value":["{email}"],"operator":"exact","type":"person"}]}]}`
- Summarise any patterns from the replays they've watched (query 4): which parts of the product, how recently

### PostHog AI Usage
- How often do they open Max (`$conversations_loaded` count) and make AI calls (`$ai_generation` count)?
- Do they use insight analysis (`insight analyzed`)?
- **Where do they open Max?** — Summarise the URLs from query 7. Extract the product area from each URL (e.g. `/dashboard/` → "dashboards", `/sql` → "SQL editor", `/insights/` → "insights", `/persons/` → "person profiles") and list the top contexts with counts. This tells us what they're trying to get help with.
- Are they looking at LLM Analytics?

### Outreach Angles
- Based on their usage, suggest 2-3 conversation starters for the user's outreach
- Flag any pain points (query failures, rage clicks, error tracking spikes, etc.)
- Note any products they're NOT using that would be relevant

---

## Important
- Ask for the time window **before** running any queries.
- Use the PostHog MCP `query-run` tool, NOT curl. Fall back to curl only if MCP is unavailable.
- Vitally `lastSeenTimestamp` data is stale — do NOT rely on it for activity. Always use PostHog event data.
- Run all PostHog queries in parallel to save time.
- If PostHog returns 503 (busy), wait a moment and retry once before giving up on that query.
- The session replay link should use the user's actual email in the filter parameter.

© PostHog · MIT · PostHog/skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set112

The whole set →
posthog-debugger posthog-debugger is a Claude Code skill that inspects PostHog setup, browser requests, events, and console output on a live page. It helps investigate tracking problems. CX Codex +1 296installs integration-tanstack-start The integration-tanstack-start skill adds PostHog analytics to TanStack Start apps, covering client tracking, server events, user identity, feature flags, and errors. CX Codex +1 268installs posthog-survey-creator posthog-survey-creator guides a conversation to plan a PostHog survey, choose its audience and schedule, then save it as a draft. Useful for feedback, NPS, CSAT, and other survey goals. CX Codex +1 225installs posthog-onboarding posthog-onboarding takes an existing PostHog customer through a diagnosis of their setup and hands back a plan: reference event schema, insight picks, prioritised next steps. CX Codex +1 223installs posthog-inbound-leads posthog-inbound-leads reviews inbound Salesforce leads, checks for existing PostHog account context in Vitally, and helps choose a next step. It also drafts a reply and checks its links. CX Codex +1 210installs posthog-onboarding-lead-research posthog-onboarding-lead-research — a PostHog sales skill: takes a company handed over by the onboarding team and returns a research brief plus a decision on whether to reach out. CX Codex +1 206installs posthog-pls-big-fish posthog-pls-big-fish qualifies large self-serve accounts on PostHog's free plan. Helps technical account executives parse Salesforce alerts, inspect usage in Vitally, and draft helpful outreach. CX Codex +1 203installs workload-analysis The workload-analysis skill turns PostHog billing and account data into a React view of spend by product, workload, and team. Use it to inspect SDK usage, growth opportunities, and account risks. CX Codex +1 203installs

Project sponsors

Companies that keep this analytics open