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.
80
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
[!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:
| 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 |
Both paths must preserve these rules:
CheckInput.common/alerting/state_machine.py; express real product differences through AlertPolicy, not forks.state or consecutive_failures write goes through the product adapter's apply_outcome.products/alerts/backend/scheduling.py. Keep model-specific due predicates and persistence with the adopter.common/alerting/ stays pure Python. Reusable Django behavior belongs in products/alerts/backend/.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.
| 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 |
22b655e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.