К основному содержанию
скилл CX Codex

managing-subscriptions — скилл для Claude Code: как настроить

Настраивает регулярную отправку отчётов, дашбордов и инсайтов PostHog на email, в Slack или Microsoft Teams. Помогает менять расписание, слать тестовые снимки и находить сбои доставки.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add PostHog/skills --skill managing-subscriptions -a claude-code
Открыть на GitHub

Что делает managing-subscriptions

Скилл помогает агенту настраивать регулярные рассылки данных в PostHog. С его помощью создают доставку снимков дашбордов и отдельных инсайтов. Сообщения уходят по таймеру на почту, в каналы Slack либо через вебхуки Microsoft Teams. Инструмент рассчитан на фиксированный график. Проверку порогов и аномалий он не выполняет: для условий падения метрик в PostHog служат product alerts.

Внутри задействован набор MCP-инструментов PostHog. Вызовы posthog:subscriptions-list и posthog:subscriptions-create позволяют находить существующие записи и регистрировать новые. Для изменения настроек, паузы и возобновления служит posthog:subscriptions-partial-update. Отдельные методы отвечают за разовые проверки доставки.

Вызов posthog:subscriptions-create не идемпотентен, поэтому слепой повтор при тайм-ауте создаст лишнюю подписку и повторное письмо. Тип ресурса после сохранения сменить нельзя. Если нужно переключить инсайт на дашборд, придётся создавать подписку заново.

Какие задачи решает

  • настроить регулярную отправку дашборда PostHog в Slack или Teams
  • запустить тестовую отправку среза инсайта без изменения графика
  • приостановить или возобновить доставку через posthog:subscriptions-partial-update
  • просмотреть журнал попыток доставки и разобрать ошибки отправки

Примеры запросов агенту

  • Отправляй срез дашборда продуктовых метрик каждый понедельник в Slack-канал аналитики.
  • Запусти тестовую отправку для активной подписки на инсайт выручки и проверь статус.
  • Приостанови еженедельную отправку отчёта PostHog на почту без удаления подписки.

Как установить managing-subscriptions

1Через Skills CLI (Vercel)

npx skills add PostHog/skills --skill managing-subscriptions -a claude-code

2Вручную: положить файлы

~/.claude/skills/managing-subscriptions/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/managing-subscriptions/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о managing-subscriptions

Как установить managing-subscriptions в Claude Code?

Выполните команду npx skills add PostHog/skills --skill managing-subscriptions -a claude-code.

Чем подписка отличается от оповещений PostHog?

Подписка отправляет снимки данных строго по расписанию, например раз в неделю. Оповещения срабатывают только при выполнении условий, таких как падение конверсии или аномалии метрик.

Можно ли изменить тип ресурса у созданной подписки?

Нет, параметр resource_type нельзя обновить после сохранения. Если нужно переключить отчёт с инсайта на дашборд, создайте отдельную подписку.

Исходный текст

SKILL.md · MIT
---
name: managing-subscriptions
description: >
  Create and manage scheduled PostHog subscriptions for insight snapshots,
  dashboard snapshots, and AI prompt reports. Use when a user wants recurring
  email, Slack, or Microsoft Teams delivery; an AI summary; delivery history;
  schedule or recipient changes; a test delivery; pause, resume, or deletion;
  or help with subscription permissions, limits, billing, and failures. Use
  product alerts when delivery must depend on a threshold or anomaly.
---

# Managing subscriptions

Subscriptions deliver product data on a fixed schedule.
They support insight snapshots, dashboard snapshots, and AI prompt reports.

## Read the relevant references

- Read [subscription-types.md](references/subscription-types.md) before you select or change a resource type.
- Read [destinations.md](references/destinations.md) before you create or change a destination.
- Read [operations.md](references/operations.md) for schedules, limits, billing, delivery checks, and failures.
- Use `creating-ai-subscription` for the detailed prompt report creation workflow.

## Choose the correct product

- Use a subscription for fixed delivery, such as "send this dashboard every Monday."
- Use a product alert for a condition, such as "notify me when conversion falls below 10%."
- Use a reminder when the user wants a private prompt to inspect a resource later.
- Use a Signals scout when an agent must decide what is important to report.

Subscriptions do not evaluate thresholds, recovery, consecutive breaches, or quiet hours.
Snapshot subscriptions attempt each scheduled occurrence even when the saved results do not change.

## Tools

