mcpField
P
posthog-survey-creator

posthog-survey-creator

github.com/posthog设计与 UI76204 次安装今天更新
代码仓库

关于 posthog-survey-creator

面向产品经理的 PostHog 调研设计技能,通过对话梳理目标、问题、受众和时间安排,并利用 PostHog 数据辅助定向;创建结果始终保存为草稿供审核。

主要功能

  1. 01按步骤引导设计调研
  2. 02匹配调研目标与模板
  3. 03查询事件、属性及现有调研
  4. 04利用功能标记辅助受众定向
  5. 05创建草稿供审核后发布

适用场景

  1. 01设计 NPS、CSAT 或 CES 调研
  2. 02按事件、用户属性或页面设定受众
  3. 03检查相似调研并确定是否新建
  4. 04根据功能标记定向 Beta 反馈

MCP 相关

使用 PostHog MCP 查询事件定义、属性、现有调研和功能标记,并调用调研创建工具。MCP 不可用时会改为询问用户;创建的调研以草稿状态保存。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/posthog/skills --skill posthog-survey-creator

安装后在 Claude Code 中输入/posthog-survey-creator确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

posthog-survey-creator.skill
README.md
.claude-plugin/
plugin.json
references/
question-examples.md

详细介绍

PostHog 调研问卷创建器

通过对话流程引导用户在 PostHog 中创建有效的调研问卷。目标受众:需要问卷设计、问题措辞和定向策略方面帮助的产品经理。

关键规则

  1. 每条消息只问一个问题。 等待用户回答后再继续。
  2. 优先使用 PostHog MCP。 MCP 可用时,应查询 PostHog 获取信息,而不是询问用户。始终展示查询结果供用户确认。
  3. 仅在 MCP 不可用时询问用户。 只有在无法访问 MCP 工具时才改为提问。
  4. 始终创建为草稿。 不要提议立即发布。调研问卷应创建为草稿,以便用户在 PostHog 中检查后再发布。

检测 PostHog MCP

在对话开始时或需要 PostHog 数据时,尝试使用 MCP 工具:

  • posthog:event-definitions-list — 获取可用事件
  • posthog:properties-list — 获取事件或用户属性
  • posthog:surveys-get-all — 检查现有调研问卷
  • posthog:feature-flag-get-all — 获取可关联的功能标记

如果 MCP 可用: 使用 PostHog 中的数据,并请用户确认。 如果 MCP 失败或不可用: 直接询问用户有关其 PostHog 设置的信息。

对话流程

开场:展示流程

当用户请求创建调研问卷时:

"I'll help you create a survey in PostHog. Here's what we'll figure out together:

1. **Goal** – What do you want to learn?
2. **Questions** – What to ask and how
3. **Audience** – Who should see this?
4. **Timing** – When and how often?

Let's start with the goal. **What do you want to learn from this survey?**"

等待回复。


步骤 1:了解目标

询问:“你希望通过这份调研问卷了解什么?”

留意关键词以匹配模板:

关键词模板
“推荐”、“忠诚度”、“NPS”NPS
“满意”、“满意度”CSAT
“容易”、“费力”、“阻碍”CES
“失望”、“产品与市场契合度”PMF
“为什么注册”、“待完成任务”JTBD
“价格”、“贵”、“价值”定价
“竞争对手”、“替代方案”竞争情报
“未使用”、“采用”功能采用
“测试版”、“新功能”测试版反馈
“试用”、“升级”试用转化
“新用户”、“意向”欢迎调研问卷
“引导”、“开始使用”激活
“不活跃”、“已流失”、“挽回”休眠用户
“取消”、“离开”流失/退出
“支持”、“工单”支持服务 CSAT

收到回复后: 提供匹配的模板或了解自定义需求,然后继续。


步骤 2:提供模板或了解自定义需求
如果有匹配的模板:
"Based on what you're describing, a **Customer Effort Score (CES)** survey would work well. It measures how easy a task was—lower effort correlates with higher retention.

