mcpbeat Sign in

Adding Product Alerting Agent Skill

> Recommended repo-engineering guide when adding alerting to a PostHog product or extending the shared alerts platform. Routes lifecycle state machines, AlertPolicy, destinations, HogFunction dispatch, email, fixed-cadence and calendar scheduling, insight evaluation, the AlertWizard, and shared alert editor components. Use for product alert implementations, shared destination types, lifecycle or scheduling options, advanced alert settings, and platform alert infrastructure. Not for configuring alerts in an existing product.

10k tokens
context cost
the whole folder, loaded on every use
5
files
instructions only
0
copies elsewhere
how many repositories repackaged it
690
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/PostHog/posthog --skill adding-product-alerting

What comes with it

35 512 bytes besides the instruction
references/adopting-platform-alerting.md
references/architecture.md
references/extending-platform-alerting.md
references/frontend-alerting.md

The instruction itself

5 sections, as written by the author

Adding and extending product alerting

> [!IMPORTANT]

> Use this skill as the recommended engineering starting point whenever a PostHog product is considering adding alerting. Start here before creating a product-local alert framework.

This skill covers two jobs:

  • Add platform alerting to a product by composing the shared lifecycle, destination, delivery, scheduling, email, and frontend primitives.
  • Extend the alerts platform when a reusable capability, option, or advanced behavior belongs in shared infrastructure.

Route first

| Request | Path | Read |

| -------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------ |

| Add alerting to a product | Adopt | adopting-platform-alerting.md |

| Build or extend a product alert editor, destination UI, advanced options, or evaluation history | Frontend | frontend-alerting.md |

| Add a lifecycle rule, destination type, delivery behavior, schedule primitive, email capability, wizard option, or shared evaluation feature | Extend | extending-platform-alerting.md |

| Change behavior for one existing product | Adopt first | Keep it product-owned unless the behavior is reusable and backed by a real second use case |

| Understand ownership or choose the correct layer | Architecture | architecture.md |

| Configure or author an existing logs or error tracking alert | Out of scope | Use authoring-log-alerts or authoring-error-tracking-alerts |

| Add real-time in-app notifications | Out of scope | Use sending-notifications |

Platform invariants

Both paths must preserve these rules:

  • Evaluation stays domain-specific. Products decide whether their data breached. The shared lifecycle consumes normalized CheckInput.
  • One lifecycle machine. Reuse products/alerts/backend/state_machine.py; express real product differences through AlertPolicy, not forks.
  • One product mutator. Every persisted state or consecutive_failures write goes through the product adapter's apply_outcome.
  • Dispatch and persistence agree. For HogFunction notifications, do not persist a notification-dependent transition until the internal-event producer acknowledges the event. Restore the pre-check outcome when production fails. This acknowledgement does not confirm downstream destination execution.
  • Destinations are allowlisted. Shared support does not automatically expose a destination in every product.
  • Scheduling math is shared, eligibility is product-owned. Reuse fixed-cadence, calendar-anchor, timezone, and schedule-restriction helpers from products/alerts/backend/scheduling.py. Keep model-specific due predicates and persistence with the adopter.
  • Shared code has no product branches. The lifecycle module stays pure Python. Reusable Django behavior belongs elsewhere in products/alerts/backend/.
  • Frontend data is normalized at the product boundary. Shared editor components render normalized definitions, destinations, advanced options, schedules, and history. Product API calls, payloads, and evaluation-specific fields stay in the product adapter.
  • Defaults remain backward compatible. New platform options must preserve existing adopters until they explicitly opt in.

Current limits

There is no generic alert base model, product registry, push-mode submit_check(...), generic scheduler runner, or generic Temporal harness. Do not invent a parallel framework around those missing pieces. For non-insight products, keep evaluation, persistence, due queries, history, and orchestration in the product until a shared contract lands.

Reference appendix

| Topic | Reference |

| --------------------------------------------------------- | --------------------------------------------------------------------------- |

| Layer ownership, public contracts, and reference adopters | architecture.md |

| Add alerting to a product | adopting-platform-alerting.md |

| Extend shared alert infrastructure | extending-platform-alerting.md |

| Build the product alert frontend | frontend-alerting.md |

Other skills for the same job

different authors, same section of the catalogue
Workflow Automation
by ComeOnOliver
×3

Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off. This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation. Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility

3k tokens
Cloudinary Automation
by christophacham
×2

Automate Cloudinary media management including folder organization, upload presets, asset lookup, transformations, and usage monitoring through natural language commands

2k tokens needs MCP
Cicd Automation Workflow Automate
by ComeOnOliver
×2

You are a workflow automation expert specializing in creating efficient CI/CD pipelines, GitHub Actions workflows, and automated development processes. Design automation that reduces manual work, improves consistency, and accelerates delivery while maintaining quality and security.

13k tokens
Server Management
by ComeOnOliver
×2

Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.

3k tokens
Create Github Action Workflow Specification
by github
vendor ×1

Create a formal specification for an existing GitHub Actions CI/CD workflow, optimized for AI consumption and workflow maintenance.

2k tokens
Dnanexus Integration
by K-Dense-AI
×1

Build and operate reproducible genomics workloads on DNAnexus with the dx CLI, dxpy, apps/applets, native workflows, dxCompiler, and Nextflow. Use for DNAnexus data transfers, dxapp.json development, execution monitoring, workflow import, and project automation.

37k tokens scripts
Search Company Knowledge
by openai
vendor ×1

Search across company knowledge bases (Confluence, Jira, internal docs) to find and explain internal concepts, processes, and technical details. When an agent needs to: (1) Find or search for information about systems, terminology, processes, deployment, authentication, infrastructure, architecture, or technical concepts, (2) Search internal documentation, knowledge base, company docs, or our docs, (3) Explain what something is, how it works, or look up information, or (4) Synthesize information from multiple sources. Searches in parallel and provides cited answers.

4k tokens
Deployment Procedures
by lingxling
×1

Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.

2k tokens

How to use it

Copy the folder

Take posthog/adding-product-alerting from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.