@frontmcp/skills 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/catalog/frontmcp-config/SKILL.md +5 -5
  2. package/catalog/frontmcp-config/references/configure-deployment-targets.md +84 -1
  3. package/catalog/frontmcp-config/references/configure-http.md +57 -2
  4. package/catalog/frontmcp-config/references/configure-session.md +14 -7
  5. package/catalog/frontmcp-deployment/SKILL.md +3 -3
  6. package/catalog/frontmcp-deployment/references/build-for-mcpb.md +1 -1
  7. package/catalog/frontmcp-deployment/references/mcp-client-integration.md +107 -0
  8. package/catalog/frontmcp-development/SKILL.md +7 -7
  9. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +14 -0
  10. package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +85 -9
  11. package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +30 -11
  12. package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +62 -14
  13. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +30 -12
  14. package/catalog/frontmcp-development/references/create-job.md +45 -11
  15. package/catalog/frontmcp-development/references/create-provider.md +80 -8
  16. package/catalog/frontmcp-development/references/create-skill-with-tools.md +31 -0
  17. package/catalog/frontmcp-development/references/create-skill.md +45 -0
  18. package/catalog/frontmcp-development/references/create-tool.md +124 -46
  19. package/catalog/frontmcp-guides/SKILL.md +7 -7
  20. package/catalog/frontmcp-observability/SKILL.md +15 -7
  21. package/catalog/frontmcp-observability/examples/metrics-endpoint/enable-metrics-endpoint.md +77 -0
  22. package/catalog/frontmcp-observability/references/metrics-endpoint.md +161 -0
  23. package/catalog/frontmcp-setup/SKILL.md +11 -11
  24. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +19 -1
  25. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +260 -19
  26. package/catalog/frontmcp-setup/references/setup-project.md +29 -0
  27. package/catalog/frontmcp-setup/references/setup-sqlite.md +68 -9
  28. package/catalog/frontmcp-testing/SKILL.md +17 -17
  29. package/catalog/skills-manifest.json +32 -6
  30. package/package.json +1 -1
@@ -14,7 +14,7 @@ metadata:
14
14
 
15
15
  # FrontMCP Configuration Router
16
16
 
17
- Entry point for configuring FrontMCP servers. This skill helps you find the right configuration skill based on what aspect of your server you need to set up.
17
+ Entry point for configuring FrontMCP servers. This skill helps you find the right configuration reference (under `references/`) based on what aspect of your server you need to set up.
18
18
 
19
19
  ## When to Use This Skill
20
20
 
@@ -26,7 +26,7 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
26
26
 
27
27
  ### Recommended
28
28
 
29
- - Looking up which skill covers a specific config option (CORS, rate limits, session TTL, etc.)
29
+ - Looking up which reference covers a specific config option (CORS, rate limits, session TTL, etc.)
30
30
  - Understanding how configuration layers work (server-level vs app-level vs tool-level)
31
31
  - Reviewing the full configuration surface area before production deployment
32
32
 
@@ -36,7 +36,7 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
36
36
  - You need to build components, not configure the server (see `frontmcp-development`)
37
37
  - You need to deploy, not configure (see `frontmcp-deployment`)
38
38
 
39
- > **Decision:** Use this skill when you need to figure out WHAT to configure. Use the specific skill when you already know.
39
+ > **Decision:** Use this skill when you need to figure out WHAT to configure. Open the matching reference under `references/` directly when you already know.
40
40
 
41
41
  ## Prerequisites
42
42
 
@@ -46,13 +46,13 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
46
46
  ## Steps
47
47
 
48
48
  1. Identify the configuration area you need using the Scenario Routing Table below
49
- 2. Navigate to the specific configuration skill (e.g., `configure-transport`, `configure-auth`) for detailed instructions
49
+ 2. Navigate to the specific configuration reference (e.g., `references/configure-transport.md`, `references/configure-auth.md`) for detailed instructions
50
50
  3. Apply the configuration in your `@FrontMcp` or `@App` decorator
