creating-ai-subscription
Skill này làm gì
Skill này tạo một báo cáo định kỳ trong đó AI viết một bản tóm tắt mới từ một lời nhắc bằng ngôn ngữ thường, theo lịch. Skill dành cho người muốn một phân tích liên tục, không phải một biểu đồ cố định.
Khi nào nên dùng
- ✓Khi bạn muốn một bản tóm tắt AI hằng ngày, hằng tuần hoặc hằng tháng về một chủ đề trong dữ liệu của bạn.
- ✓Khi bạn muốn chính phần phân tích, không phải một biểu đồ cố định bạn đã tạo sẵn.
- ✓Khi bạn muốn bản tóm tắt được gửi qua email, Slack hoặc Microsoft Teams.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/subscriptions/skills/creating-ai-subscription/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Gửi tôi bản tóm tắt AI hằng tuần về cách số lượt đăng ký và tỷ lệ rời bỏ của chúng tôi thay đổi, mỗi thứ Hai qua email.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill lên lịch để lời nhắc của bạn chạy theo thời gian biểu đã định. Mỗi lần, một AI lập kế hoạch các truy vấn dữ liệu của riêng nó, viết báo cáo dạng markdown và gửi đến nơi bạn đã chọn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nên dùng cái này hay đăng ký biểu đồ?
Hãy dùng đăng ký dashboard hoặc insight trước khi một biểu đồ đã lưu đã thể hiện điều bạn cần, vì số liệu của AI có thể khác với biểu đồ đã lưu.
Ai viết báo cáo?
Một AI viết báo cáo, tự soạn các truy vấn của nó trên dữ liệu dự án của bạn.
Có thể gửi đến đâu?
Có thể gửi qua email, Slack hoặc Microsoft Teams.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6956
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
discord-user-post
394kCho phép agent của bạn đăng tin nhắn đã duyệt lên Discord dưới tên bạn qua app Discord trên máy tính, sau khi xác nhận đúng kênh.
configure-channel
394kHướng dẫn agent của bạn kết nối một ứng dụng chat như Telegram với OpenClaw, lưu token bot an toàn và kiểm tra tin nhắn có đi qua được không.
discord
394kGiúp agent của bạn đọc, gửi, sửa và thả biểu cảm cho tin nhắn Discord qua OpenClaw, và kiểm tra đúng tin nhắn trước khi thay đổi.