The standard approach is:
- Q1: Rating (1-7) – 'How easy was it to [task]?'
- Q2: Open text (for low scores) – 'What made this difficult?'

**Does this approach work for you, or would you like to customize it?**"
如果没有匹配的模板:
"This sounds like a custom survey—I'll help you design one.

**What's the single most important thing you want to learn?**"

步骤 3:敲定问题

如果要自定义,每次只问一个问题,直到确定所有问题。

确定后,进行确认:

"Here's what we have:
[list questions]

**Does this look right?**"

步骤 4:定义受众(优先使用 MCP)

此时 PostHog MCP 至关重要。如果 MCP 可用,不要询问用户有关事件或属性的信息。

PostHog MCP 可用时:
  1. 首先,询问高层级的定向问题:

    "Now let's decide who sees this survey.
    
    **Who should see it?** For example:
    - All users
    - Users on a specific page
    - A specific segment (paid users, new users, etc.)
    - Users who completed a specific action"
    
  2. 根据用户的回答,查询 PostHog 并提供选项:

    如果用户提到某个操作/事件:

    [Use posthog:event-definitions-list to find matching events]
    
    "I found these events in your PostHog that might match:
    - `report_viewed` (1.2k times this month)
    - `report_created` (340 times this month)
    - `report_exported` (89 times this month)
    
    **Which event should trigger the survey?**"
    

    如果用户提到某个用户细分:

    [Use posthog:properties-list with type="person" to find properties]
    
    "I found these person properties you could filter by:
    - `plan` (values: free, pro, enterprise)
    - `signed_up_at`
    - `company_size`
    
    **Which property should we use, and what value?**"
    

    如果用户提到某个页面:

    "Got it—I'll target users on that page.
    
    **What's the URL or URL pattern?** (e.g., '/reports' or contains 'dashboard')"
    
  3. 如果要检查是否已有类似的调研问卷:

    [Use posthog:surveys-get-all to check for duplicates]
    
    "I noticed you already have an 'NPS Survey' running that targets the dashboard. 
    
    **Should I create a new one, or would you like to modify the existing survey?**"
    
  4. 如果要关联功能标记:

    [Use posthog:feature-flag-get-all if user mentions beta/feature flags]
    
    "I found these feature flags that might be relevant:
    - `new-reporting-feature` (currently 30% rollout)
    - `beta-dashboard-v2` (10% rollout)
    
    **Should the survey only show to users with one of these flags enabled?**"
    
PostHog MCP 不可用时(备用方案):

如果 MCP 工具失败或不可用,请直接询问用户:

"I don't have access to query your PostHog directly.

**Do you know the event name for when users [complete the action]?** 
(If not, we can target by page URL instead)"

或询问属性:

"**What's the property name for [plan/segment] in your PostHog?**
(e.g., 'plan', 'subscription_tier', etc.)"

步骤 5:配置时间安排

询问:

"**Should this survey show once per user, or repeat over time?**

- Once is good for most feedback surveys
- Recurring works for NPS (e.g., every 90 days)"

如果是定期重复进行,请继续询问:

"**How often should it repeat?**"

步骤 6:确认并创建

总结内容并请求最终确认:

"Here's the survey I'll create:

**Name:** [name]
**Questions:**
1. [Q1]
2. [Q2]

**Audience:** [targeting details]
**Schedule:** [once/recurring]

I'll create this as a draft so you can review and adjust the styling in PostHog before launching.

**Ready to create it?**"

等待用户确认,然后使用 posthog:survey-create,并将 start_date: null(草稿)。


步骤 7:创建后
"Done! Here's your survey: [link]

It's saved as a draft. From PostHog you can:
- Preview how it looks
- Adjust colors and styling
- Launch when you're ready

**Anything else you'd like help with?**"

MCP 查询模式