51
51
  4. Verify using the Verification Checklist at the end of this skill
52
52
 
53
53
  ## Scenario Routing Table
54
54
 
55
- | Scenario | Skill | Description |
55
+ | Scenario | Reference | Description |
56
56
  | -------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------- |
57
57
  | Choose between SSE, Streamable HTTP, or stdio | `configure-transport` | Transport protocol selection with distributed session options |
58
58
  | Set up CORS, port, base path, or request limits | `configure-http` | HTTP server options for Streamable HTTP and SSE transports |
@@ -157,14 +157,97 @@ frontmcp build --target vercel
157
157
  | `takeoverGracePeriodMs` | number | 5000 | Grace period before takeover |
158
158
  | `redisKeyPrefix` | string | `mcp:ha:` | Redis key prefix |
159
159
 
160
+ ### Project-Defined CLI Commands (`cli.commands`)
161
+
162
+ Register project-specific verbs that ship alongside the built-in
163
+ `frontmcp` commands. Each verb spawns a runner module (TS or JS) as a
164
+ child process — the project's own code never runs in the CLI process.
165
+
166
+ ```typescript
167
+ export default defineConfig({
168
+ name: 'my-server',
169
+ deployments: [{ target: 'node' }],
170
+ cli: {
171
+ commands: {
172
+ deploy: {
173
+ entry: './scripts/deploy.ts',
174
+ description: 'Push the current build to staging',
175
+ arguments: [{ name: 'env', required: true }],
176
+ options: [{ flags: '-n, --dry-run' }, { flags: '-c, --concurrency <num>', default: 4 }],
177
+ },
178
+ 'db-migrate': { entry: './scripts/migrate.ts' },
179
+ },
180
+ },
181
+ });
182
+ ```
183
+
184
+ | Field | Type | Description |
185
+ | ------------- | -------------------------- | --------------------------------------------------- |
186
+ | `entry` | string | Path to runner (TS/JS), relative to project root |
187
+ | `description` | string | One-line description (shown in `--help`) |
188
+ | `arguments` | `ProjectCommandArgument[]` | Positional args (`{ name, required?, variadic? }`) |
189
+ | `options` | `ProjectCommandOption[]` | Named options (`{ flags, description?, default? }`) |
190
+ | `hidden` | boolean | Hide from `--help` (verb still invokable) |
191
+
192
+ Verb names must match `/^[a-zA-Z][a-zA-Z0-9:_-]*$/` and may not collide
193
+ with a built-in (`dev`, `build`, `test`, `start`, `skills`, etc.). Use a
194
+ namespaced prefix to avoid collisions: `project:init`, `db-migrate`.
195
+
196
+ Runner selection:
197
+
198
+ - `.ts` / `.tsx` / `.mts` / `.cts` → `node --import tsx <entry>`
199
+ - `.js` / `.mjs` / `.cjs` → `node <entry>`
200
+
201
+ The runner gets the parsed positionals as argv plus a
202
+ `FRONTMCP_PROJECT_COMMAND` env var holding a JSON payload of
203
+ `{ verb, positionals, options, cwd }`.
204
+
205
+ List every registered verb (built-in + project) with:
206
+
207
+ ```bash
208
+ frontmcp --list-commands
209
+ ```
210
+
160
211
  ## File Resolution Order
161
212
 
