Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计通过

sending-notifications发送通知

Agent Skill

sending-notifications 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

480

周安装

20

GitHub Stars

34,217

下载量

160
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sending-notifications(发送通知)
来源仓库:https://github.com/posthog/posthog
仓库路径:skills/sending-notifications
安装命令:
npx skills add https://github.com/posthog/posthog --skill sending-notifications
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/posthog/posthog --skill sending-notifications

简介

sending-notifications 用于处理 GitHub 仓库、Issue、Pull Request 等协作信息。

  • 它适合在开发或维护流程中自动整理代码变更、跟踪任务或同步协作状态。
  • 通过 npx skills add 命令从指定仓库安装,具体用法需结合原始 README 验证。
  • 使用前应确认是否具备对目标仓库的读取权限,避免越权操作。
  • 该技能分类为“前端设计”,但功能聚焦于代码协作,可能存在归类偏差。

SKILL.md

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:

FieldTypeDescription
team_idintTeam context — used to look up the organization and check the feature flag
notification_typeNotificationTypeDetermines the icon in the UI
titlestrNotification headline (~100 chars recommended)
bodystrLonger description shown on expand. Can be empty string
target_typeTargetTypeWho receives this: user, team, organization, or role
target_idstrID of the target (user ID, team ID, org UUID, or role UUID as string)

Optional:

FieldTypeDefaultDescription
resource_type`NotificationResourceType \None`NoneAccess-controlled types (e.g. "dashboard") auto-filter recipients without viewer access
resource_idstr""ID of the resource for linking
source_urlstr""Relative URL path (e.g. /dashboard/42), shown as link icon in UI
priorityPriorityNORMALnormal = popover only; critical = popover + persistent toast
resolver`RecipientsResolver \None`NoneCustom recipient resolver. Default handles user/team/org/role targeting

Choosing parameters

Notification type

TypeWhen to use
comment_mentionUser was @mentioned in a comment or discussion
alert_firingA monitoring alert threshold was breached
approval_requestedA change requires the user's approval
approval_resolvedAn approval the user requested has been resolved
pipeline_failureA data pipeline or batch export failed
issue_assignedAn error tracking issue was assigned to the user

Priority

Be very careful with critical. It triggers a persistent toast popup that overlays the user's screen and must be manually dismissed. This is intentionally intrusive — reserve it for genuine emergencies like outages, security alerts, or SLA breaches. Overusing critical will train users to ignore notifications entirely. When in doubt, use normal.

Target type

Targettarget_id valueRecipients
userUser IDJust that user
teamTeam IDAll members of the team's organization
organizationOrganization IDAll organization members
roleRole IDAll users with that RBAC role

Resource type and access control

When resource_type matches an access-controlled resource (dashboard, feature_flag, experiment, etc.), recipients without viewer access are automatically excluded. For notification-only types (pipeline, approval, comment), no AC filtering is applied.

Delivery pipeline

Django (create_notification)
  → Postgres (NotificationEvent row)
  → Kafka (notification_events topic, on transaction commit)
  → Go livestream service (Kafka consumer)
  → Redis SPUBLISH (sharded pub/sub, keyed by org ID)
  → SSE (/notifications endpoint)
  → Browser (popover + optional toast)

Kafka publish happens on transaction.on_commit — won't fire if the transaction rolls back.

Adding a new notification type

  1. Add enum value in products/notifications/backend/facade/enums.py
  2. Add icon mapping in frontend/src/lib/components/NotificationsMenu/NotificationRow.tsx (NOTIFICATION_TYPE_ICONS)
  3. Add the same icon in the toast handler in frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelNotificationsLogic.tsx (iconMap)
  4. Add sample data in SAMPLE_NOTIFICATIONS in products/notifications/backend/presentation/views.py
  5. Run python manage.py makemigrations notifications

Testing

Mock the feature flag in tests:

from unittest.mock import patch

with patch("posthoganalytics.feature_enabled", side_effect=lambda flag, *a, **kw: flag == "real-time-notifications"):
    event = create_notification(data)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.53%
按下载量换算54

Claude

29.91%
按下载量换算48

Cursor

20.01%
按下载量换算32

Gemini CLI

10.51%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills