sending-notifications
БесплатноБез исполняемых скриптовНе проверенHow to send real-time in-app notifications from PostHog backend code. Use when integrating notifications into a new feature, wiring up a notification source…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Sending real-time notifications
When to use this
You're adding notification support to a PostHog feature — for example, notifying a user when they're mentioned in a comment, when an alert fires, or when an approval is requested.
The facade API
All notification creation goes through a single function. Import from the facade, not from internal modules:
from products.notifications.backend.facade.api import (
create_notification,
NotificationData,
NotificationType,
Priority,
TargetType,
)
Build a NotificationData and call create_notification:
event = create_notification(
NotificationData(
team_id=team.id,
notification_type=NotificationType.ALERT_FIRING,
priority=Priority.CRITICAL,
title="Event ingestion latency > 30s",
body="Events are queuing up. Ingestion pipeline is degraded.",
target_type=TargetType.USER,
target_id=str(user.id),
resource_type="dashboard",
resource_id="42",
source_url="/dashboard/42",
)
)
Returns a NotificationEvent on success, or None if the feature flag is disabled, no recipients were resolved, or the team doesn't exist. Safe to call in any context.
NotificationData fields
Required:
| Field | Type | Description |
|---|---|---|
team_id |
int |
Team context — used to look up the organization and check the feature flag |
notification_type |
NotificationType |
Determines the icon in the UI |
title |
str |
Notification headline (~100 chars recommended) |
body |
str |
Longer description shown on expand. Can be empty string |
target_type |
TargetType |
Who receives this: user, team, organization, or role |
target_id |
str |
ID of the target (user ID, team ID, org UUID, or role UUID as string) |
Optional:
| Field | Type | Default | Description |
|---|---|---|---|
resource_type |
NotificationResourceType | None |
None |
Access-controlled types (e.g. "dashboard") auto-filter recipients without viewer access |
resource_id |
str |
"" |
ID of the resource for linking |
source_url |
str |
"" |
Relative URL path (e.g. /dashboard/42), shown as link icon in UI |
priority |
Priority |
NORMAL |
normal = popover only; critical = popover + persistent toast |
archivable |
bool |
False |
Opt in to a per-recipient "archive" (dismiss) action that moves the notification to the recipient's Archived tab. When False, recipients can only mark it read/unread (the default pattern) |
resolver |
RecipientsResolver | None |
None |
Custom recipient resolver. Default handles user/team/org/role targeting |
Choosing parameters
Notification type
| Type | When to use |
|---|---|
comment_mention |
User was @mentioned in a comment or discussion |
alert_firing |
A monitoring alert threshold was breached |
approval_requested |
A change requires the user's approval |
approval_resolved |
An approval the user requested has been resolved |
pipeline_failure |
A data pipeline or batch export failed |
issue_assigned |
An error tracking issue was assigne |
Установить sending-notifications в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sending-notifications?
How to send real-time in-app notifications from PostHog backend code. Use when integrating notifications into a new feature, wiring up a notification source (alerts, comments, approvals, pipelines, issues), or choosing the right target type and priority for a notification.
Как установить скилл sending-notifications?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sending-notifications запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic