nocobase-app-plugin-notification
它能做什么
这项技能集成并配置 NocoBase 通知插件。内容包括通过渠道发送消息、查看投递记录,以及诊断发送失败。适合从业务应用发送提醒的开发者。
适用场景
- ✓当业务代码需要通过已配置的渠道发送通知时。
- ✓当通知未送达,你需要查明原因时。
- ✓当你想添加自定义传输方式来发送通知时。
技能链接
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification/skills/nocobase-app-plugin-notification/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我设置 NocoBase 应用,在提交申请时自动向经理发送邮件通知。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会配置一个命名渠道,构建消息内容,并通过通知服务发送。通知和投递历史会被保存,便于追溯失败原因。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Notification development
Inspect the application's registered plugins and effective notification configuration before changing integration code. Missing required input blocks an actual send; use the recipient and Channel scope already authorized in the conversation and ask only for missing information.
- Read Notification concepts for package ownership and delivery status semantics.
- For plugin registration, configuration, migrations, or log APIs, read Integration and configuration. Configure a Channel name mapped to one flat configuration with
type(providerremains a compatibility alias). - For sending or typed consumers, read Sending notifications. Resolve
notificationServiceToken; construct complete messages keyed by Channel name and use native recipient addresses. Validate the intended external effect before sending. - For failures and retries, read Delivery diagnostics. Preserve Notification, Delivery, Attempt, and retry-audit history; distinguish accepted submission from final delivery.
- For custom transports, read Channel type extensions. Register classes implementing
ChannelInstancewithregisterChannelTypethroughnotificationExtensionRegistryTokenand retain the queue/lease/retry lifecycle. Use deprecatedregisterChannel()/registerProvider()only when maintaining legacy compatibility code or its tests; official implementations and examples use the class API. - Verify changed packages and consumers with lint, typecheck, tests, and build. Cover atomic validation, independent delivery, recipient rules, and retries bound to original identities.
For delivery diagnostics, exercise the normal business notification flow or use a server-side script resolving notificationServiceToken with complete message input. Use an authorized recipient and inspect the returned notification ID in the logs. Credentials stay on the server.
High-impact actions and rollback
For bulk sends and live configuration changes, establish the intended recipients, Channels, and external effect from the user's authorization. An unknown result may already have reached its recipient; confirm the external effect before creating a new logical send.
Rollback source/configuration through the application's normal deployment process. A submitted notification cannot be recalled by this plugin. Preserve its history and report the observed status. Keep message bodies, recipient snapshots, credentials, and Webhook URLs out of logs and reports.
Sensitive messages
Use notificationService.sendTransient({ channel, message }) for a message containing a one-time credential. It validates and prepares the message with the configured channel and submits it once with the provider timeout, without creating notification rows, jobs, retry state, or status events. The result is one provider outcome per recipient; raw provider diagnostics are replaced with generic errors while retaining an allowlisted category and submission status for credential-free troubleshooting. There is no durable idempotency or automatic retry, and a timeout is submission_unknown. The caller owns safe recovery, rate limits, and any credential-free audit. The external mail provider and recipient still receive the message.
常见问题
发送被接受,是否就代表对方已收到?
不一定。技能区分了已提交的请求和最终投递。
我能添加自己的传输方式吗?
可以。技能涵盖用于自定义传输的渠道类型扩展。
它会保存发送记录吗?
会。它保存通知、投递和尝试的历史记录。
详情
作者的原始描述
Use when agents need to integrate, configure, send, inspect, or diagnose NocoBase notifications based on app-plugin-notification.
repo: nocobase/nocobase
热度
- GitHub 星标
- 25k
- 排名
- #10103
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
nocobase-app-development
25k帮你的智能体为完整的 NocoBase 3 业务应用构建页面、路由、数据、权限和测试。
shadcn
25k帮你的智能体在 Web 项目中查找、添加、修复和美化 shadcn/ui 组件,并使用其官方文档和注册表。
nocobase-app-plugin-development
25k帮你的智能体在现有应用中创建和维护 NocoBase 3 插件,包括服务端、客户端、数据库和注册部分。
nocobase-app-upgrade
25k帮你的智能体把 NocoBase 应用升级到较新的模板版本,引入模板的更改,同时保留你自己的工作。