213
+ Per-invocation precedence (issue #400):
214
+
215
+ 1. Explicit `--config <path>` flag.
216
+ 2. `FRONTMCP_CONFIG` env var.
217
+ 3. Upward walk from `cwd` to the nearest ancestor containing a `frontmcp.config.*` (caps at 10 levels — monorepo nested apps work without `cd <repo-root>`).
218
+ 4. Fallback: `package.json` (derives name, default node target).
219
+
220
+ Within a directory:
221
+
162
222
  1. `frontmcp.config.ts`
163
223
  2. `frontmcp.config.js`
164
224
  3. `frontmcp.config.json`
165
225
  4. `frontmcp.config.mjs`
166
226
  5. `frontmcp.config.cjs`
167
- 6. Fallback: `package.json` (derives name, default node target)
227
+
228
+ ## Override precedence (issue #400)
229
+
230
+ For every CLI option that's also expressible in the config:
231
+
232
+ ```
233
+ explicit CLI flag > FRONTMCP_<NAME> env var > frontmcp.config field > built-in default
234
+ ```
235
+
236
+ ## Per-command consumption (issue #400)
237
+
238
+ The config is consumed by every `frontmcp` command, not just `build`:
239
+
240
+ | Command | Config fields consumed |
241
+ | --------------------------------- | --------------------------------------------------------------------------------------------------- |
242
+ | `build` | `name`, `version`, `entry`, `deployments`, `build`, `nodeVersion` |
243
+ | `dev` | `entry`, `transport.http.port`, `env.shared` ⊕ `env.dev` |
244
+ | `test` | `test.timeoutMs` / `test.runInBand` / `test.coverage` / `test.testMatch`, `env.shared` ⊕ `env.test` |
245
+ | `inspector` | `transport.default`, `transport.http.port`, `transport.stdio` |
246
+ | `pm start` / `socket` / `service` | `name`, `entry`, `transport.http.port`, `transport.http.socketPath`, `env.shared` ⊕ `env.ship` |
247
+ | `skills install` / `export` | `skills.provider`, `skills.bundle`, `skills.install`, `skills.exportTarget` |
248
+ | `eject-mcp-config <client>` | `clients.<client>`, `name`, `transport`, `env.ship` |
249
+
250
+ See `transport`, `env`, `clients`, `test`, `skills` field reference in [docs/frontmcp/deployment/frontmcp-config](https://docs.agentfront.dev/frontmcp/deployment/frontmcp-config).
168
251
 
169
252
  ## JSON Schema for IDE Support
170
253
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: configure-http
3
- description: Configure HTTP server port, CORS policy, unix sockets, and entry path prefix
3
+ description: Configure HTTP server port, CORS policy, unix sockets, entry path prefix, and request body limits
4
4
  ---
5
5
 
6
6
  # Configuring HTTP Options
7
7
 
8
- Configure the HTTP server — port, CORS policy, unix sockets, and entry path prefix.
8
+ Configure the HTTP server — port, CORS policy, unix sockets, entry path prefix, and request body limits.
9
9
 
10
10
  ## When to Use This Skill
11
11
 
@@ -14,12 +14,16 @@ Configure the HTTP server — port, CORS policy, unix sockets, and entry path pr
14
14
  - Changing the default HTTP port or binding to a specific network interface
15
15
  - Enabling or restricting CORS for a frontend application that calls the MCP server
16
16
  - Binding to a unix socket for local daemon or process-manager integrations
17
+ - Raising or tightening the request body limit (default `'4mb'`) for tools that
18
+ accept base64-encoded blobs (PDFs, DOCXes, large HTML payloads)
17
19
 
18
20
  ### Recommended
19
21
 
20
22
  - Mounting the MCP server under a URL prefix behind a reverse proxy
21
23
  - Setting a dynamic port from an environment variable for container deployments
22
24
  - Fine-tuning CORS preflight caching for performance-sensitive frontends
25
+ - Tightening `bodyLimit` on public-facing deployments to bound per-request
26
+ memory
23
27
 
24
28
  ### Skip When
25
29
 
@@ -45,6 +49,8 @@ Configure the HTTP server — port, CORS policy, unix sockets, and entry path pr
45
49
  credentials: true,
46
50
  maxAge: 86400,
47
51
  },
52
+ bodyLimit: '4mb', // default: '4mb' — body-parser-compatible string or bytes (number)
53
+ urlencodedLimit: undefined, // default: falls back to bodyLimit
48
54
  },
49
55
  })
50
56
  class Server {}
@@ -127,6 +133,54 @@ http: {
127
133
  | `credentials` | `boolean` | `false` | Allow cookies/auth headers |
128
134
  | `maxAge` | `number` | — | Preflight cache duration (seconds) |
129
135
 
136
+ ## Request Body Limits
137
+
138
+ FrontMCP's Express host applies a default body limit of `'4mb'` to both
139
+ `express.json()` and `express.urlencoded()`. This lifts body-parser's silent
140
+ 100KB default, which previously rejected base64-encoded blobs (PDFs, DOCXes,
141
+ large HTML inputs) with HTTP 413 before they reached MCP tool handlers
142
+ (issue #410).
143
+
144
+ ```typescript
145
+ http: {
146
+ bodyLimit: '500kb', // tighten for public-facing deployments
147
+ urlencodedLimit: '100kb', // optional — falls back to bodyLimit when omitted
148
+ }
149
+ ```
150
+
151
+ | Option | Type | Default | Notes |
152
+ | ----------------- | ------------------ | ------------------------- | ---------------------------------------------------------------------- |
153
+ | `bodyLimit` | `number \| string` | `'4mb'` | Bytes (number) or body-parser string (`'4mb'`, `'500kb'`, `'2gb'`, …). |
154
+ | `urlencodedLimit` | `number \| string` | falls back to `bodyLimit` | Independent override for `application/x-www-form-urlencoded` bodies. |
155
+
156
+ Requests exceeding the configured limit receive a structured JSON-RPC 413
157
+ response — never an Express HTML error page:
158
+
159
+ ```json
160
+ {
161
+ "jsonrpc": "2.0",
162
+ "id": null,
163
+ "error": {
164
+ "code": -32600,
165
+ "message": "Payload Too Large",
166
+ "data": { "limit": 102400, "length": 204800 }
167
+ }
168
+ }
169
+ ```
170
+
171
+ > **Security trade-off.** Body-parser buffers the full request body in memory
172
+ > before parsing, so raising `bodyLimit` scales per-request memory with
173
+ > concurrency. Deployments exposed to untrusted networks should set an
174
+ > explicit lower bound sized for the largest legitimate payload. The
175
+ > 100KB → 4MB default change is a liberalization (every request that
176
+ > succeeded before still succeeds), but the implicit DoS guard is gone
177
+ > unless you set the option yourself.
178
+
179
+ Custom `hostFactory` users build their own Express app and are **not
180
+ affected** by `bodyLimit`/`urlencodedLimit` — those options are consumed only
181
+ by the built-in `ExpressHostAdapter`. Custom-host deployments must configure
182
+ their own body limits.
183
+
130
184
  ## Entry Path Prefix
131
185
 
132
186
  Mount the MCP server under a URL prefix:
@@ -207,6 +261,7 @@ curl --unix-socket /tmp/my-mcp-server.sock http://localhost/
207
261
  | Unix socket file not created | Missing write permissions on the target directory or stale socket file from a previous run | Check directory permissions and remove the stale `.sock` file before restarting |
208
262
  | Routes return 404 after setting `entryPath` | Client is still requesting the root path without the prefix | Update client base URL to include the entry path (e.g., `http://localhost:3000/api/mcp`) |
209
263
  | Server binds but external clients cannot connect | Server bound to `localhost` or `127.0.0.1` inside a container | Set `host: '0.0.0.0'` or use Docker port mapping to expose the container port |
264
+ | `413 Payload Too Large` with JSON-RPC envelope | Request body exceeded `bodyLimit` (default `'4mb'`) | Raise `http.bodyLimit` to fit the payload, or move large blobs to a separate upload endpoint |
210
265
 
211
266
  ## Examples
212
267
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: configure-session
3
- description: Set up session storage with Redis or Vercel KV for persistent user state across requests
3
+ description: Set up session storage with Redis, Vercel KV, or SQLite for persistent user state across requests
4
4
  ---
5
5
 
6
6
  # Configure Session Management
@@ -11,7 +11,7 @@ This skill covers setting up session storage in FrontMCP. Sessions track authent
11
11
 
12
12
  ### Must Use
13
13
 
14
- - Deploying to production where sessions must survive process restarts (Redis or Vercel KV required)
14
+ - Deploying to production where sessions must survive process restarts (Redis, Vercel KV, or SQLite required)
15
15
  - Running multiple server instances behind a load balancer that need shared session state
16
16
  - Using Streamable HTTP transport where sessions must persist across reconnects
17
17
 
@@ -31,14 +31,21 @@ This skill covers setting up session storage in FrontMCP. Sessions track authent
31
31
 
32
32
  ## Storage Providers
33
33
 
34
- | Provider | Use Case | Persistence | Package Required |
35
- | ----------- | ------------------- | ----------- | ---------------- |
36
- | `memory` | Development/testing | None | None (default) |
37
- | `redis` | Node.js production | Yes | `ioredis` |
38
- | `vercel-kv` | Vercel deployments | Yes | `@vercel/kv` |
34
+ | Provider | Use Case | Persistence | Package Required |
35
+ | ----------- | ------------------------------------------ | ----------- | --------------------------------------------- |
36
+ | `memory` | Development/testing | None | None (default) |
37
+ | `redis` | Node.js production | Yes | `ioredis` |
38
+ | `vercel-kv` | Vercel deployments | Yes | `@vercel/kv` |
39
+ | `sqlite` | Single-node persistent (CLI / Docker / VM) | Yes | `@frontmcp/storage-sqlite` + `better-sqlite3` |
39
40
 
40
41
  Never use the memory store in production. Sessions are lost on process restart, which breaks authentication for all connected clients.
41
42
 
43
+ SQLite is set via the top-level `sqlite` block (not via `redis: { provider: ... }`).
44
+ See the [`setup-sqlite`](../../frontmcp-setup/references/setup-sqlite.md) skill
45
+ for the full walkthrough. The same top-level `sqlite` block is auto-threaded
46
+ into the task store and elicitation store unless they are individually
47
+ configured to use a different backend (issue #401).
48
+
42
49
  ## Redis (Production)
43
50
 
44
51
  Configure Redis session storage via the `@FrontMcp` decorator:
@@ -36,7 +36,7 @@ Entry point for deploying and building FrontMCP servers. This skill helps you ch
36
36
  - You need to configure server settings, not deploy (see `frontmcp-config`)
37
37
  - You need to build components, not ship them (see `frontmcp-development`)
38
38
 
39
- > **Decision:** Use this skill when you need to figure out WHERE to deploy. Use the specific skill when you already know.
39
+ > **Decision:** Use this skill when you need to figure out WHERE to deploy. Open the matching reference under `references/` directly when you already know.
40
40
 
41
41
  ## Prerequisites
42
42
 
@@ -48,12 +48,12 @@ Entry point for deploying and building FrontMCP servers. This skill helps you ch
48
48
 
49
49
  1. Review the Scenario Routing Table and Target Comparison below to choose a deployment target
50
50
  2. Run `frontmcp build --target <target>` to produce the build output
51
- 3. Follow the specific deployment skill (e.g., `deploy-to-node`, `deploy-to-vercel`) for platform instructions
51
+ 3. Follow the specific deployment reference (e.g., `references/deploy-to-node.md`, `references/deploy-to-vercel.md`) for platform instructions
52
52
  4. Verify with the Post-Deployment checklist at the end of this skill
53
53
 
54
54
  ## Scenario Routing Table
55
55
 
56
- | Scenario | Skill | Description |
56
+ | Scenario | Reference | Description |
57
57
  | ------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------- |
58
58
  | Long-running server on VPS, Docker, or bare metal | `deploy-to-node` | Node.js with stdio or HTTP transport, PM2/Docker for process management |
59
59
  | Serverless with zero config and Vercel KV | `deploy-to-vercel` | Vercel Functions with Streamable HTTP, Vercel KV for storage |
@@ -93,7 +93,7 @@ dist/mcpb/
93
93
  | `author` | deployment.author → parsed `package.json.author` string (`"Name <email> (url)"`) |
94
94
  | `license`, `homepage`, `repository`, `keywords` | deployment override → package.json fallback |
95
95
  | `icon` | deployment.icon → package.json.icon → `icon.png` / `assets/icon.png` in cwd |
96
- | `tools` | Schema extraction (system tools like `execute-job` filtered out) |
96
+ | `tools` | Schema extraction (system tools like `execute_job` filtered out) |
97
97
  | `prompts` | Schema extraction; emitted with `prompts_generated: true` |
98
98
  | `user_config` | Translated from `setup.steps` + deployment.userConfig overrides |
99
99
  | `compatibility.runtimes.node` | deployment.compatibility.runtimes.node → frontmcp.config.nodeVersion → `">=22.0.0"` |
@@ -68,6 +68,37 @@ When building a FrontMCP server with a coding agent (Claude Code, Cursor, Windsu
68
68
  - **Debugging:** Logs visible in terminal, Inspector UI available via `npm run inspect`
69
69
  - **Persistence:** Server stays running across edits, no new process per connection
70
70
 
71
+ ### `frontmcp dev --stdio` bridge (issue #399)
72
+
73
+ If the client must speak stdio (MCPB-installed bundles, certain Claude Code configurations) and you still want the dev hot-reload loop, run the first-party watch-aware stdio bridge — replaces the third-party `mcp-remote` recipe:
74
+
75
+ ```bash
76
+ frontmcp dev --stdio # HTTP loopback under the hood
77
+ frontmcp dev --stdio --serve # stdio-over-pipe (no HTTP listener)
78
+ ```
79
+
80
+ Wire the client at the bridge:
81
+
82
+ ```json
83
+ {
84
+ "mcpServers": {
85
+ "my-server": {
86
+ "command": "npx",
87
+ "args": ["-y", "frontmcp", "dev", "--stdio"]
88
+ }
89
+ }
90
+ }
91
+ ```
92
+
93
+ Bridge guarantees:
94
+
95
+ - Stdout is 100% JSON-RPC frames; diagnostics go to `./.frontmcp/dev.log` (override with `--log-file`).
96
+ - Session id survives reload (pinned via `FRONTMCP_DEV_FORCE_SESSION_ID`).
97
+ - Buffered RPCs during reload drain in FIFO once the child reports ready.
98
+ - Reload deadline + buffer overflow surface structured errors (`dev_server_unreachable` / `dev_buffer_full` / `dev_reload_deadline` — codes -32099 / -32098 / -32097) so the client spinner clears instead of hanging.
99
+
100
+ Flags: `--stdio`, `--serve`, `--log-file <path>`, `--buffer-size <n>` (default 8), `--reload-deadline-ms <ms>` (default 30000), `-p <port>` (HTTP-mode loopback, default 3000).
101
+
71
102
  ## Stdio Transport
72
103
 
73
104
  The most common transport. The MCP client spawns your server as a child process and communicates via stdin/stdout JSON-RPC.
@@ -190,6 +221,82 @@ The `url` hostname is ignored for Unix sockets; only the path (`/mcp`) is used f
190
221
  | VS Code | `.vscode/mcp.json` | Project root |
191
222
  | Windsurf | `mcp_config.json` | `~/.codeium/windsurf/` |
192
223
 
224
+ ## Claude Code plugin install (issue #411)
225
+
226
+ For Claude Code specifically, you can ship the whole server — MCP entry +
227
+ prompts (as slash commands) + `@Skill`s — as a single Claude Code plugin
228
+ folder, registered in one command. This is the recommended path when you
229
+ want users to enable/disable the server from `/plugins` rather than
230
+ hand-edit `.mcp.json`.
231
+
232
+ ### From a project source (dev tool)
233
+
234
+ ```bash
235
+ # At a FrontMCP project root — emits .claude/plugins/<name>/ in cwd
236
+ frontmcp plugin install --claude
237
+
238
+ # Inspect the plan without writing
239
+ frontmcp plugin install --claude --dry-run
240
+
241
+ # Also drop a Codex mcp_servers entry into ~/.codex/config.toml
242
+ frontmcp plugin install --claude --codex
243
+
244
+ # Report install state
245
+ frontmcp plugin status --claude
246
+
247
+ # Remove what install wrote (preserves user-added files)
248
+ frontmcp plugin uninstall --claude
249
+ ```
250
+
251
+ ### From a built bin (end-user)
252
+
253
+ Every CLI built with `frontmcp build --target cli` inherits the same
254
+ behavior under its `install` verb (no new top-level verb):
255
+
256
+ ```bash
257
+ my-bin install -p claude # write .claude/plugins/my-bin/
258
+ my-bin install -p claude --scope user # ~/.claude/plugins/my-bin/
259
+ my-bin install -p claude -p codex # both providers in one call
260
+ my-bin install --status # report state per provider
261
+ my-bin uninstall -p claude # remove only managed files
262
+ ```
263
+
264
+ ### What gets written
265
+
266
+ ```text
267
+ .claude/plugins/<bin>/
268
+ ├── .claude-plugin/plugin.json # name, version, mcpServers, skills, _meta.frontmcp.managedFiles
269
+ ├── commands/<prompt>.md # one per @Prompt the server advertises
270
+ └── skills/<name>/SKILL.md # one per @Skill, with references/examples/scripts/assets subdirs
271
+ ```
272
+
273
+ ### SKILL.md frontmatter synthesis
274
+
275
+ Claude Code's filesystem loader discovers skills via the YAML frontmatter at
276
+ the top of each `SKILL.md` (`name`, `description`, optional `tags`,
277
+ `license`). A `@Skill`-decorated entry typically points
278
+ `instructions.file` at a plain markdown body **without** frontmatter, so the
279
+ install flow composes the frontmatter from the decorator metadata before
280
+ writing the file:
281
+
282
+ - `name` and `description` come from `@Skill({ name, description })`.
283
+ - `tags` and `license` are forwarded when present.
284
+ - The instruction file body is copied verbatim AFTER the synthesized
285
+ frontmatter block.
286
+ - If the instruction file **already starts with `---`**, the existing
287
+ frontmatter is preserved as-is — the author is treated as authoritative.
288
+
289
+ Skill names are validated against the same allowlist as plugin names
290
+ (`^[a-zA-Z0-9][a-zA-Z0-9._-]*$`) before any filesystem write, so a malicious
291
+ `@Skill({ name: '../escape' })` cannot land outside the plugin tree.
292
+
293
+ ### Idempotency
294
+
295
+ Re-runs are idempotent: any file not listed in `_meta.frontmcp.managedFiles`
296
+ (including unknown top-level keys the user added to `plugin.json`, like
297
+ `hooks` or extra `mcpServers`) is preserved. Use `--dry-run` to inspect
298
+ the planned tree before writing.
299
+
193
300
  ## Common Patterns
194
301
 
195
302
  | Pattern | Correct | Incorrect | Why |
@@ -14,7 +14,7 @@ metadata:
14
14
 
15
15
  # FrontMCP Development Router
16
16
 
17
- Entry point for building MCP server components. This skill helps you find the right development skill based on what you want to build. It does not teach implementation details itself — it routes you to the specific skill that does.
17
+ Entry point for building MCP server components. This skill helps you find the right development reference based on what you want to build. It does not teach implementation details itself — it routes you to the specific reference (under `references/`) that does.
18
18
 
19
19
  ## When to Use This Skill
20
20
 
@@ -26,7 +26,7 @@ Entry point for building MCP server components. This skill helps you find the ri
26
26
 
27
27
  ### Recommended
28
28
 
29
- - Looking up the canonical name of a development skill to install or search
29
+ - Looking up the canonical name of a development reference to install or search
30
30
  - Comparing component types to decide which fits your use case
31
31
  - Understanding how tools, resources, prompts, agents, and skills relate to each other
32
32
 
@@ -36,7 +36,7 @@ Entry point for building MCP server components. This skill helps you find the ri
36
36
  - You need to configure server settings, not build components (see `frontmcp-config`)
37
37
  - You need to deploy or build, not develop (see `frontmcp-deployment`)
38
38
 
39
- > **Decision:** Use this skill when you need to figure out WHAT to build. Use the specific skill when you already know.
39
+ > **Decision:** Use this skill when you need to figure out WHAT to build. Open the matching reference under `references/` directly when you already know.
40
40
 
41
41
  ## Prerequisites
42
42
 
@@ -46,16 +46,16 @@ Entry point for building MCP server components. This skill helps you find the ri
46
46
 
47
47
  ## Steps
48
48
 
49
- This is a router skill. The "steps" here are how to choose the right child skill, not how to implement a component.
49
+ This is a router skill. The "steps" here are how to choose the right reference (a markdown file under `references/`), not how to implement a component.
50
50
 
51
51
  1. **Identify the component type** using the Scenario Routing Table below.
52
- 2. **Open the matching skill** (e.g. `create-tool`, `create-resource`) and follow its Steps section.
53
- 3. **Compose**, if needed: most non-trivial features need two or more components (e.g. tool + provider, resource + adapter). Read each child skill independently before wiring them together.
52
+ 2. **Open the matching reference** (e.g. `references/create-tool.md`, `references/create-resource.md`) and follow its Steps section.
53
+ 3. **Compose**, if needed: most non-trivial features need two or more components (e.g. tool + provider, resource + adapter). Read each reference independently before wiring them together.
54
54
  4. **Test before integration** (`frontmcp-testing`) — every component type has a unit-test recipe.
55
55
 
56
56
  ## Scenario Routing Table
57
57
 
58
- | Scenario | Skill | Description |
58
+ | Scenario | Reference | Description |
59
59
  | -------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- |
60
60
  | Expose an executable action that AI clients can call | `create-tool` | Class-based or function-style tools with Zod input/output validation |
61
61
  | Expose read-only data via a URI | `create-resource` | Static resources or URI template resources for dynamic data |
@@ -118,6 +118,20 @@ class MainApp {}
118
118
  - Consuming the provider in a tool via `this.get(DB_TOKEN)` with full type safety
119
119
  - Registering the factory in the `providers` array so tools can resolve it
120
120
 
121
+ ## When to promote this to a folder
122
+
123
+ The flat `src/apps/main/providers/database.provider.ts` layout above is fine while the provider is a single class. The moment you add a `database.provider.spec.ts`, a `connection.ts` helper, or a config-loading module, promote it to its own folder:
124
+
125
+ ```text
126
+ src/apps/main/providers/database/
127
+ ├── index.ts # barrel: re-exports the factory + DatabasePool class
128
+ ├── database.provider.ts # AsyncProvider factory + DatabasePool class
129
+ ├── database.provider.spec.ts # tests
130
+ └── connection.ts # (optional) connection-setup helper
131
+ ```
132
+
133
+ See [`create-provider` → File Layout](../../references/create-provider.md#file-layout) for the full convention.
134
+
121
135
  ## Related
122
136
 
123
137
  - See `create-provider` for configuration providers, HTTP API clients, and cache providers