creating-ai-subscription
它能做什么
本技能创建一份定期报告,由 AI 根据通俗语言的提示词,按计划撰写全新的摘要。适合希望获得持续分析、而非固定图表的人。
适用场景
- ✓当你想获得数据中某个主题的每日、每周或每月 AI 摘要时。
- ✓当你想要的是分析本身,而不是你已经制作好的固定图表时。
- ✓当你希望摘要通过电子邮件、Slack 或 Microsoft Teams 发送时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/subscriptions/skills/creating-ai-subscription/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请每周一通过电子邮件发送一份 AI 摘要,说明我们的注册数和流失情况是如何变化的。”
每周 5 个新技能,1 分钟读完。
工作原理
它会按设定的时间表安排你的提示词运行。每次运行时,AI 会规划自己的数据查询,以 Markdown 格式撰写报告,并将其发送到你选择的目的地。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Creating a prompt subscription
When to use this
A subscription delivers a PostHog report to email, Slack, or Microsoft Teams on a
recurring schedule. There are three kinds, distinguished by which field you set — the kind is
derived and returned as the read-only resource_type:
insight— periodic snapshots of one existing insight (resource_type: "insight")dashboard— periodic snapshots of a dashboard's tiles (resource_type: "dashboard")prompt— a recurring AI-generated report from a free-text prompt: an LLM plans and runs HogQL over the project's data and synthesizes a fresh markdown report each tick (resource_type: "ai_prompt")
Use this skill for the prompt kind — i.e. when the user wants a recurring AI
summary of X (on any cadence — daily, weekly, monthly, yearly) rather than a recurring
snapshot of one existing insight/dashboard, or a single one-off report. Pick a prompt subscription when the
value is the analysis itself (the LLM deciding what to query and writing it up),
not a fixed chart they already built. For an insight/dashboard subscription, set
insight/dashboard instead of prompt and the AI gates below don't apply.
Prefer a dashboard or insight subscription first. A prompt subscription is the heaviest option, and the LLM composes its own HogQL, so its numbers can drift from what a saved insight or dashboard already shows. Reach for it only when (a) the user specifically asks for a free-text / AI-written report, or (b) no existing insight or dashboard covers the ask and the value really is the analysis itself. If the user wants the key numbers from an existing dashboard or insight delivered on a schedule — even phrased as "set up a scout/bot to post this daily" — a dashboard (or insight) subscription with
summary_enabled: trueis usually the better fit. Respect a user who's sure they want a prompt subscription, but when it's ambiguous, suggest that and confirm first. Seemanaging-subscriptionsfor the happy path.
This skill covers creating the subscription. Once it exists you manage its
lifecycle with the same subscriptions-* tools (see below): list it, edit/disable/
re-enable it, send a test delivery, or delete it.
Tools
| Tool | Purpose |
|---|---|
posthog:subscriptions-create |
Create the recurring prompt subscription |
posthog:subscriptions-list |
Confirm it landed; inspect existing subscriptions |
posthog:subscriptions-partial-update |
Edit, disable (enabled: false), or re-enable it |
posthog:subscriptions-test-delivery-create |
Send an immediate test delivery to its target(s) |
posthog:subscriptions-delete |
Soft-delete it (stops all future deliveries) |
posthog:integrations-list |
Find a Slack integration_id (filter kind=slack) |
posthog:integrations-channels-retrieve |
List a Slack integration's channels (id + name) |
What you need before calling
The endpoint enforces three create-time gates and will return 400 if any fails:
- PostHog Cloud, or
DEBUG=true— self-hosted production deployments are not eligible (the LLM call routes through a PostHog-managed key). - Org-level "AI data processing approved" — must be toggled on in
Org settings → Data → AI data processing. The user must opt in to AI features for the organization first. - Prompt subscriptions enabled for the organization — a PostHog-managed rollout flag. If it's off, the org has not been granted access yet; tell the user to reach out to PostHog to enable it (there is no self-serve toggle).
If any of the three is missing, stop and tell the user which one to fix — re-calling the tool will not help.
Your access token also needs the query:read scope in addition to
subscription:write: a prompt subscription runs LLM-generated HogQL over the project's
data, so the backend requires query access to create, edit/re-enable, test-deliver,
or delete one. A subscription:write-only token is rejected with a 403.
Required arguments
prompt: "..." # ≤4000 chars; setting this (with no insight/dashboard) makes it a prompt sub → resource_type "ai_pr
常见问题
我应该使用这个,还是图表订阅?
如果已保存的图表已经显示了你所需的内容,应优先使用仪表盘或洞察订阅,因为 AI 给出的数字可能与已保存的图表不同。
谁撰写报告?
由 AI 撰写,它会针对你项目的数据编写自己的查询。
它可以发送到哪里?
可以通过电子邮件、Slack 或 Microsoft Teams 发送。
详情
作者的原始描述
Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email, Slack, or Microsoft Teams on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight/dashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6956
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。