| Tool                                         | Purpose                                 |
| -------------------------------------------- | --------------------------------------- |
| `posthog:subscriptions-list`                 | Find subscriptions                      |
| `posthog:subscriptions-retrieve`             | Read one subscription                   |
| `posthog:subscriptions-create`               | Create a subscription                   |
| `posthog:subscriptions-partial-update`       | Change, pause, or resume a subscription |
| `posthog:subscriptions-test-delivery-create` | Send a test delivery                    |
| `posthog:subscriptions-deliveries-list`      | List delivery attempts                  |
| `posthog:subscriptions-deliveries-retrieve`  | Read one delivery                       |
| `posthog:subscriptions-delete`               | Stop all future deliveries              |
| `posthog:integrations-list`                  | Find a Slack integration                |
| `posthog:integrations-channels-retrieve`     | Find Slack channels                     |
| `posthog:dashboard-get`                      | Read dashboard tiles                    |
| `posthog:insight-get`                        | Resolve an insight ID                   |

## Create a subscription

1. Call `posthog:subscriptions-list` and check for a duplicate.
2. Select one resource type from [subscription-types.md](references/subscription-types.md).
3. Resolve the destination with [destinations.md](references/destinations.md).
4. Resolve the schedule with [operations.md](references/operations.md).
5. Ask whether the user wants an immediate delivery.
6. Set `send_test_now` to the user's choice.
7. Call `posthog:subscriptions-create`.
8. Read the saved subscription and check each requested field.
9. If the user approved an immediate delivery, check its delivery record.

If creation times out or returns an uncertain result, list matching subscriptions before you retry.
Creation is not idempotent.
A blind retry can create a duplicate subscription and send a duplicate immediate delivery.

Do not infer missing recipients, channels, times, or time zones.
Ask for these values before creation.

### Find existing subscriptions

Use these list filters when they reduce ambiguity:

- `resource_type`: `insight`, `dashboard`, or `ai_prompt`.
- `target_type`: `email`, `slack`, or `teams`.
- `insight` or `insights`: One insight ID or a comma-separated ID list.
- `dashboard`: One dashboard ID.
- `dashboard_tiles`: Insight subscriptions for live tiles on one dashboard.
- `created_by`: One creator UUID.

### Check for duplicates

Use `search` when the user supplied a title, insight name, dashboard name, or prompt text.
Prompt subscriptions match their title and prompt text.
Compare the resource, destination type, target, schedule, and enabled state.

A Teams result contains only the webhook host.
One host can serve many channels.
Do not use the host to identify a duplicate.

Show the title, schedule, creator, and creation date for possible Teams matches.
Ask the user to select a subscription when these fields identify it.
Create a new subscription when no field identifies the target channel.

### Confirm the saved result

Check these fields after creation:

- `resource_type` matches `insight`, `dashboard`, or `ai_prompt`.
- `target_type` and the safe target label match the request.
- `enabled` is `true`.
- `next_delivery_date` matches the schedule and time zone.
- The AI and delivery options match the user's choices.

## Change a subscription

Call `posthog:subscriptions-retrieve` before each update.
Before an update that can send a delivery, list the current delivery IDs.
Then call `posthog:subscriptions-partial-update` with the changed fields.

Ask before an update that can send an immediate delivery.
The MCP update tool cannot suppress an immediate delivery for these changes.
If the user does not approve delivery, do not make the update.

- Set `enabled: false` to pause delivery.
- Set `enabled: true` to resume delivery.
- Send the complete new target when you change recipients.
- Send `target_type` and `target_value` together when you change the destination type.
- Omit `target_value` to keep a saved Teams webhook URL.
- Send the full new Teams webhook URL when you replace it.

The resource type cannot change.
Create a new subscription when the user wants a different resource type.

Check the new `next_delivery_date` after a schedule update.
An exhausted schedule cannot resume until the user extends or removes its end condition.

After an update that sends a delivery, poll for a new `target_change` delivery ID.
Read that delivery until it reaches a final state.
Then retrieve the subscription and check its final `enabled` value.

## Test and inspect delivery

1. Ask for approval unless the user already requested a test.
2. List the current delivery IDs.
3. Call `posthog:subscriptions-test-delivery-create`.
4. Poll for a new manual delivery ID.
5. Read the new delivery when the list result needs more detail.

Wait between polls and stop after two minutes.
If delivery does not reach a final state, report the last state and suggest another check later.

