@frontmcp/skills 0.0.1 → 1.0.0-beta.10

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 (88) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +58 -13
  3. package/catalog/frontmcp-config/SKILL.md +143 -0
  4. package/catalog/frontmcp-config/references/configure-auth.md +238 -0
  5. package/catalog/frontmcp-config/references/configure-elicitation.md +178 -0
  6. package/catalog/frontmcp-config/references/configure-http.md +205 -0
  7. package/catalog/frontmcp-config/references/configure-session.md +205 -0
  8. package/catalog/frontmcp-config/references/configure-throttle.md +229 -0
  9. package/catalog/frontmcp-config/references/configure-transport.md +195 -0
  10. package/catalog/frontmcp-config/references/setup-redis.md +4 -0
  11. package/catalog/frontmcp-config/references/setup-sqlite.md +4 -0
  12. package/catalog/frontmcp-deployment/SKILL.md +127 -0
  13. package/catalog/frontmcp-deployment/references/build-for-browser.md +138 -0
  14. package/catalog/frontmcp-deployment/references/build-for-cli.md +138 -0
  15. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +65 -24
  16. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +213 -0
  17. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +76 -63
  18. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +13 -4
  19. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +68 -40
  20. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +60 -0
  21. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +224 -0
  22. package/catalog/frontmcp-development/SKILL.md +121 -0
  23. package/catalog/frontmcp-development/references/create-adapter.md +165 -0
  24. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +5 -5
  25. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +82 -44
  26. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +61 -19
  27. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +63 -11
  28. package/catalog/{plugins/create-plugin/SKILL.md → frontmcp-development/references/create-plugin.md} +65 -60
  29. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +62 -26
  30. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +62 -27
  31. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +62 -30
  32. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +69 -24
  33. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +96 -22
  34. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +62 -26
  35. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +60 -18
  36. package/catalog/{development/decorators-guide/SKILL.md → frontmcp-development/references/decorators-guide.md} +123 -34
  37. package/catalog/frontmcp-development/references/official-adapters.md +194 -0
  38. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +96 -31
  39. package/catalog/frontmcp-guides/SKILL.md +420 -0
  40. package/catalog/frontmcp-guides/references/example-knowledge-base.md +636 -0
  41. package/catalog/frontmcp-guides/references/example-task-manager.md +512 -0
  42. package/catalog/frontmcp-guides/references/example-weather-api.md +292 -0
  43. package/catalog/frontmcp-production-readiness/SKILL.md +253 -0
  44. package/catalog/frontmcp-setup/SKILL.md +130 -0
  45. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +265 -0
  46. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +65 -23
  47. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +78 -21
  48. package/catalog/frontmcp-setup/references/project-structure-nx.md +246 -0
  49. package/catalog/frontmcp-setup/references/project-structure-standalone.md +212 -0
  50. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +62 -62
  51. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +59 -86
  52. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +64 -76
  53. package/catalog/frontmcp-testing/SKILL.md +127 -0
  54. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +78 -67
  55. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +1 -0
  56. package/catalog/skills-manifest.json +39 -378
  57. package/package.json +2 -2
  58. package/src/loader.js +0 -1
  59. package/src/loader.js.map +1 -1
  60. package/src/manifest.d.ts +3 -3
  61. package/src/manifest.js +2 -3
  62. package/src/manifest.js.map +1 -1
  63. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  64. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  65. package/catalog/auth/configure-auth/SKILL.md +0 -250
  66. package/catalog/auth/configure-session/SKILL.md +0 -201
  67. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  68. package/catalog/config/configure-http/SKILL.md +0 -167
  69. package/catalog/config/configure-throttle/SKILL.md +0 -189
  70. package/catalog/config/configure-transport/SKILL.md +0 -151
  71. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  72. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  73. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  74. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  75. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  76. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  77. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  78. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
  79. /package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +0 -0
  80. /package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +0 -0
  81. /package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +0 -0
  82. /package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +0 -0
  83. /package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +0 -0
  84. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +0 -0
  85. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +0 -0
  86. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +0 -0
  87. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +0 -0
  88. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +0 -0
