server-plugins
できること
このスキルは、Agent-Native アプリでサーバープラグインがどう働くか、フレームワークのルートをどこに置くべきかを説明します。サーバーの機能を追加する開発者や、自動で現れるルートの不具合を調べる開発者向けです。
使う場面
- ✓アプリにカスタムのサーバープラグインを追加する必要があるとき。
- ✓通常の API ルートとアクションのどちらにすべきか決めるとき。
- ✓組み込みのフレームワークのルートが予期しない動きをするとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/server-plugins/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このアプリにカスタムのサーバー機能を追加してください。API ルートとアクションのどちらにすべきかも教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
既定のプラグインは自動で読み込まれます。カスタマイズが必要なプラグインだけに専用のファイルを用意します。フレームワークのルートはすべて、共通のパスの接頭辞の下に置かれます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Server Plugins & Framework Routes
Default Plugins (auto-mount)
Five default plugins auto-mount when your app doesn't have a custom version in server/plugins/:
| Plugin | Default behavior | Customize when |
|---|---|---|
agent-chat |
Agent chat endpoints | Custom mentionProviders or systemPrompt |
auth |
Auth middleware | Custom publicPaths or Google OAuth config |
core-routes |
/_agent-native/poll, /_agent-native/ping, etc |
Custom envKeys or sseRoute |
resources |
Resource CRUD | Rarely |
terminal |
Terminal emulator | Rarely |
Only create plugin files for plugins you need to customize. Let defaults auto-mount.
Framework Route Namespace: /_agent-native/
All framework-level routes live under /_agent-native/ to avoid collisions with template-specific /api/* routes.
Hard rule
- ALL framework routes go under
/_agent-native/. - Templates own
/api/*only for route-only domain concerns such as uploads, streaming, webhooks, OAuth callbacks, or non-JSON protocols. - Never put framework routes under
/api/. - Never put template routes under
/_agent-native/— that namespace is reserved. - Never create
/api/*routes that only wrap, proxy, or re-export actions. Use the existing/_agent-native/actions/:nameendpoint or the React action hooks.
Auto-mounted framework routes
| Route | Purpose |
|---|---|
GET /_agent-native/poll |
Polling endpoint for DB change detection |
GET /_agent-native/events |
SSE endpoint for real-time sync |
GET /_agent-native/ping |
Health check |
GET/PUT/DELETE /_agent-native/application-state/:key |
Application state CRUD |
GET/PUT/DELETE /_agent-native/application-state/compose/:id |
Compose draft CRUD |
POST /_agent-native/agent-chat |
Agent chat SSE endpoint |
GET /_agent-native/agent-chat/mentions |
Mention search for @-tagging |
GET /_agent-native/env-status |
Env key configuration status |
POST /_agent-native/env-vars |
Save env vars |
/_agent-native/auth/* |
Authentication (login, session, logout) |
/_agent-native/google/* |
Google OAuth (callback, auth-url, etc.) |
/_agent-native/resources/* |
Resource CRUD |
/_agent-native/actions/:name |
Auto-mounted action endpoints |
/_agent-native/available-clis |
Available CLI tools |
/_agent-native/agent-terminal-info |
Terminal connection info |
/_agent-native/collab/* |
Real-time collaboration (see real-time-collab) |
/_agent-native/a2a |
A2A JSON-RPC endpoint (see a2a-protocol) |
Actions-First Approach
For standard CRUD and data operations, use defineAction in actions/ — the framework auto-mounts them as HTTP endpoints at /_agent-native/actions/:name. Only create custom /api/* routes for things actions can't do:
- File uploads with multipart form data
- Streaming responses
- Webhooks from external services
- OAuth callbacks
Before adding a route, inspect the existing action files. Reuse the action if it already encodes the business rule, or add a new action if the operation should be available to both the agent and the UI. A route whose implementation mostly calls an action is usually the wrong abst
よくある質問
プラグインごとにファイルが必要ですか?
いいえ。スキルは、既定の設定を読み込ませたままにし、必要なものだけをカスタマイズするよう述べています。
フレームワークのルートはどのパスを使いますか?
アプリのルートと衝突しないよう、/_agent-native/ という接頭辞を使います。
/api/ のルートはいつ使うべきですか?
アップロードやストリーミングのような、ルートだけに関わる処理の場合です。
詳細
作者による元の説明
Framework server plugins and the `/_agent-native/` route namespace. Use when adding a custom server plugin, deciding whether to create an `/api/` route vs an action, or debugging auto-mounted framework routes.
repo: BuilderIO/agent-native
人気
- GitHubのスター
- 7.6k
- ランキング
- #13182
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。