A test sends a real message.
The tool returns `202` after it queues the delivery.
It returns `409` when another test is active or the subscription is disabled.

Delivery states are `starting`, `completed`, `failed`, and `skipped`.
Filter the delivery list by `status` when you investigate a failure.
A queued workflow does not prove delivery.
A completed delivery can contain partial recipient failures.
The MCP tools hide per-recipient results.
Do not claim that each recipient succeeded.

## Stop a subscription

Confirm the subscription ID and safe destination label.
Ask for approval unless the user already requested deletion or unsubscribe.
Then call `posthog:subscriptions-delete`.

Deletion is a one-way soft delete through MCP.
It stops future deliveries and frees a plan slot.
Create a new subscription if the user needs it again.

## Report the result

- State the resource type, destination type, schedule, and next delivery date.
- State whether the subscription is enabled.
- State whether AI features can consume AI credits.
- Do not repeat email addresses unless the user needs them for confirmation.
- Never repeat a Teams webhook URL.

## Related skills

- `creating-ai-subscription`: Create a report from a free-text AI prompt.
- `building-a-dashboard`: Create a dashboard before you subscribe to it.
- `adding-product-alerting`: Notify users when data meets a condition.
- `managing-reminders`: Schedule a private prompt to inspect a resource.
- `understanding-billing-usage`: Investigate PostHog AI credit use.

© PostHog · MIT · PostHog/skills

Похожие скиллы

Все скиллы по теме «Данные и базы» →
xlsx официальный anthropics Работает с табличными файлами: создаёт, читает, правит и преобразует книги. Подходит, когда итогом должен стать файл Excel или другой табличный формат. 187 223установок google-agents-cli-observability официальный Google Помогает настроить трассировку и сбор данных о работе ИИ-агентов, включая агентов на ADK. Пригодится, когда нужно разбирать выполнение запросов или наблюдать за агентом после развёртывания. CX Codex +1 511 300установок caveman-evidence-review JuliusBrussee Скилл читает данные Caveman Cloud о расходах LLM, трассах и маршрутизации. Подходит для проверки того, куда уходит бюджет проекта. CX Codex +1 104 500установок migration JuliusBrussee Скилл задаёт правила безопасных миграций схем, данных и API с обязательным откатом. Пригодится при изменениях, где нельзя терять данные или ломать совместимость. CX Codex +1 103 900установок performance-optimization addyosmani Скилл для агентов ИИ-кодинга: сначала замеряет, потом чинит узкое место — от Core Web Vitals до N+1 запросов и индексов в базе. CX Codex +1 65 200установок supabase официальный supabase Скилл помогает настраивать базу данных, аутентификацию и RLS в Supabase без скрытых дыр в безопасности. CX Codex GP ChatGPT 8установок

Из того же набора48

instrument-product-analytics Добавляет в код вызовы PostHog, чтобы отслеживать действия пользователей. Пригодится после новой фичи или разбора пул-реквеста. CX Codex +1 666установок instrument-integration Скилл добавляет PostHog SDK в приложение: определяет стек, ставит пакет, прописывает инициализацию и переменные окружения. CX Codex +1 537установок instrument-feature-flags Добавляет флаги PostHog к новой или изменённой функциональности. Нужен после реализации фичи или при ревью PR, когда релизом управляют постепенно. CX Codex +1 530установок instrument-error-tracking Скилл подключает к проекту отслеживание исключений в PostHog: автозахват падений, ручные вызовы в catch-блоках и загрузка source maps. CX Codex +1 503установок instrument-llm-analytics Скилл настраивает PostHog AI Observability в проекте. Он собирает токены и стоимость вызовов LLM для разных фреймворков и провайдеров. CX Codex +1 462установок instrument-logs Настраивает экспорт структурированных логов в PostHog через OpenTelemetry или нативные SDK после написания фичи или ревью пуллреквеста. CX Codex +1 454установок exploring-autocapture-events Помогает анализировать события $autocapture из библиотеки posthog-js. Скилл подбирает надёжные CSS-селекторы кликов, проверяет их уникальность и строит фильтры для воронок. CX Codex +1 435установок cleaning-up-stale-feature-flags Находит устаревшие фича-флаги в проекте PostHog и убирает код, который их проверяет. Пригодится, когда флагов накопилось много и непонятно, какие уже можно удалить. CX Codex +1 434установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой