Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

courier-notification-skills快递通知技巧

Agent Skill

courier-notification-skills 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

989

周安装

40

GitHub Stars

7

下载量

310
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/trycourier/courier-skills --skill courier-notification-skills

简介

courier-notification-skills 提供跨平台通知交付与互动体验设计指导,覆盖短信、邮件、推送等多个渠道。

  • 强调错误处理、路由逻辑与用户体验一致性原则。
  • 实施前应查阅最新 API 文档确认接口变更情况。
  • 综合运用多种策略保障消息成功触达目标受众。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Courier Notification Skills

Guidance for building deliverable and engaging notifications across all channels.

How to Use This Skill

  1. Identify the task — What channel, notification type, or cross-cutting concern is the user working on?
  2. Read only what's needed — Use the routing tables below to find the 1-2 files relevant to the task. Do NOT read all files.
  3. Check for live docs — For current API signatures and SDK methods, fetch https://www.courier.com/docs/llms.txt
  4. Synthesize before coding — Plan the complete implementation (channels, routing, error handling) before writing code.
  5. Apply the rules — Each resource file starts with a "Quick Reference" section containing hard rules. Treat these as constraints, not suggestions.
  6. Check universal rules — Before generating any notification code, verify it doesn't violate the Universal Rules below.

Handling Vague Requests

If the user's request doesn't clearly map to a specific channel, notification type, or guide, ask clarifying questions before reading any resource files. Don't guess — a wrong routing wastes time and produces irrelevant code.

Ask these questions as needed:

  1. What channel? — "Which channel are you sending through: email, SMS, push, in-app, Slack, Teams, or WhatsApp?"
  2. What type? — "Is this a transactional notification (triggered by a user action, like a password reset or order confirmation) or a marketing/growth notification (sent proactively, like a feature announcement)?"
  3. New or existing? — "Are you starting from scratch, or do you have existing Courier code? If existing, what SDK packages do you have installed?"
  4. What language? — "Are you using TypeScript/Node.js, Python, or another language?"

You don't need to ask all four — just the ones needed to route to the right 1-2 files. If the request is clearly about a specific topic (e.g., "help me with SMS"), skip the questions and go directly to the relevant resource.

Routing consequences of question 3 ("new or existing"):

AnswerSkipLoad
New to Courier / no existing code(nothing)quickstart.md + the relevant channel or type file
Existing — has @trycourier/courier or trycourier installedquickstart.md install + env-setup sectionsJump directly to channel or type file; assume client is constructed. Offer courier messages list as a one-line health check if useful.
Existing — Inbox v7 (@trycourier/react-*)v8 guidanceSee "Courier Inbox Version Detection" block below, then inbox-v7-legacy.md

Canonical SDK Shape

Before you write or evaluate any Courier code, ground it in this shape. If anything in a file below appears to contradict it, trust this block and fetch live docs to resolve — do not paste the contradicting snippet.

Node.js (@trycourier/courier, Stainless-generated):

import Courier from "@trycourier/courier";

// Reads process.env.COURIER_API_KEY by default
const client = new Courier();

await client.send.message({
  message: {
    to: { user_id: "user-123" },           // or { email }, { phone_number }, { list_id }, { tenant_id }, etc.
    template: "nt_01kmrbq6ypf25tsge12qek41r0", // OR content: { title, body } / { version, elements }
    data: { /* merge variables */ },
  },
}, {
  // Pass the Idempotency-Key via headers. Always set it explicitly here —
  // that is the one path guaranteed to be sent to the API across SDK
  // versions. Verify against your installed SDK version before relying on
  // any other `idempotencyKey` request option.
  headers: { "Idempotency-Key": "order-confirmation-12345" },
});

Python (trycourier, Stainless-generated):

from courier import Courier

# Reads COURIER_API_KEY from env by default
client = Courier()

client.send.message(
    message={
        "to": {"user_id": "user-123"},
        "template": "nt_01kmrbq6ypf25tsge12qek41r0",
        "data": {},
    },
    # Pass the Idempotency-Key via extra_headers. Python does not accept
    # idempotency_key= as a keyword argument — the header is the only way.
    extra_headers={"Idempotency-Key": "order-confirmation-12345"},
)

Method naming quick lookup (generated SDKs — both SDKs follow the same structure, Node = camelCase, Python = snake_case):

OperationNodePython
Send a messageclient.send.message({message})client.send.message(message=...)
Create a templateclient.notifications.create({notification, state}) → returns {id, name, content, …} at top levelclient.notifications.create(notification=..., state=...)response.id
Publish a templateclient.notifications.publish(templateId)client.notifications.publish(template_id)
Retrieve a messageclient.messages.retrieve(id)client.messages.retrieve(id)
List messagesclient.messages.list({...})client.messages.list(...)
Subscribe a user to a list (additive)client.lists.subscriptions.subscribeUser(userId, {list_id})client.lists.subscriptions.subscribe_user(user_id, list_id=...)
Replace a list's subscribersclient.lists.subscriptions.subscribe(listId, {recipients})client.lists.subscriptions.subscribe(list_id, recipients=...)
Create/replace a tenantclient.tenants.update(tenantId, body)client.tenants.update(tenant_id,...)
Add a user to a tenantclient.users.tenants.addSingle(tenantId, {user_id})client.users.tenants.add_single(tenant_id, user_id=...)
Create a bulk jobclient.bulk.createJob({message: {event}}) (event required)client.bulk.create_job(message={"event":...})
Create/update a profile (merge)client.profiles.create(userId, {profile})client.profiles.create(user_id, profile=...)
Get a user's preferencesclient.users.preferences.retrieve(userId)client.users.preferences.retrieve(user_id)
Update a user's preference for a topicclient.users.preferences.updateOrCreateTopic(topicId, {user_id, topic: {status,...}})client.users.preferences.update_or_create_topic(topic_id, user_id=..., topic=...)
Register a user's device tokenclient.users.tokens.addSingle(token, {user_id, provider_key, device})client.users.tokens.add_single(token, user_id=..., provider_key=..., device=...)
Trigger an automation from a templateclient.automations.invoke.invokeByTemplate(templateId, {recipient, data})client.automations.invoke.invoke_by_template(template_id, recipient=..., data=...)
Trigger an ad-hoc automationclient.automations.invoke.invokeAdHoc({recipient, automation})client.automations.invoke.invoke_ad_hoc(recipient=..., automation=...)
Create a routing strategyclient.routingStrategies.create({name, routing, channels?, providers?}) → returns {id: "rs_...",...}client.routing_strategies.create(name=..., routing=...,...)
Replace a routing strategy (full PUT)client.routingStrategies.replace(id, {name, routing,...})client.routing_strategies.replace(id, name=..., routing=...,...)
Configure a providerclient.providers.create({provider, settings, title?, alias?})client.providers.create(provider=..., settings=...,...)
List provider catalog (required settings schema)client.providers.catalog.list({keys?, name?, channel?})client.providers.catalog.list(keys=..., channel=...)
Cancel a messageclient.messages.cancel(messageId)client.messages.cancel(message_id)
Retrieve a templateclient.notifications.retrieve(templateId)client.notifications.retrieve(template_id)
List templatesclient.notifications.list()client.notifications.list()
Replace a template (full PUT)client.notifications.replace(templateId, {notification, state})client.notifications.replace(template_id, notification=..., state=...)
Archive a templateclient.notifications.archive(templateId)client.notifications.archive(template_id)
Get published template contentclient.notifications.retrieveContent(templateId)client.notifications.retrieve_content(template_id)
The table above covers the most common operations. templates.md, routing-strategies.md, and providers.md each contain their own complete SDK shape tables for CRUD on their respective resources (including list, retrieve, replace, archive).

Shapes that do NOT exist (do not invent them):

  • client.messages.archive(...) — archive is REST-only: POST /messages/{id}/archive. Note: client.notifications.archive(id) and client.routingStrategies.archive(id) / client.providers.archive(id) DO exist — this restriction is specific to the messages namespace.
  • client.tenants.createOrReplace(...) — use client.tenants.update
  • client.lists.subscribe(listId, userId) — use subscriptions.subscribeUser or subscriptions.subscribe
  • Bulk createJob({message: {template}}) without eventevent is required
  • client.users.preferences.update(...) — use client.users.preferences.updateOrCreateTopic(topicId, {user_id, topic}).
  • client.automations.invoke(templateId,...) — the real shape is client.automations.invoke.invokeByTemplate(...) or client.automations.invoke.invokeAdHoc(...).
  • client.routing.create(...) / client.strategies.* — the real namespace is client.routingStrategies.* (Node) / client.routing_strategies.* (Python).
  • client.integrations.* — there is no integrations namespace; provider configurations live under client.providers.* and the provider type catalog under client.providers.catalog.*.

Shapes that exist but should not be the default:

  • client.profiles.update(userId, {patch: [...]}) — this DOES exist and applies a JSON Patch (RFC 6902). Use it only when the user specifically needs atomic field-level ops (add/remove/replace/test on specific paths). For the common "merge these fields into the profile" case, use client.profiles.create(userId, {profile}) (POST, deep-merge).
  • client.profiles.replace(userId, {profile}) — this DOES exist and is a full PUT that overwrites the profile. Use it only when you need to reset a profile to a known-good state. For everyday writes, client.profiles.create (merge) is safer because it won't silently drop fields.

Universal Rules

  • NEVER batch or delay OTP, password reset, or security alert notifications
  • Use idempotency keys for sends where duplicates would be harmful (payments, security alerts, OTPs)
  • NEVER expose full email/phone in security change notifications (mask them)
  • ALWAYS include "I didn't request this" links in security-related emails
  • ALWAYS use E.164 format for phone numbers
  • Only send to channels the user has asked for or that make sense for the use case — don't blast every channel by default
  • For template sends, use Courier-generated nt_... IDs as canonical; treat IDs as opaque workspace-specific values and resolve aliases to nt_... before sending

See also (not duplicated here)

Courier Inbox Version Detection

Before providing Inbox guidance, determine which SDK version the user is on:

  1. Check for v7 indicators — Look for any of: @trycourier/react-provider, @trycourier/react-inbox, @trycourier/react-toast, @trycourier/react-hooks, <CourierProvider>, useInbox(), useToast(), <Inbox /> (not <CourierInbox />), clientKey prop, renderMessage prop. Check package.json if available.
  2. Check for v8 indicators — Look for any of: @trycourier/courier-react, @trycourier/courier-react-17, @trycourier/courier-ui-inbox, useCourier(), <CourierInbox />, <CourierToast />, courier.shared.signIn(), registerFeeds, listenForUpdates.
  3. If unclear, ask — "Which version of the Courier Inbox SDK are you using? If you have @trycourier/react-inbox in your package.json, that's v7. If you have @trycourier/courier-react, that's v8."

ALWAYS use v8 for new projects — v7 is legacy. If the user is on v7:

  • Do NOT write new v7 code. The correct path is to upgrade to v8.
  • Read resources/channels/inbox-v7-legacy.md before touching v7 code — it documents recognition patterns and the migration path.
  • Guide them to migrate using the step-by-step guide: https://www.courier.com/docs/sdk-libraries/courier-react-v8-migration-guide
  • v8 is a smaller bundle, has no third-party dependencies, built-in dark mode, and a modern UI.
  • The v7 and v8 APIs are completely different — v7 code will not work with v8 and vice versa.
  • Only exception: v8 does not yet support Tags or Pins. If the user depends on those, they may need to stay on v7 temporarily, but should plan to migrate once v8 adds support.

Official Courier Documentation

When you need current API signatures, SDK methods, or features not covered in these resources:

  1. Fetch https://www.courier.com/docs/llms.txt — returns a structured markdown index of all Courier documentation pages with URLs and descriptions
  2. Scan the index for the relevant page, then fetch that page's URL for full details
  3. Prefer the patterns in THIS skill for best practices; use llms.txt for API specifics

When to use llms.txt:

  • You need the exact signature for a method not shown in these resources (e.g., client.audiences.create())
  • A developer asks about a Courier feature this skill doesn't cover (e.g., Audiences, Brands, Translations)
  • You need to verify that a code example in this skill matches the current SDK version

