/debugging-surveys
Debug, support, and build PostHog Surveys across the backend and all five SDKs (web/posthog-js, iOS, Android, Flutter, React Native). Use whenever a Surveys support ticket is pasted ("survey not showing", "fewer responses than expected", "responses disappeared", "survey shows on
$ npx -y skills add posthog/posthog --skill debugging-surveys --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/debugging-surveys
Context preview
The summary Claude sees to decide when to auto-load this skill.
Debug, support, and build PostHog Surveys across the backend and all five SDKs (web/posthog-js, iOS, Android, Flutter, React Native). Use whenever a Surveys support ticket is pasted ("survey not showing", "fewer responses than expected", "responses disappeared", "survey shows on
SKILL.md
debugging-surveys.SKILL.mdname: debugging-surveys
description: >-
Debug, support, and build PostHog Surveys across the backend and all five SDKs
(web/posthog-js, iOS, Android, Flutter, React Native). Use whenever a Surveys
support ticket is pasted ("survey not showing", "fewer responses than expected",
"responses disappeared", "survey shows on wrong platform"), when diagnosing why a
survey does or doesn't display, or when doing survey feature work that must ship
across SDKs. Covers the eligibility pipeline, cross-SDK feature parity, the known-cause
catalog, read-only diagnostic queries, staff access, and the customer-reply style guide.Debugging surveys
PostHog Surveys is a no-code in-app form builder. A customer creates a survey in the PostHog UI; it must then be evaluated and rendered by whichever SDK their app runs. **Most "survey not showing" tickets are eligibility problems, not rendering bugs** — the SDK correctly decided the user is not eligible, and the job is to find _which_ gate failed and _why_.
Repos
GitHub is the source of truth for where the code lives. When you need to read or change SDK source, resolve a local checkout via the registry described in [references/local-repos.md](references/local-repos.md) so a clone is found once and reused — don't re-clone every session. First time on a machine, run `python3 scripts/repos.py init` to auto-discover existing checkouts; thereafter `python3 scripts/repos.py ensure <repo>` prints the path (and `--clone` clones if missing).
| Concern | Repo | Where to look | | -------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | Product UI + backend | this monorepo (PostHog/posthog) | UI: `frontend/src/scenes/surveys/`, backend: `products/surveys/backend/` | | Web SDK | [PostHog/posthog-js](https://github.com/PostHog/posthog-js) | `packages/browser/` | | React Native SDK | [PostHog/posthog-js](https://github.com/PostHog/posthog-js) (same monorepo) | `packages/react-native/` | | iOS SDK | [PostHog/posthog-ios](https://github.com/PostHog/posthog-ios) | survey rendering + eligibility | | Android SDK | [PostHog/posthog-android](https://github.com/PostHog/posthog-android) | eligibility (delegate-based UI) | | Flutter SDK | [PostHog/posthog-flutter](https://github.com/PostHog/posthog-flutter) | Dart rendering; native iOS/Android handles eligibility | | Public docs | [PostHog/posthog.com](https://github.com/PostHog/posthog.com) | `contents/docs/surveys/` |
Always check the local checkout is present and on a sane branch before quoting code; line numbers drift, so grep for the symbol rather than trusting a remembered line number.
Cross-SDK feature parity (check this FIRST)
A large class of tickets is "customer expects a feature their platform doesn't support." Confirm the survey's `lib` / the customer's platform before anything else, then consult this table. Verified against the SDK source — re-verify if it's been months, the gaps get filled over time.
| Feature | Web (posthog-js) | iOS | Android | Flutter | React Native | | ------------------------------- | ------------------------------- | ----------------------------------------- | ---------------------------------- | ---------------------------------- | --------------------------------------- | | Rendering | DOM + shadow root | Native SwiftUI (`SurveysWindow`) | **No built-in UI** — delegate only | Dart widgets (`SurveyBottomSheet`) | RN components (`SurveyModal`) | | Event-based triggers | yes (since 1.137.0, 2024-06-05) | yes | yes | yes (native side) | yes | | URL / screen targeting | yes | decoded but **NOT evaluated** (`// TODO`) | decoded but **NOT evaluated** | **NOT evaluated** (native gap) | **explicitly excluded** in filter | | Feature-flag / cohort targeting | yes | yes | yes | yes (native side) | yes | | `seenSurveyWaitPeriodInDays` | yes | yes | yes | yes (native side) | stored but **comparison commented out** | | `surveyPopupDelaySeconds` | yes | **not implemented** | **not implemented** | **not implemented** | **not implemented** (TODO) |
Consequences worth memorizing:
- **`surveyPopupDelaySeconds` is web-only.** If a mobile ticket blames the delay, it's a red herring.
- **URL targeting is effectively web-only.** Mobile SDKs decode the field but never enforce it; React Native filters those surveys out entirely. A mobile survey with a URL condition behaves as "no URL condition" (mobile/flutter) or "never shows" (RN).
- **Android ships no survey UI.** The app (or the Flutter plugin) must provide a `PostHogSurveysDelegate`. "Survey never renders on Android" is oft
Read more
name: debugging-surveys
description: >-
Debug, support, and build PostHog Surveys across the backend and all five SDKs
(web/posthog-js, iOS, Android, Flutter, React Native). Use whenever a Surveys
support ticket is pasted ("survey not showing", "fewer responses than expected",
"responses disappeared", "survey shows on wrong platform"), when diagnosing why a
survey does or doesn't display, or when doing survey feature work that must ship
across SDKs. Covers the eligibility pipeline, cross-SDK feature parity, the known-cause
catalog, read-only diagnostic queries, staff access, and the customer-reply style guide.Debugging surveys
PostHog Surveys is a no-code in-app form builder. A customer creates a survey in the PostHog UI; it must then be evaluated and rendered by whichever SDK their app runs. **Most "survey not showing" tickets are eligibility problems, not rendering bugs** — the SDK correctly decided the user is not eligible, and the job is to find _which_ gate failed and _why_.
Repos
GitHub is the source of truth for where the code lives. When you need to read or change SDK source, resolve a local checkout via the registry described in [references/local-repos.md](references/local-repos.md) so a clone is found once and reused — don't re-clone every session. First time on a machine, run `python3 scripts/repos.py init` to auto-discover existing checkouts; thereafter `python3 scripts/repos.py ensure <repo>` prints the path (and `--clone` clones if missing).
| Concern | Repo | Where to look | | -------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | Product UI + backend | this monorepo (PostHog/posthog) | UI: `frontend/src/scenes/surveys/`, backend: `products/surveys/backend/` | | Web SDK | [PostHog/posthog-js](https://github.com/PostHog/posthog-js) | `packages/browser/` | | React Native SDK | [PostHog/posthog-js](https://github.com/PostHog/posthog-js) (same monorepo) | `packages/react-native/` | | iOS SDK | [PostHog/posthog-ios](https://github.com/PostHog/posthog-ios) | survey rendering + eligibility | | Android SDK | [PostHog/posthog-android](https://github.com/PostHog/posthog-android) | eligibility (delegate-based UI) | | Flutter SDK | [PostHog/posthog-flutter](https://github.com/PostHog/posthog-flutter) | Dart rendering; native iOS/Android handles eligibility | | Public docs | [PostHog/posthog.com](https://github.com/PostHog/posthog.com) | `contents/docs/surveys/` |
Always check the local checkout is present and on a sane branch before quoting code; line numbers drift, so grep for the symbol rather than trusting a remembered line number.
Cross-SDK feature parity (check this FIRST)
A large class of tickets is "customer expects a feature their platform doesn't support." Confirm the survey's `lib` / the customer's platform before anything else, then consult this table. Verified against the SDK source — re-verify if it's been months, the gaps get filled over time.
| Feature | Web (posthog-js) | iOS | Android | Flutter | React Native | | ------------------------------- | ------------------------------- | ----------------------------------------- | ---------------------------------- | ---------------------------------- | --------------------------------------- | | Rendering | DOM + shadow root | Native SwiftUI (`SurveysWindow`) | **No built-in UI** — delegate only | Dart widgets (`SurveyBottomSheet`) | RN components (`SurveyModal`) | | Event-based triggers | yes (since 1.137.0, 2024-06-05) | yes | yes | yes (native side) | yes | | URL / screen targeting | yes | decoded but **NOT evaluated** (`// TODO`) | decoded but **NOT evaluated** | **NOT evaluated** (native gap) | **explicitly excluded** in filter | | Feature-flag / cohort targeting | yes | yes | yes | yes (native side) | yes | | `seenSurveyWaitPeriodInDays` | yes | yes | yes | yes (native side) | stored but **comparison commented out** | | `surveyPopupDelaySeconds` | yes | **not implemented** | **not implemented** | **not implemented** | **not implemented** (TODO) |
Consequences worth memorizing:
- **`surveyPopupDelaySeconds` is web-only.** If a mobile ticket blames the delay, it's a red herring.
- **URL targeting is effectively web-only.** Mobile SDKs decode the field but never enforce it; React Native filters those surveys out entirely. A mobile survey with a URL condition behaves as "no URL condition" (mobile/flutter) or "never shows" (RN).
- **Android ships no survey UI.** The app (or the Flutter plugin) must provide a `PostHogSurveysDelegate`. "Survey never renders on Android" is oft
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Other skills on posthog.
- /analyzing-expensive-users
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
Open skill - /creating-online-evaluations
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously
Open skill - /exploring-ai-failures
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues
Open skill - /exploring-llm-clusters
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Open skill - /exploring-llm-costs
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?",
Open skill - /exploring-llm-evaluations
Investigate AI observability evaluations — `hog` (deterministic code-based), `llm_judge` (LLM-prompt-based), and `sentiment` (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and
Open skill