@@ -0,0 +1,265 @@
1
+ # FrontMCP Skills — Search, Install, and Usage
2
+
3
+ FrontMCP ships with a catalog of development skills that teach AI agents (Claude Code, Codex) how to build FrontMCP servers. You can deliver these skills **statically** (copy to disk) or **dynamically** (search on demand via CLI).
4
+
5
+ ## When to Use This Skill
6
+
7
+ ### Must Use
8
+
9
+ - Setting up a new FrontMCP project and need to discover which skills to install for your workflow
10
+ - Configuring AI-assisted development (Claude Code or Codex) with FrontMCP skill files for the first time
11
+ - Deciding between static skill installation and dynamic on-demand search for your team
12
+
13
+ ### Recommended
14
+
15
+ - Exploring the FrontMCP skill catalog to find skills for a specific topic (auth, deployment, plugins, etc.)
16
+ - Onboarding a new team member who needs to understand how FrontMCP skills are delivered and consumed
17
+ - Optimizing token usage by switching from fully-static to a hybrid static/dynamic skill strategy
18
+
19
+ ### Skip When
20
+
21
+ - You already know which specific skill you need and want to learn its content (use that skill directly, e.g., `frontmcp-development` or `frontmcp-config`)
22
+ - You are scaffolding a brand-new FrontMCP project from scratch (use `frontmcp-setup` instead)
23
+ - You need to create a custom skill for your own organization (use the `create-skill` reference in `frontmcp-development`)
24
+
25
+ > **Decision:** Use this skill when you need to understand the skills system itself -- how to browse, install, manage, and deliver FrontMCP skills to AI agents.
26
+
27
+ ## Available Skills
28
+
29
+ The catalog contains 6 router skills, each covering a domain:
30
+
31
+ | Skill Name | Category | Description |
32
+ | ---------------------- | ----------- | ------------------------------------------------------------------------------ |
33
+ | `frontmcp-setup` | setup | Project setup, scaffolding, Nx workspaces, storage backends |
34
+ | `frontmcp-development` | development | Creating tools, resources, prompts, agents, providers, jobs, workflows, skills |
35
+ | `frontmcp-deployment` | deployment | Build and deploy to Node, Vercel, Lambda, Cloudflare, CLI, browser, SDK |
36
+ | `frontmcp-testing` | testing | Testing with Jest and @frontmcp/testing |
37
+ | `frontmcp-config` | config | Transport, HTTP, throttle, elicitation, auth, sessions, storage |
38
+ | `frontmcp-guides` | guides | End-to-end examples and best practices |
39
+
40
+ Each router skill contains a SKILL.md with a routing table and a `references/` directory with detailed reference files.
41
+
42
+ ## Quick Start
43
+
44
+ ```bash
45
+ # List all skills
46
+ frontmcp skills list
47
+
48
+ # List skills by category
49
+ frontmcp skills list --category development
50
+
51
+ # Show full skill content
52
+ frontmcp skills show frontmcp-development
53
+
54
+ # Install a skill for Claude Code
55
+ frontmcp skills install frontmcp-development --provider claude
56
+
57
+ # Install a skill for Codex
58
+ frontmcp skills install frontmcp-setup --provider codex
59
+ ```
60
+
61
+ ## CLI Commands
62
+
63
+ ### `frontmcp skills search <query>`
64
+
65
+ Semantic search through the catalog using weighted text matching (description 3x, tags 2x, name 1x):
66
+
67
+ ```bash
68
+ frontmcp skills search "authentication oauth"
69
+ frontmcp skills search "deploy vercel" --category deployment
70
+ frontmcp skills search "plugin hooks" --tag middleware --limit 5
71
+ ```
72
+
73
+ ### `frontmcp skills list`
74
+
75
+ List all skills, optionally filtered:
76
+
77
+ ```bash
78
+ frontmcp skills list # All skills
79
+ frontmcp skills list --category development # Development skills only
80
+ frontmcp skills list --tag redis # Skills tagged with redis
81
+ frontmcp skills list --bundle recommended # Recommended bundle
82
+ ```
83
+
84
+ ### `frontmcp skills show <name>`
85
+
86
+ Print the full SKILL.md content to stdout — useful for piping to AI context:
87
+
88
+ ```bash
89
+ frontmcp skills show frontmcp-development # Print development skill
90
+ frontmcp skills show frontmcp-config # Print config skill
91
+ ```
92
+
93
+ ### `frontmcp skills install <name>`
94
+
95
+ Copy a skill to a provider-specific directory:
96
+
97
+ ```bash
98
+ # Claude Code — installs to .claude/skills/<name>/SKILL.md
99
+ frontmcp skills install frontmcp-development --provider claude
100
+
101
+ # Codex — installs to .codex/skills/<name>/SKILL.md
102
+ frontmcp skills install frontmcp-setup --provider codex
103
+
104
+ # Custom directory
105
+ frontmcp skills install frontmcp-guides --dir ./my-skills
106
+ ```
107
+
108
+ ## Two Approaches: Static vs Dynamic
109
+
110
+ ### Static Installation (Copy to Disk)
111
+
112
+ Install skills once — they live in your project and are always available:
113
+
114
+ ```bash
115
+ # Install for Claude Code
116
+ frontmcp skills install frontmcp-setup --provider claude
117
+ frontmcp skills install frontmcp-development --provider claude
118
+ frontmcp skills install frontmcp-config --provider claude
119
+
120
+ # Install for Codex
121
+ frontmcp skills install frontmcp-development --provider codex
122
+ ```
123
+
124
+ **Directory structure after install:**
125
+
126
+ ```text
127
+ my-project/
128
+ ├── .claude/
129
+ │ └── skills/
130
+ │ ├── frontmcp-setup/
131
+ │ │ ├── SKILL.md
132
+ │ │ └── references/
133
+ │ ├── frontmcp-development/
134
+ │ │ ├── SKILL.md
135
+ │ │ └── references/
136
+ │ └── frontmcp-config/
137
+ │ ├── SKILL.md
138
+ │ └── references/
139
+ ├── .codex/
140
+ │ └── skills/
141
+ │ └── frontmcp-development/
142
+ │ ├── SKILL.md
143
+ │ └── references/
144
+ └── src/
145
+ └── ...
146
+ ```
147
+
148
+ ### Dynamic Search (On-Demand via CLI)
149
+
150
+ Use the CLI to search and show skills on demand — no installation needed:
151
+
152
+ ```bash
153
+ # Search for what you need
154
+ frontmcp skills search "how to create a tool with zod"
155
+
156
+ # Pipe skill content directly into context
157
+ frontmcp skills show frontmcp-development
158
+ ```
159
+
160
+ This works because `frontmcp skills show` outputs the full SKILL.md content to stdout.
161
+
162
+ ## Comparison: Static vs Dynamic
163
+
164
+ | Aspect | Static Install | Dynamic CLI Search |
165
+ | ----------------- | ------------------------------------- | ----------------------------------------------- |
166
+ | **Setup** | `frontmcp skills install <name>` once | No setup — just use `frontmcp skills search` |
167
+ | **Availability** | Always loaded by AI agent | On-demand, requires CLI invocation |
168
+ | **Context usage** | Skills in system prompt (uses tokens) | Only loaded when searched (saves tokens) |
169
+ | **Updates** | Re-install to update | Uses catalog bundled with the installed package |
170
+ | **Offline** | Works offline after install | Needs catalog available |
171
+ | **Best for** | Core skills you use daily | Occasional reference, exploration |
172
+ | **Token cost** | Higher (all installed skills loaded) | Lower (only searched skills loaded) |
173
+
174
+ ### Recommended Approach
175
+
176
+ **Install 2-4 core skills statically** for your most common workflows, and use dynamic search for everything else:
177
+
178
+ ```bash
179
+ # Core skills — install statically
180
+ frontmcp skills install frontmcp-setup --provider claude
181
+ frontmcp skills install frontmcp-development --provider claude
182
+ frontmcp skills install frontmcp-config --provider claude
183
+
184
+ # Everything else — search on demand
185
+ frontmcp skills search "deploy to vercel"
186
+ frontmcp skills search "rate limiting"
187
+ frontmcp skills show frontmcp-deployment
188
+ ```
189
+
190
+ ## Provider Directories
191
+
192
+ | Provider | Install directory | Auto-loaded by |
193
+ | ----------- | -------------------------------- | ------------------------- |
194
+ | Claude Code | `.claude/skills/<name>/SKILL.md` | Claude Code system prompt |
195
+ | Codex | `.codex/skills/<name>/SKILL.md` | Codex agent context |
196
+
197
+ ## Bundle Presets
198
+
199
+ When scaffolding a project, use `--skills` to install a preset bundle:
200
+
201
+ ```bash
202
+ # Recommended bundle (core skills for the deployment target)
203
+ frontmcp create my-app --skills recommended
204
+
205
+ # Minimal bundle (just project setup + create-tool)
206
+ frontmcp create my-app --skills minimal
207
+
208
+ # Full bundle (all skills)
209
+ frontmcp create my-app --skills full
210
+
211
+ # No skills
212
+ frontmcp create my-app --skills none
213
+ ```
214
+
215
+ ## Available Categories
216
+
217
+ ```bash
218
+ frontmcp skills list --category setup # Project setup and scaffolding
219
+ frontmcp skills list --category config # Server configuration (transport, HTTP, throttle, auth)
220
+ frontmcp skills list --category development # Creating tools, resources, prompts, agents, skills
221
+ frontmcp skills list --category deployment # Build and deploy (node, vercel, lambda, cloudflare, cli, browser, sdk)
222
+ frontmcp skills list --category testing # Testing with Jest and @frontmcp/testing
223
+ frontmcp skills list --category guides # End-to-end examples and best practices
224
+ ```
225
+
226
+ ## Common Patterns
227
+
228
+ | Pattern | Correct | Incorrect | Why |
229
+ | --------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
230
+ | Installing a skill | `frontmcp skills install frontmcp-development --provider claude` | `cp node_modules/.../SKILL.md .claude/skills/` | The CLI handles directory creation, naming, and reference files automatically |
231
+ | Searching skills | `frontmcp skills search "oauth authentication"` | `frontmcp skills list \| grep oauth` | Search uses weighted text matching (description 3x, tags 2x) for better relevance |
232
+ | Choosing delivery mode | Install 2-4 core skills statically; search the rest on demand | Install every skill statically into the project | Static skills consume tokens on every agent invocation; keep the set small |
233
+ | Updating an installed skill | `frontmcp skills install frontmcp-development --provider claude` (re-run) | Manually editing the installed SKILL.md file | Re-installing overwrites with the catalog bundled in the installed CLI version and preserves structure |
234
+ | Filtering by category | `frontmcp skills list --category deployment` | `frontmcp skills search "deployment"` | `--category` uses the manifest taxonomy; search is for free-text queries |
235
+
236
+ ## Verification Checklist
237
+
238
+ ### Configuration
239
+
240
+ - [ ] FrontMCP CLI is installed and available on PATH (`frontmcp --version`)
241
+ - [ ] Target provider directory exists or will be created (`.claude/skills/` or `.codex/skills/`)
242
+ - [ ] Desired skills are listed in `frontmcp skills list` output
243
+ - [ ] Bundle preset matches project needs (`minimal`, `recommended`, or `full`)
244
+
245
+ ### Runtime
246
+
247
+ - [ ] Installed skills appear in the correct provider directory after `frontmcp skills install`
248
+ - [ ] `frontmcp skills show <name>` outputs the full SKILL.md content to stdout
249
+ - [ ] `frontmcp skills search <query>` returns relevant results ranked by relevance
250
+ - [ ] AI agent (Claude Code or Codex) loads installed skills in its system prompt context
251
+
252
+ ## Troubleshooting
253
+
254
+ | Problem | Cause | Solution |
255
+ | ----------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
256
+ | `frontmcp skills search` returns no results | Query terms do not match any skill name, description, or tags | Broaden the query, try synonyms, or use `frontmcp skills list` to browse all available skills |
257
+ | Installed skill not picked up by Claude Code | Skill was installed to wrong directory or provider flag was omitted | Re-install with `--provider claude` and verify the file exists at `.claude/skills/<name>/SKILL.md` |
258
+ | `frontmcp skills install` fails with permission error | Target directory is read-only or owned by a different user | Check directory permissions; use `--dir` flag to specify an alternative writable path |
259
+ | Skill content is outdated after a CLI upgrade | Static installs are point-in-time snapshots of the catalog | Re-run `frontmcp skills install <name> --provider claude` to fetch the latest version |
260
+ | Too many tokens consumed by agent context | All skills installed statically, inflating the system prompt | Uninstall rarely-used skills and switch to dynamic search (`frontmcp skills search`) for occasional needs |
261
+
262
+ ## Reference
263
+
264
+ - **Docs:** <https://docs.agentfront.dev/frontmcp/servers/skills>
265
+ - **Related skills:** `frontmcp-setup`, `frontmcp-development`, `frontmcp-config`, `frontmcp-deployment`
@@ -1,34 +1,28 @@
1
- ---
2
- name: multi-app-composition
3
- description: Compose multiple apps in a single server with shared tools, scoped auth, and external app loading. Use when building multi-app servers, sharing tools between apps, loading ESM or remote apps, or configuring per-app auth.
4
- tags: [multi-app, composition, architecture, scope, shared-tools]
5
- priority: 9
6
- visibility: both
7
- license: Apache-2.0
8
- metadata:
9
- docs: https://docs.agentfront.dev/frontmcp/features/multi-app-composition
10
- ---
11
-
12
1
  # Multi-App Composition
