跳到正文
Skillpedia
API 与服务器(后端)25k · #10103

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification/skills/nocobase-app-plugin-notification/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

  1. Read Notification concepts for package ownership and delivery status semantics.
  2. For plugin registration, configuration, migrations, or log APIs, read Integration and configuration. Configure a Channel name mapped to one flat configuration with type (provider remains a compatibility alias).
  3. 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.
  4. For failures and retries, read Delivery diagnostics. Preserve Notification, Delivery, Attempt, and retry-audit history; distinguish accepted submission from final delivery.
  5. For custom transports, read Channel type extensions. Register classes implementing ChannelInstance with registerChannelType through notificationExtensionRegistryToken and retain the queue/lease/retry lifecycle. Use deprecated registerChannel() / registerProvider() only when maintaining legacy compatibility code or its tests; official implementations and examples use the class API.
  6. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能