creating-ai-subscription
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…
Skill by PostHogOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/posthog-creating-ai-subscription-18862f
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, data, ml, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
creating-ai-subscription- Description
- 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.)
- License
- MIT
- Instructions
- 210 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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: true`** is 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. See `managing-subscriptions` for 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: 1. **PostHog Cloud, or `DEBUG=true`** — self-hosted production deployments are not eligible (the LLM call routes through a PostHog-managed key). 2. **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. 3. **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 ```yaml prompt: "..." # ≤4000 chars; setting this (with no insight/dashboard) makes it a prompt sub → resource_type "ai_prompt" target_type: "email" | "slack" | "teams" # the only delivery channels the API accepts target_value: "..." # comma-separated emails, "<channel_id>|<channel_name>", or a Microsoft Teams webhook URL frequency: "daily" | "weekly" | "monthly" | "yearly" interval: 1 # 1 = every tick; 2 = every other tick; etc. start_date: "2026-09-15T09:30:00Z" # anchors the recurrence + time-of-day; hour and half-hour slots are supported; need not be in the future title: "..." # display name in the subscriptions list send_test_now: false # set true only after the user approves an immediate delivery ``` There is no `resource_type` argument to send — the kind is **derived** from which field you set (`prompt` ⇒ AI report) and returned as the read-only `resource_type`. ## Optional arguments ```yaml byweekday: ['monday', 'wednesday'] # weekly only — days the rrule fires bysetpos: 1 # most useful with monthly; requires byweekday — e.g. byweekday:['monday']+bysetpos:-1 = last Monday count: 10 # limit scheduled recurrence occurrences; manual and immediate deliveries do not count until_date: '2026-12-31T00:00:00Z' # stop on/before this date integration_id: 42 # Slack only — required; from integrations-list (see "Slack target") ``` ## Slack target `target_value` must be `<channel_id>|<channel_name>` (the format the integration returns). Build it in three steps: 1. `posthog:integrations-list` filtered by `kind=slack` → pick the Slack integration's `id`. 2. `posthog:integrations-channels-retrieve` with that `id` → pick a channel; it returns each channel's `id` and `name`, which you assemble into `target_value` as `<id>|<name>`. 3. Pass that integration's `id` as `integration_id` — the subscription is pinned to one specific Slack integration so reconnections elsewhere don't accidentally re-route deliveries. ## Teams target `target_value` must be the full webhook URL of the channel you want reports in. The user adds the Workflows app to that channel, picks the template for posting to a channel when a webhook request is received, then pastes the URL back to you. A URL from a different template saves without an error, but the report never reaches the channel. There is no Teams integration to look up, so leave `integration_id` out. The URL must be `https`. If `subscriptions-create` rejects `target_value`, the URL is not a Teams
From PostHog/skills, MIT.
Signals
- Stars
- 75
- Forks
- 8
- Open issues
- 2
- Last commit (this folder)
- Sep 16, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/PostHog/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from PostHog
- 0.759score
PostHog MCP Server
PostHogOfficial
Official PostHog MCP Server for product analytics, feature flags, experiments, and more.
ConnectorAFreshness: ARemote★ 40.4KClaude Code +3 - 0.754score
code-reviewer
PostHog
Subagent "code-reviewer" from PostHog/posthog: Use this agent when you need expert code review of recently written or modified code.
TemplateAFreshness: A★ 40.4KClaude Code - 0.683score
authoring-log-alerts
PostHogOfficial
Author useful, low-noise log alerts on services in a PostHog project.
SkillAFreshness: A★ 95Claude Code +9 - 0.683score
auditing-experiments-flags
PostHogOfficial
Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations.
SkillAFreshness: A★ 95Claude Code +9 - 0.683score
analyzing-offline-evaluations
PostHogOfficial
Inspect and compare offline AI evaluation experiments, diagnose case-level regressions, and follow scorer history across application, model, or prompt changes.
SkillAFreshness: A★ 95Claude Code +9 - 0.683score
authoring-error-tracking-alerts
PostHogOfficial
Author error tracking alerts that fire when an issue is created, reopened, or starts spiking.
SkillAFreshness: A★ 95Claude Code +9
Cite this page
creating-ai-subscription skill. Agent Mart. https://agentmart.dev/skills/posthog-creating-ai-subscription-18862f (last updated 2026-10-24)