13
2
 
14
3
  Compose multiple `@App` classes into a single `@FrontMcp` server. Each app contributes its own tools, resources, prompts, skills, and plugins. Apps can be local classes, npm packages loaded at runtime, or remote MCP servers proxied through your gateway.
15
4
 
16
- ## When to Use Multi-App
5
+ ## When to Use This Skill
17
6
 
18
- **Single app** is sufficient when your server has one logical domain (e.g., a calculator, a file manager). Define one `@App` class with all tools and resources:
7
+ ### Must Use
19
8
 
20
- ```typescript
21
- @App({ name: 'Calculator', tools: [AddTool, SubtractTool] })
22
- class CalcApp {}
9
+ - Composing multiple `@App` classes with separate domains into a single `@FrontMcp` server
10
+ - Aggregating external MCP servers via `app.remote()` or npm packages via `app.esm()` into a unified gateway
11
+ - Configuring per-app authentication modes (e.g., one app public, another requiring OAuth)
23
12
 
24
- @FrontMcp({
25
- info: { name: 'my-server', version: '1.0.0' },
26
- apps: [CalcApp],
27
- })
28
- export default class Server {}
29
- ```
13
+ ### Recommended
30
14
 
31
- **Multi-app** is needed when you have multiple domains, separate auth requirements, external MCP servers to aggregate, or npm packages to compose at runtime. The `apps` array in `@FrontMcp` accepts any combination of local classes, ESM packages, and remote servers.
15
+ - Setting up shared tools, resources, or plugins that span all apps in the server
16
+ - Isolating apps with `standalone: true` or `standalone: 'includeInParent'` for scoped auth or session separation
17
+ - Namespacing tools from multiple apps or remote servers to prevent naming collisions
18
+
19
+ ### Skip When
20
+
21
+ - Your server has a single logical domain with one `@App` class (see `project-structure-standalone`)
22
+ - You are scaffolding an Nx monorepo workspace and need generator commands (see `project-structure-nx`)
23
+ - You need to create individual tools, resources, or prompts rather than compose apps (see `create-tool`)
24
+
25
+ > **Decision:** Use this skill when you need to compose two or more apps -- local, ESM, or remote -- into a single FrontMCP server with shared or scoped capabilities.
32
26
 
