server-plugins
What it does
This skill explains how server plugins work in an agent-native app and where framework routes should live. It is for developers adding server features or debugging routes that appear automatically.
When to use it
- ✓When you need to add a custom server plugin to an app.
- ✓When you must decide between a plain API route and an action.
- ✓When a built-in framework route behaves in an unexpected way.
Skill link
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/server-plugins/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add a custom server feature to this app, and tell me whether it should be an API route or an action.”
5 new skills a week. 1 minute to read.
How it works
Default plugins load automatically. Only plugins that need customization get their own file, and all framework routes live under a shared path prefix.
Technical content (original SKILL.md)
Original text by the author, straight from 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
FAQ
Do I need a file for every plugin?
No. The skill says to let the defaults load and customize only what you need.
What path do framework routes use?
They use the prefix /_agent-native/ to avoid clashing with app routes.
When should I use an /api/ route?
For route-only concerns such as uploads or streaming.
Details
Original description by the author
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
Popularity
- GitHub stars
- 7.6k
- Ranking position
- #13182
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
design-exploration
7.6kHelps your agent explore several UI design directions side by side, let you pick one, and then refine the chosen design.
visual-edit
7.6kHelps your agent open a running local app in a visual editor so you can review and edit its real screens together.
turn-into-app
7.6kTurns a workflow, spreadsheet or project into a polished visual app, with populated screens and an agent working behind the controls.
visual-plan
7.6kTurns a plain text plan into an interactive visual plan with diagrams, file maps, code snippets and open questions.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.