nocobase-app-plugin-notification-in-app
できること
NocoBase 3アプリに、アプリ内の通知受信箱を設定します。各利用者は自分の通知だけを見られ、受信箱はライブで更新されます。アプリの中に受信箱を置きたい開発者向けです。
使う場面
- ✓アプリ内の受信箱で通知を見せたいとき。
- ✓通知が保存された後、受信箱をライブで更新する必要があるとき。
- ✓受信箱の項目が欠けている、または別の利用者に表示されているとき。原因を調べる必要があります。
スキルのリンク
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-notification-in-app/skills/nocobase-app-plugin-notification-in-app/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“タスクがユーザーに割り当てられたとき、ライブで更新されるアプリ内の通知受信箱を私のNocoBaseアプリに追加してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
AIはクライアントとサーバーのプラグインの登録を行い、受信箱のコンポーネントをアプリが管理するページに配置し、ライブ更新のトピックを接続します。保存された通知が、正となる記録のままです。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Goal
Integrate and maintain the authenticated, user-isolated in-app inbox while keeping durable HTTP state authoritative and realtime events limited to invalidation.
Ownership and Placement
This Skill is published with @nocobase/app-plugin-notification-in-app. The plugin owns its Server runtime, persistence, APIs, realtime contract, and Client inbox components. The target application owns whether both Client and Server entries are registered.
Scope
- Register the Client and Server plugin entries and the core notification dependency.
- Render the exported inbox components in an application-owned page.
- Consume the public realtime topic and event types from the
/realtimepackage entry. - Verify or diagnose inbox HTTP access, mutations, user isolation, and reconnect refresh.
Non-Goals
- Do not replace durable notifications with transient browser toasts.
- Do not edit inbox tables directly or publish forged realtime events as notification state.
- Do not expect the plugin to contribute an inbox page; the application owns the route.
Input Contract
| Input | Required | Default | Validation | Clarification Question |
|---|---|---|---|---|
action |
yes | verify for existing code; register for a new target |
register/verify/diagnose |
"Should I register, verify, or diagnose the inbox?" |
application |
yes | infer from one unambiguous workspace application | application root with Server and Client configuration | "Which application should register the inbox plugin?" |
apiConfig |
no | the target application's injected ApiClient and RealtimeClient |
authenticated client with the intended baseURL/realtimeURL |
"Should this application use its default or a custom API host?" |
Rules:
- Resolve package versions and enabled plugins from the target application before changing source.
- Register the package's public
/clientand/serverentries; do not import implementation files. - If the target application is ambiguous, stop mutation and ask.
Mandatory Clarification Gate
- Max clarification rounds:
2. - Max questions per round:
3. - Read-only inspection and diagnosis may proceed when the application is unambiguous.
- Missing required input blocks mutation; report the missing contract instead of guessing.
Workflow
- Read Inbox Integration Contract for package requirements, public surfaces, and runtime semantics.
- Inspect the target application's Server plugin list, Client composition, authentication setup,
api.baseURL,api.realtimeURL, and installed package versions. - Register
@nocobase/app-plugin-notificationbefore@nocobase/app-plugin-notification-in-app/serverwhen the application needs thein-appChannel contribution. - Register
@nocobase/app-plugin-notification-in-app/clientin the Client composition root. The plugin contributes no pages: renderNotificationInAppInboxinsideNotificationInAppProviderin a page the application declares among its own routes. - In React components and custom Hooks, use
useApiClient()from@nocobase/app-clientfor inbox reads and mutations, anduseService(realtimeClientToken)for subscriptions. Outside React, resolve the corresponding tokens from the application's services or receive the clients explicitly. Do not reconstruct/apifrom the browser location or Portal base. - Keep HTTP state authoritative. On a validated
inbox.changedevent, realtime connection open, or window focus, trigger a bounded HTTP refetch. - Use the public
@nocobase/app-plugin-notification-in-app/realtimeentry for shared topic or event types; do not import Server internals. - Test allowed and denied users, mutations without a CSRF token, cross-site cookie writes rejected with
INVALID_CSRF_ORIGIN, pagination, custom API hosts, realtime invalidation, and reconnect recovery. - Run lint, typecheck, tests, and build for the plugin and affected application.
Reference Loading Map
| Reference
よくある質問
ライブの更新が本物の通知ですか?
いいえ。ライブのイベントは単なるヒントで、保存された受信箱が正となる記録です。
プラグインが受信箱のページを追加しますか?
いいえ。ルートを管理し、ページを配置するのはアプリケーションです。
一時的なポップアップの通知で受信箱を置き換えられますか?
いいえ。永続的な通知を、一時的なブラウザの通知で置き換えてはいけないと、このスキルは説明しています。
詳細
作者による元の説明
Use when agents need to register, verify, or diagnose the NocoBase durable in-app inbox, its development-only Client page, or realtime refresh behavior.
repo: nocobase/nocobase
人気
- GitHubのスター
- 25k
- ランキング
- #10101
- ライセンス
- —
- 更新日
- 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のアプリを新しいテンプレートのリリースにアップグレードし、テンプレートの変更を取り込みつつ、あなた自身の作業を保てるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。