33
27
  ## Local Apps
34
28
 
@@ -356,3 +350,51 @@ class AdminApp {}
356
350
  })
357
351
  export default class Server {}
358
352
  ```
353
+
354
+ ## Common Patterns
355
+
356
+ | Pattern | Correct | Incorrect | Why |
357
+ | -------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
358
+ | Shared tools | `@FrontMcp({ tools: [HealthCheckTool] })` (server-level) | Duplicating the tool class in every `@App` `tools` array | Server-level tools are automatically shared across all apps without duplication |
359
+ | App namespacing | `@App({ id: 'billing', name: 'Billing', tools: [ChargeTool] })` | Omitting `id` when multiple apps have tools with the same name | The `id` field controls the namespace prefix (`billing:charge_card`); without it collisions occur |
360
+ | Remote auth | `remoteAuth: { mode: 'static', credentials: { type: 'bearer', value: token } }` | Passing the token directly as a string to `remoteAuth` | `remoteAuth` expects a structured object with `mode` and `credentials` fields |
361
+ | Standalone isolation | `standalone: true` for fully isolated apps | `standalone: true` when you still want tools visible in the parent server | Use `standalone: 'includeInParent'` to get scope isolation with parent visibility |
362
+ | Per-app auth | `auth: { mode: 'remote', idpProviderUrl: '...' }` on `@App` | Configuring auth only at the `@FrontMcp` level when apps need different modes | Apps without their own `auth` inherit server-level config; set per-app `auth` for mixed modes |
363
+
364
+ ## Verification Checklist
365
+
366
+ ### Configuration
367
+
368
+ - [ ] `@FrontMcp` `apps` array includes all local, ESM, and remote apps
369
+ - [ ] Each `@App` has a unique `id` (or unique `name` if `id` is omitted)
370
+ - [ ] `namespace` is set on ESM and remote apps to prevent tool name collisions
371
+ - [ ] Server-level `tools`, `plugins`, and `providers` are declared for shared capabilities
372
+
373
+ ### Runtime
374
+
375
+ - [ ] All app tools appear in `tools/list` with correct namespace prefixes
376
+ - [ ] Shared tools appear without a namespace prefix
377
+ - [ ] `standalone: true` apps are isolated and do not appear in parent tool listing
378
+ - [ ] `standalone: 'includeInParent'` apps have isolated scope but visible tools
379
+ - [ ] Per-app auth modes are enforced independently per app
380
+
381
+ ### Remote Apps
382
+
383
+ - [ ] `app.remote()` URL is reachable and returns valid MCP capabilities
384
+ - [ ] `remoteAuth` credentials are correct and not expired
385
+ - [ ] `fallbackToSSE` is enabled if the remote server does not support Streamable HTTP
386
+
387
+ ## Troubleshooting
388
+
389
+ | Problem | Cause | Solution |
390
+ | ---------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
391
+ | Tool name collision between apps | Multiple apps register tools with the same name and no `id` | Set unique `id` on each `@App` or use `namespace` on ESM/remote apps |
392
+ | Remote app tools not appearing | Remote server is unreachable or returns empty capabilities | Verify the URL, check `transportOptions.timeout`, and ensure `remoteAuth` is correct |
393
+ | Shared plugin not applied to an app | Plugin declared on `@App` instead of `@FrontMcp` | Move the plugin to the `@FrontMcp` `plugins` array for server-wide application |
394
+ | `standalone: true` app tools not visible | Standalone apps are fully isolated by design | Use `standalone: 'includeInParent'` to expose tools in the parent server while keeping scope isolation |
395
+ | Per-app auth not working | App does not declare its own `auth` field | Add `auth` configuration directly on the `@App` decorator; omitted `auth` inherits server-level defaults |
396
+
397
+ ## Reference
398
+
399
+ - [Multi-App Composition Documentation](https://docs.agentfront.dev/frontmcp/features/multi-app-composition)
400
+ - Related skills: `project-structure-standalone`, `project-structure-nx`, `configure-auth`, `create-tool`
@@ -1,21 +1,28 @@
1
- ---
2
- name: nx-workflow
3
- description: Complete Nx monorepo workflow for FrontMCP with all generators, build, test, and deployment commands. Use when working in an Nx workspace, running generators, or managing monorepo builds.
4
- tags: [nx, monorepo, generators, workflow, scaffold]
5
- priority: 8
6
- visibility: both
7
- license: Apache-2.0
8
- metadata:
9
- docs: https://docs.agentfront.dev/frontmcp/nx-plugin/overview
10
- ---
11
-
12
1
  # Nx Monorepo Workflow for FrontMCP
13
2
 
14
3
  Use the `@frontmcp/nx` plugin to scaffold, build, test, and deploy FrontMCP projects in an Nx monorepo. The plugin provides generators for every FrontMCP primitive (tools, resources, prompts, skills, agents, plugins, adapters, providers, flows, jobs, workflows) and deployment shells for multiple targets.
15
4
 
16
- ## When to Use Nx
5
+ ## When to Use This Skill
6
+
7
+ ### Must Use
8
+
9
+ - Your project contains multiple apps or shared libraries in a monorepo structure
10
+ - You need fine-grained build caching and affected-only testing in CI
11
+ - You are scaffolding a new FrontMCP workspace with multiple deployment targets
12
+
13
+ ### Recommended
14
+
15
+ - You want generator-based scaffolding for every FrontMCP primitive (tools, resources, prompts, skills, etc.)
16
+ - You need to visualize and manage complex dependency graphs across projects
17
+ - Your team benefits from parallelized builds and consistent project structure
18
+
19
+ ### Skip When
17
20
 
18
- Use the Nx workflow when your project has multiple apps, shared libraries, or needs fine-grained build caching and affected-only testing. For simple single-server projects, the standalone `frontmcp create` approach is sufficient.
21
+ - Your project is a single standalone MCP server with no shared libraries -- use `frontmcp create` instead
22
+ - You are adding FrontMCP to an existing non-Nx build system (Turborepo, Lerna) -- use `setup-project` instead
23
+ - You only need to configure storage or auth without workspace scaffolding -- use `setup-sqlite` or `setup-redis` instead
24
+
25
+ > **Decision:** Use this skill when managing a multi-project FrontMCP monorepo; skip it for single-server projects.
19
26
 
20
27
  ## Step 1 -- Initialize the Workspace
21
28
 
@@ -43,13 +50,13 @@ nx g @frontmcp/nx:workspace my-workspace
43
50
 
44
51
  The workspace generator creates the directory structure (`apps/`, `libs/`, `servers/`) and base configuration. It accepts these options:
45
52
 
46
- | Option | Type | Default | Description |
47
- | ----------------- | ------------------------------------ | ---------- | -------------------------------- |
48
- | `name` | `string` | (required) | Workspace name |
49
- | `packageManager` | `'npm' \| 'yarn' \| 'pnpm' \| 'bun'` | `'npm'` | Package manager to use |
50
- | `skipInstall` | `boolean` | `false` | Skip package installation |
51
- | `skipGit` | `boolean` | `false` | Skip git initialization |
52
- | `createSampleApp` | `boolean` | `true` | Create a sample demo application |
53
+ | Option | Type | Default | Description |
54
+ | ----------------- | --------------------------- | ---------- | -------------------------------- |
55
+ | `name` | `string` | (required) | Workspace name |
56
+ | `packageManager` | `'npm' \| 'yarn' \| 'pnpm'` | `'npm'` | Package manager to use |
57
+ | `skipInstall` | `boolean` | `false` | Skip package installation |
58
+ | `skipGit` | `boolean` | `false` | Skip git initialization |
59
+ | `createSampleApp` | `boolean` | `true` | Create a sample demo application |
53
60
 
54
61
  ## Step 2 -- Generate Apps and Libraries
55
62
 
@@ -252,7 +259,7 @@ nx run-many -t build,test,lint
252
259
 
253
260
  After scaffolding, the workspace follows this directory layout:
254
261
 
255
- ```
262
+ ```text
256
263
  my-project/
257
264
  apps/
258
265
  my-app/
@@ -355,3 +362,53 @@ Complete list of all `@frontmcp/nx` generators from `generators.json`:
355
362
  | `job` | `nx g @frontmcp/nx:job <name> --project=<app>` | Generate a @Job class |
356
363
  | `workflow` | `nx g @frontmcp/nx:workflow <name> --project=<app>` | Generate a @Workflow class |
357
364
  | `auth-provider` | `nx g @frontmcp/nx:auth-provider <name> --project=<app>` | Generate an @AuthProvider class |
365
+
366
+ ## Common Patterns
367
+
368
+ | Pattern | Correct | Incorrect | Why |
369
+ | -------------------------- | ------------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------- |
370
+ | Primitive generator target | `nx g @frontmcp/nx:tool my-tool --project=my-app` | `nx g @frontmcp/nx:tool my-tool` | All primitive generators require `--project` to specify which app receives the file |
371
+ | Test file naming | `my-tool.tool.spec.ts` | `my-tool.tool.test.ts` | FrontMCP enforces `.spec.ts` extension; `.test.ts` files are not picked up by Jest config |
372
+ | Affected-only CI testing | `nx affected -t test` | `nx run-many -t test` | `affected` only runs tests for changed projects, saving CI time and compute |
373
+ | Server composition | `nx g @frontmcp/nx:server my-server --apps=app-a,app-b` | Manually importing apps in `main.ts` | The server generator wires app composition and deployment config automatically |
374
+ | Build before deploy | `nx build my-server` (builds server + all deps) | Building each lib and app individually | Nx resolves the dependency graph and builds in the correct order with caching |
375
+
376
+ ## Verification Checklist
377
+
378
+ ### Workspace Setup
379
+
380
+ - [ ] `@frontmcp/nx` is listed in `devDependencies`
381
+ - [ ] `nx.json` exists at workspace root with valid configuration
382
+ - [ ] `apps/`, `libs/`, and `servers/` directories exist
383
+
384
+ ### Generation
385
+
386
+ - [ ] Generated files are placed in the correct directory (`apps/<app>/src/<type>/`)
387
+ - [ ] Barrel exports (`index.ts`) are updated after each generator run
388
+ - [ ] `.spec.ts` test file is created alongside each generated class
389
+
390
+ ### Build and Test
391
+
392
+ - [ ] `nx build <server>` completes without TypeScript errors or warnings
393
+ - [ ] `nx test <app>` passes with 95%+ coverage
394
+ - [ ] `nx affected -t test` correctly identifies changed projects
395
+
396
+ ### Development Workflow
397
+
398
+ - [ ] `nx serve <server>` or `nx dev <server>` starts the server successfully
399
+ - [ ] `nx graph` renders the project dependency graph in the browser
400
+
401
+ ## Troubleshooting
402
+
403
+ | Problem | Cause | Solution |
404
+ | ---------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
405
+ | `Cannot find module '@frontmcp/nx'` | Plugin not installed | Run `yarn add -D @frontmcp/nx` and ensure it appears in `devDependencies` |
406
+ | Generator creates files in the wrong directory | Missing or incorrect `--project` flag | Always pass `--project=<app-name>` for primitive generators; verify the app exists in `apps/` |
407
+ | `nx affected` runs nothing despite changes | Base branch not configured or no dependency link | Check `nx.json` for `defaultBase` setting; verify the changed file belongs to a project in the graph |
408
+ | Build fails with circular dependency error | Library A imports from Library B and vice versa | Use `nx graph` to visualize the cycle; extract shared code into a new library |
409
+ | Cache not working (full rebuild every time) | Missing or misconfigured `cacheableOperations` in `nx.json` | Ensure `build`, `test`, and `lint` are listed in `targetDefaults` with `cache: true` |
410
+
411
+ ## Reference
412
+
413
+ - **Docs:** [Nx Plugin Overview](https://docs.agentfront.dev/frontmcp/nx-plugin/overview)
414
+ - **Related skills:** `setup-project`, `setup-sqlite`, `setup-redis`