查找用于定向的事件
1. User says: "Users who created a report"
2. Query: posthog:event-definitions-list with q="report"
3. Present matches: "I found `report_created`, `report_viewed`, `report_shared`. Which one?"
4. User confirms
查找用户属性
1. User says: "Paid users only"
2. Query: posthog:properties-list with type="person"
3. Look for: plan, subscription, tier, pricing-related properties
4. Present: "I found a `plan` property with values free/pro/enterprise. Should we target `plan` is not `free`?"
5. User confirms
检查现有调研问卷
1. Before creating, query: posthog:surveys-get-all
2. Check for similar names or targeting
3. If found: "You have an existing [survey name] with similar targeting. Create new or modify existing?"
查找功能标记
1. User mentions beta/feature rollout
2. Query: posthog:feature-flag-get-all
3. Present relevant flags: "I found `beta-feature-x`. Link the survey to this flag?"

示例对话(使用 MCP)

用户:“我想创建一份问卷”

Claude:“我来帮你在 PostHog 中创建一份问卷。我们会一起确定以下内容:

  1. 目标 – 你想了解什么?
  2. 问题 – 问什么以及如何提问
  3. 受众 – 谁应该看到这份问卷?
  4. 时间安排 – 何时展示以及展示频率?

我们开始吧。你想通过这份问卷了解什么?”


用户:“我想知道新的导出功能是否容易使用”

Claude:“很好!这非常适合使用 客户费力度(CES) 问卷。

以下是标准做法:

  • 问题 1(评分 1-7):‘使用导出功能有多容易?’
  • 问题 2(开放文本,针对低分):‘怎样才能让它更容易使用?’

这样可以吗?还是你想自定义问卷?”


用户:“可以”

Claude:“太好了。现在来确定谁应该看到这份问卷。

谁应该看到这份问卷? 例如:

  • 所有人
  • 使用过导出功能的用户
  • 特定细分群体”

用户:“使用过导出功能的人”

Claude:[查询 posthog:event-definitions-list,q="export"]

“我在你的 PostHog 中找到了以下与导出相关的事件:

  • export_completed(本月 2.3k 次)
  • export_started(本月 2.8k 次)
  • export_failed(本月 145 次)

应该由哪个事件触发问卷? 我建议使用 export_completed,这样用户就已经完成了操作。”


用户:“是的,export_completed”

Claude:“知道了——问卷会在 export_completed 之后显示。

这份问卷应该对每位用户只显示一次,还是随着时间推移重复显示?”


用户:“一次”

Claude:“我将创建以下问卷:

**名称:**导出功能 CES 问题:

  1. 评分(1-7):“使用导出功能有多容易?”
  2. 开放文本(针对低分):“怎样才能让它更容易使用?”

**受众:**触发 export_completed 的用户 **安排:**每位用户一次

我会将问卷创建为草稿,这样你就可以在 PostHog 中预览后再发布。

现在可以创建吗?”


用户:“可以”

Claude:[通过 posthog:survey-create 创建问卷,start_date: null]

“完成了!这是你的问卷:[链接]

问卷已保存为草稿。你可以预览、调整样式,并在准备好后发布。

还有什么需要我帮忙的吗?”


示例对话(不使用 MCP)

用户:“使用过导出功能的人”

Claude:[MCP 查询失败或不可用]

“我无法直接查询你的 PostHog。你知道有人完成导出时对应的事件名称吗?

如果不知道,我们也可以改为按 URL 定向(例如,在导出页面上显示)。”


用户:“我想是叫 export_done”

Claude:“知道了——我会使用 export_done 作为触发事件。

这份问卷应该对每位用户只显示一次,还是重复显示?”


问题设计参考

请参阅 references/question-examples.md,了解:

  • 22 个包含经验证问题的问卷模板
  • 各类问卷的定向建议
  • 分支逻辑示例

评论

支持 Markdown