When NOT to use llms.txt:

  • The answer is already in these resource files (prefer this skill's opinionated patterns over raw docs)
  • The question is about best practices or notification design (llms.txt won't help)

Architecture Overview

[User Action / System Event]
            │
            ▼
    ┌───────────────┐
    │ Notification  │
    │   Trigger     │
    └───────┬───────┘
            │
            ▼
    ┌───────────────┐
    │   Routing     │──── User Preferences
    │   Decision    │──── Channel Availability
    └───────┬───────┘──── Urgency Level
            │
            ▼
    ┌───────────────────────────────────────┐
    │           Channel Selection           │
    ├───────┬───────┬───────┬───────┬──────┤
    │ Email │  SMS  │ Push  │ Inbox │ Chat │
    └───┬───┴───┬───┴───┬───┴───┬───┴───┬──┘
        │       │       │       │       │
        ▼       ▼       ▼       ▼       ▼
    [Delivery] [Delivery] [Delivery] [Delivery] [Delivery]
        │       │       │       │       │
        └───────┴───────┴───────┴───────┘
                        │
                        ▼
                ┌───────────────┐
                │   Webhooks    │
                │   & Events    │
                └───────────────┘

Quick Reference

By Channel

Need to...Pick when...See
Send emails, fix deliverability, set up SPF/DKIM/DMARCYou need a durable, detailed record. Receipts, confirmations, long-form content, attachments, rich formatting. Deliverability depends on sender reputation (SPF/DKIM/DMARC); not real-time.Email
Send SMS, handle 10DLC registrationYou need reach and speed for short, time-sensitive messages. OTP, appointment reminders, shipping updates. 10DLC registration required in US; small character budget; per-message cost.SMS
Send push notifications, handle iOS/Android differencesYou need to nudge an engaged app user. Activity notifications, real-time alerts, re-engagement. Requires device token + OS permission; iOS and Android permission models differ; silent for users who disabled permission.Push
Build in-app notification centerYou need persistent, in-app notifications with read state, cross-device sync, and an inbox UI. Only visible in-app. Requires the Courier Inbox SDK (v7 vs v8 matters — see the file's header and the Inbox Version Detection section above).Inbox (v8) — v8 primary. If you have existing v7 code (@trycourier/react-inbox, <CourierProvider>, useInbox), see Inbox v7 legacy before touching it.
Send Slack messages with Block KitThe recipient is a Slack user or channel. Internal alerts, team notifications, chatops. Requires OAuth + bot setup; Block Kit has its own JSON shape; rate-limited per workspace.Slack
Send Microsoft Teams messagesThe recipient uses Microsoft Teams. Same use cases as Slack, different org. Requires connector or bot; Adaptive Cards have their own shape.MS Teams
Send WhatsApp messages with templatesRegulated markets, customer support, high-engagement regions (LATAM, EU, IN). Rich media + templates. Approved Message Templates required outside the 24-hour customer service window; per-conversation pricing by category.WhatsApp

By Transactional Type

Need to...See
Build password reset, OTP, verification, security alertsAuthentication
Build order confirmations, shipping, delivery updatesOrders
Build receipts, invoices, dunning, subscription noticesBilling
Build booking confirmations, reminders, reschedulingAppointments
Build welcome messages, profile updates, settings changesAccount
Understand transactional notification principlesTransactional Overview

By Growth Type

Need to...See
Build activation flows, setup guidance, first valueOnboarding
Build feature announcements, discovery, educationAdoption
Build activity notifications, retention, habit loopsEngagement
Build winback, inactivity, cart abandonmentRe-engagement
Build referral invites, rewards, viral loopsReferral
Build promotions, sales, upgrade campaignsCampaigns
Understand growth notification principlesGrowth Overview

Cross-Cutting Guides

Need to...See
Get started sending your first notificationQuickstart
Route across multiple channels, set up fallbacksMulti-Channel
Manage user notification preferencesPreferences
Handle retries, idempotency, error recoveryReliability
Combine notifications, build digestsBatching
Control frequency, prevent fatigueThrottling
Plan notifications for your app typeCatalog
Use the CLI for ad-hoc operations, debugging, agent workflowsCLI
Use the MCP Server for structured API access from AI agentsMCP Server
Manage templates via API (create, publish, version)Templates
Create routing strategies via API (rs_..., provider priority)Routing Strategies
Configure providers via API (SendGrid, Twilio, etc., catalog discovery)Providers
Understand Elemental content format (element types, control flow, localization)Elemental
Reusable code patterns (consent, quiet hours, masking, retry)Patterns
Migrate from any notification system to CourierGeneral Migration
Migrate from Knock to CourierMigrate from Knock
Migrate from Novu to CourierMigrate from Novu

Topics Not Covered In Depth (fetch from official docs)

The skill does not (yet) have dedicated guides for these areas. Fetch the page below via WebFetch when the user asks about them; do not invent API shapes from memory. When in doubt, fetch https://www.courier.com/docs/llms.txt first and use the URL it returns.

TopicFetch
Audiences (attribute-based targeting)https://www.courier.com/docs/platform/users/audiences
Automations (workflows, delays, digests, conditions)https://www.courier.com/docs/automations/overview
Brands (logos, colors, reusable visual identity)https://www.courier.com/docs/platform/content/brands
Tenants (multi-tenant B2B, per-tenant branding/preferences)https://www.courier.com/docs/platform/tenants/tenants-overview (also see Patterns "Tenants" section for code)
Events / event mappinghttps://www.courier.com/docs/platform/automations/inbound-events (plus the event field on Send API)
Translations / i18n (beyond the per-template locales block)https://www.courier.com/docs/platform/content/elemental/locales (element-level) or https://www.courier.com/docs/api-reference/translations/get-a-translation (API)

Minimal File Sets by Task

For common tasks, you only need to read these specific files:

TaskFiles to Read
OTP/2FA implementationauthentication.md, sms.md
Password resetauthentication.md, email.md
Order notificationsorders.md, multi-channel.md
Email setup & deliverabilityemail.md
SMS setupsms.md (includes 10DLC)
Push notification setuppush.md
In-app inbox setupinbox.md — v8 primary; see inbox-v7-legacy.md only for existing v7 code
Onboarding sequenceonboarding.md, multi-channel.md
Security alertsauthentication.md, multi-channel.md
Digest/batchingbatching.md, preferences.md
Payment/billing notificationsbilling.md, reliability.md
Appointment remindersappointments.md, sms.md
WhatsApp templateswhatsapp.md
Slack/Teams integrationslack.md or ms-teams.md
New to Courier / first notificationquickstart.md
CLI debugging / ad-hoc operationscli.md
SMS delivery debuggingcli.md, sms.md
Email deliverability debuggingcli.md, email.md
General delivery failurescli.md, reliability.md
MCP Server setupmcp.md, cli.md
Migrating from any systemmigrate-general.md, quickstart.md
Migrating from Knockmigrate-from-knock.md, quickstart.md
Migrating from Novumigrate-from-novu.md, quickstart.md
Template CRUD / programmatic templatestemplates.md, patterns.md
Create routing strategy programmaticallyrouting-strategies.md, templates.md
Configure a provider via API (SendGrid/Twilio/etc.)providers.md, multi-channel.md
Elemental content format (element types, control flow)elemental.md
Inline vs templated sendingtemplates.md, quickstart.md
Lists, bulk sends, multi-tenantpatterns.md
Provider failover setupmulti-channel.md
Webhook setup & signature verificationreliability.md
Preference topics and opt-outpreferences.md
Inbox JWT auth and React setupinbox.md — v8 primary; see inbox-v7-legacy.md only for existing v7 code
Understanding to field / addressingquickstart.md
Building multi-channel notificationsmulti-channel.md, preferences.md
Making sends reliablereliability.md, patterns.md
Reducing notification fatiguethrottling.md, batching.md, preferences.md
Templates + multi-channel routingtemplates.md, multi-channel.md

Decision Guide

What are you building?

  • A specific notification (OTP, order confirm, password reset, etc.) → Use the Minimal File Sets table above to find exactly which 1-2 files to read.
  • A new notification channel (email, SMS, push, Slack, etc.) → See By Channel for the channel-specific guide.
  • Notification infrastructure (routing, preferences, reliability, batching) → See Cross-Cutting Guides for the relevant guide.
  • Planning which notifications to build for a new app → Start with Catalog, then Email, then Multi-Channel.
  • Growth / lifecycle notifications (onboarding, engagement, referral) → Read Growth Overview for consent requirements first, then the specific type.
  • New to Courier or sending your first notification → Start with Quickstart.
  • Debugging delivery issues → Always start with CLI (courier messages list, courier messages content) to see the real delivery state before guessing. Then: email going to spam? Email. SMS not arriving? SMS. General failures? Reliability.
  • Ad-hoc operations, CI/CD, or AI agent workflows → Use MCP if your editor supports it (Cursor, Claude Code, Claude Desktop, Windsurf, VSCode) — see MCP Server. Use CLI for shell-only environments, CI/CD, or when MCP isn't available — see CLI. Both use the same API key and cover the same API surface.
  • Managing templates programmatically or understanding Elemental (Courier's JSON templating language) → See Templates for the full CRUD lifecycle (create, publish, version, localize). See Elemental for the element-by-element reference (text, action, image, meta, channel, group), control flow (if, loop, ref), and locale handling.
  • Reusable code patterns (consent check, quiet hours, idempotency, fallback) → See Patterns for copy-paste implementations in TypeScript, Python, CLI, and curl.
  • Migrating from another notification system to Courier → From Knock: Migrate from Knock. From Novu: Migrate from Novu. From any other system (custom-built, SendGrid direct, Twilio direct, etc.): General Migration.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.96%
按下载量换算115

Claude

29.79%
按下载量换算92

Cursor

17.85%
按下载量换算55

Gemini CLI

9.84%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills