@frontmcp/skills 0.0.1 → 1.0.0-beta.11

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 (104) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +58 -13
  3. package/catalog/frontmcp-config/SKILL.md +156 -0
  4. package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +5 -0
  5. package/catalog/frontmcp-config/references/configure-auth.md +243 -0
  6. package/catalog/frontmcp-config/references/configure-elicitation.md +183 -0
  7. package/catalog/frontmcp-config/references/configure-http.md +210 -0
  8. package/catalog/frontmcp-config/references/configure-session.md +210 -0
  9. package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +5 -0
  10. package/catalog/frontmcp-config/references/configure-throttle.md +234 -0
  11. package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +5 -0
  12. package/catalog/frontmcp-config/references/configure-transport.md +200 -0
  13. package/catalog/frontmcp-config/references/setup-redis.md +9 -0
  14. package/catalog/frontmcp-config/references/setup-sqlite.md +9 -0
  15. package/catalog/frontmcp-deployment/SKILL.md +152 -0
  16. package/catalog/frontmcp-deployment/references/build-for-browser.md +143 -0
  17. package/catalog/frontmcp-deployment/references/build-for-cli.md +191 -0
  18. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +66 -20
  19. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +218 -0
  20. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +77 -59
  21. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +18 -4
  22. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +69 -36
  23. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +65 -0
  24. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +229 -0
  25. package/catalog/frontmcp-development/SKILL.md +126 -0
  26. package/catalog/frontmcp-development/references/create-adapter.md +170 -0
  27. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +10 -5
  28. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +83 -40
  29. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +62 -15
  30. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +100 -7
  31. package/catalog/frontmcp-development/references/create-plugin.md +506 -0
  32. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +65 -22
  33. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +63 -23
  34. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +148 -26
  35. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +174 -20
  36. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +114 -28
  37. package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +5 -0
  38. package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +5 -0
  39. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +172 -23
  40. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +61 -14
  41. package/catalog/frontmcp-development/references/decorators-guide.md +754 -0
  42. package/catalog/frontmcp-development/references/official-adapters.md +199 -0
  43. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +97 -27
  44. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  45. package/catalog/frontmcp-extensibility/references/vectoriadb.md +289 -0
  46. package/catalog/frontmcp-guides/SKILL.md +420 -0
  47. package/catalog/frontmcp-guides/references/example-knowledge-base.md +641 -0
  48. package/catalog/frontmcp-guides/references/example-task-manager.md +517 -0
  49. package/catalog/frontmcp-guides/references/example-weather-api.md +297 -0
  50. package/catalog/frontmcp-production-readiness/SKILL.md +98 -0
  51. package/catalog/frontmcp-production-readiness/references/common-checklist.md +156 -0
  52. package/catalog/frontmcp-production-readiness/references/production-browser.md +46 -0
  53. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +62 -0
  54. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +61 -0
  55. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +52 -0
  56. package/catalog/frontmcp-production-readiness/references/production-lambda.md +53 -0
  57. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +66 -0
  58. package/catalog/frontmcp-production-readiness/references/production-node-server.md +61 -0
  59. package/catalog/frontmcp-production-readiness/references/production-vercel.md +52 -0
  60. package/catalog/frontmcp-setup/SKILL.md +132 -0
  61. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +280 -0
  62. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +66 -19
  63. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +79 -17
  64. package/catalog/frontmcp-setup/references/project-structure-nx.md +251 -0
  65. package/catalog/frontmcp-setup/references/project-structure-standalone.md +217 -0
  66. package/catalog/frontmcp-setup/references/readme-guide.md +226 -0
  67. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +63 -58
  68. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +60 -82
  69. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +65 -72
  70. package/catalog/frontmcp-testing/SKILL.md +135 -0
  71. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +79 -63
  72. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +5 -0
  73. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +5 -0
  74. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +5 -0
  75. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +5 -0
  76. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +5 -0
  77. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +6 -0
  78. package/catalog/skills-manifest.json +337 -382
  79. package/package.json +2 -2
  80. package/src/index.d.ts +1 -1
  81. package/src/index.js.map +1 -1
  82. package/src/loader.js +0 -1
  83. package/src/loader.js.map +1 -1
  84. package/src/manifest.d.ts +15 -3
  85. package/src/manifest.js +3 -3
  86. package/src/manifest.js.map +1 -1
  87. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  88. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  89. package/catalog/auth/configure-auth/SKILL.md +0 -250
  90. package/catalog/auth/configure-session/SKILL.md +0 -201
  91. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  92. package/catalog/config/configure-http/SKILL.md +0 -167
  93. package/catalog/config/configure-throttle/SKILL.md +0 -189
  94. package/catalog/config/configure-transport/SKILL.md +0 -151
  95. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  96. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  97. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  98. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  99. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  100. package/catalog/development/decorators-guide/SKILL.md +0 -598
  101. package/catalog/plugins/create-plugin/SKILL.md +0 -336
  102. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  103. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  104. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
@@ -0,0 +1,280 @@
1
+ ---
2
+ name: frontmcp-skills-usage
3
+ description: Search, install, and manage FrontMCP skill catalog for AI agents (Claude Code, Codex)
4
+ ---
5
+
6
+ # FrontMCP Skills — Search, Install, and Usage
7
+
8
+ 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).
9
+
10
+ ## When to Use This Skill
11
+
12
+ ### Must Use
13
+
14
+ - Setting up a new FrontMCP project and need to discover which skills to install for your workflow
15
+ - Configuring AI-assisted development (Claude Code or Codex) with FrontMCP skill files for the first time
16
+ - Deciding between static skill installation and dynamic on-demand search for your team
17
+
18
+ ### Recommended
19
+
20
+ - Exploring the FrontMCP skill catalog to find skills for a specific topic (auth, deployment, plugins, etc.)
21
+ - Onboarding a new team member who needs to understand how FrontMCP skills are delivered and consumed
22
+ - Optimizing token usage by switching from fully-static to a hybrid static/dynamic skill strategy
23
+
24
+ ### Skip When
25
+
26
+ - 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`)
27
+ - You are scaffolding a brand-new FrontMCP project from scratch (use `frontmcp-setup` instead)
28
+ - You need to create a custom skill for your own organization (use the `create-skill` reference in `frontmcp-development`)
29
+
30
+ > **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.
31
+
32
+ ## Available Skills
33
+
34
+ The catalog contains 6 router skills, each covering a domain:
35
+
36
+ | Skill Name | Category | Description |
37
+ | ---------------------- | ----------- | ------------------------------------------------------------------------------ |
38
+ | `frontmcp-setup` | setup | Project setup, scaffolding, Nx workspaces, storage backends |
39
+ | `frontmcp-development` | development | Creating tools, resources, prompts, agents, providers, jobs, workflows, skills |
40
+ | `frontmcp-deployment` | deployment | Build and deploy to Node, Vercel, Lambda, Cloudflare, CLI, browser, SDK |
41
+ | `frontmcp-testing` | testing | Testing with Jest and @frontmcp/testing |
42
+ | `frontmcp-config` | config | Transport, HTTP, throttle, elicitation, auth, sessions, storage |
43
+ | `frontmcp-guides` | guides | End-to-end examples and best practices |
44
+
45
+ Each router skill contains a SKILL.md with a routing table and a `references/` directory with detailed reference files.
46
+
47
+ ## Quick Start
48
+
49
+ ```bash
50
+ # List all skills
51
+ frontmcp skills list
52
+
53
+ # List skills by category
54
+ frontmcp skills list --category development
55
+
56
+ # Show full skill content
57
+ frontmcp skills read frontmcp-development
58
+
59
+ # Install a skill for Claude Code
60
+ frontmcp skills install frontmcp-development --provider claude
61
+
62
+ # Install a skill for Codex
63
+ frontmcp skills install frontmcp-setup --provider codex
64
+ ```
65
+
66
+ ## CLI Commands
67
+
68
+ ### `frontmcp skills search <query>`
69
+
70
+ Semantic search through the catalog using weighted text matching (description 3x, tags 2x, name 1x):
71
+
72
+ ```bash
73
+ frontmcp skills search "authentication oauth"
74
+ frontmcp skills search "deploy vercel" --category deployment
75
+ frontmcp skills search "plugin hooks" --tag middleware --limit 5
76
+ ```
77
+
78
+ ### `frontmcp skills list`
79
+
80
+ List all skills, optionally filtered:
81
+
82
+ ```bash
83
+ frontmcp skills list # All skills
84
+ frontmcp skills list --category development # Development skills only
85
+ frontmcp skills list --tag redis # Skills tagged with redis
86
+ frontmcp skills list --bundle recommended # Recommended bundle
87
+ ```
88
+
89
+ ### `frontmcp skills read <name> [reference]`
90
+
91
+ Read a skill's main SKILL.md, a specific reference, or list available references:
92
+
93
+ ```bash
94
+ # Read main skill content
95
+ frontmcp skills read frontmcp-development
96
+
97
+ # List all references for a skill
98
+ frontmcp skills read frontmcp-development --refs
99
+
100
+ # Read a specific reference by name
101
+ frontmcp skills read frontmcp-development create-tool
102
+
103
+ # Read any file using colon syntax (works with non-.md files too)
104
+ frontmcp skills read frontmcp-development:references/create-tool.md
105
+ frontmcp skills read frontmcp-development:scripts/setup.sh
106
+ ```
107
+
108
+ ### `frontmcp skills install <name>`
109
+
110
+ Copy a skill to a provider-specific directory:
111
+
112
+ ```bash
113
+ # Claude Code — installs to .claude/skills/<name>/SKILL.md
114
+ frontmcp skills install frontmcp-development --provider claude
115
+
116
+ # Codex — installs to .codex/skills/<name>/SKILL.md
117
+ frontmcp skills install frontmcp-setup --provider codex
118
+
119
+ # Custom directory
120
+ frontmcp skills install frontmcp-guides --dir ./my-skills
121
+ ```
122
+
123
+ ## Two Approaches: Static vs Dynamic
124
+
125
+ ### Static Installation (Copy to Disk)
126
+
127
+ Install skills once — they live in your project and are always available:
128
+
129
+ ```bash
130
+ # Install for Claude Code
131
+ frontmcp skills install frontmcp-setup --provider claude
132
+ frontmcp skills install frontmcp-development --provider claude
133
+ frontmcp skills install frontmcp-config --provider claude
134
+
135
+ # Install for Codex
136
+ frontmcp skills install frontmcp-development --provider codex
137
+ ```
138
+
139
+ **Directory structure after install:**
140
+
141
+ ```text
142
+ my-project/
143
+ ├── .claude/
144
+ │ └── skills/
145
+ │ ├── frontmcp-setup/
146
+ │ │ ├── SKILL.md
147
+ │ │ └── references/
148
+ │ ├── frontmcp-development/
149
+ │ │ ├── SKILL.md
150
+ │ │ └── references/
151
+ │ └── frontmcp-config/
152
+ │ ├── SKILL.md
153
+ │ └── references/
154
+ ├── .codex/
155
+ │ └── skills/
156
+ │ └── frontmcp-development/
157
+ │ ├── SKILL.md
158
+ │ └── references/
159
+ └── src/
160
+ └── ...
161
+ ```
162
+
163
+ ### Dynamic Search (On-Demand via CLI)
164
+
165
+ Use the CLI to search and show skills on demand — no installation needed:
166
+
167
+ ```bash
168
+ # Search for what you need
169
+ frontmcp skills search "how to create a tool with zod"
170
+
171
+ # Pipe skill content directly into context
172
+ frontmcp skills read frontmcp-development
173
+ ```
174
+
175
+ This works because `frontmcp skills read` outputs the full SKILL.md content to stdout.
176
+
177
+ ## Comparison: Static vs Dynamic
178
+
179
+ | Aspect | Static Install | Dynamic CLI Search |
180
+ | ----------------- | ------------------------------------- | ----------------------------------------------- |
181
+ | **Setup** | `frontmcp skills install <name>` once | No setup — just use `frontmcp skills search` |
182
+ | **Availability** | Always loaded by AI agent | On-demand, requires CLI invocation |
183
+ | **Context usage** | Skills in system prompt (uses tokens) | Only loaded when searched (saves tokens) |
184
+ | **Updates** | Re-install to update | Uses catalog bundled with the installed package |
185
+ | **Offline** | Works offline after install | Needs catalog available |
186
+ | **Best for** | Core skills you use daily | Occasional reference, exploration |
187
+ | **Token cost** | Higher (all installed skills loaded) | Lower (only searched skills loaded) |
188
+
189
+ ### Recommended Approach
190
+
191
+ **Install 2-4 core skills statically** for your most common workflows, and use dynamic search for everything else:
192
+
193
+ ```bash
194
+ # Core skills — install statically
195
+ frontmcp skills install frontmcp-setup --provider claude
196
+ frontmcp skills install frontmcp-development --provider claude
197
+ frontmcp skills install frontmcp-config --provider claude
198
+
199
+ # Everything else — search on demand
200
+ frontmcp skills search "deploy to vercel"
201
+ frontmcp skills search "rate limiting"
202
+ frontmcp skills read frontmcp-deployment
203
+ ```
204
+
205
+ ## Provider Directories
206
+
207
+ | Provider | Install directory | Auto-loaded by |
208
+ | ----------- | -------------------------------- | ------------------------- |
209
+ | Claude Code | `.claude/skills/<name>/SKILL.md` | Claude Code system prompt |
210
+ | Codex | `.codex/skills/<name>/SKILL.md` | Codex agent context |
211
+
212
+ ## Bundle Presets
213
+
214
+ When scaffolding a project, use `--skills` to install a preset bundle:
215
+
216
+ ```bash
217
+ # Recommended bundle (core skills for the deployment target)
218
+ frontmcp create my-app --skills recommended
219
+
220
+ # Minimal bundle (just project setup + create-tool)
221
+ frontmcp create my-app --skills minimal
222
+
223
+ # Full bundle (all skills)
224
+ frontmcp create my-app --skills full
225
+
226
+ # No skills
227
+ frontmcp create my-app --skills none
228
+ ```
229
+
230
+ ## Available Categories
231
+
232
+ ```bash
233
+ frontmcp skills list --category setup # Project setup and scaffolding
234
+ frontmcp skills list --category config # Server configuration (transport, HTTP, throttle, auth)
235
+ frontmcp skills list --category development # Creating tools, resources, prompts, agents, skills
236
+ frontmcp skills list --category deployment # Build and deploy (node, vercel, lambda, cloudflare, cli, browser, sdk)
237
+ frontmcp skills list --category testing # Testing with Jest and @frontmcp/testing
238
+ frontmcp skills list --category guides # End-to-end examples and best practices
239
+ ```
240
+
241
+ ## Common Patterns
242
+
243
+ | Pattern | Correct | Incorrect | Why |
244
+ | --------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
245
+ | 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 |
246
+ | Searching skills | `frontmcp skills search "oauth authentication"` | `frontmcp skills list \| grep oauth` | Search uses weighted text matching (description 3x, tags 2x) for better relevance |
247
+ | 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 |
248
+ | 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 |
249
+ | Filtering by category | `frontmcp skills list --category deployment` | `frontmcp skills search "deployment"` | `--category` uses the manifest taxonomy; search is for free-text queries |
250
+
251
+ ## Verification Checklist
252
+
253
+ ### Configuration
254
+
255
+ - [ ] FrontMCP CLI is installed and available on PATH (`frontmcp --version`)
256
+ - [ ] Target provider directory exists or will be created (`.claude/skills/` or `.codex/skills/`)
257
+ - [ ] Desired skills are listed in `frontmcp skills list` output
258
+ - [ ] Bundle preset matches project needs (`minimal`, `recommended`, or `full`)
259
+
260
+ ### Runtime
261
+
262
+ - [ ] Installed skills appear in the correct provider directory after `frontmcp skills install`
263
+ - [ ] `frontmcp skills read <name>` outputs the full SKILL.md content to stdout
264
+ - [ ] `frontmcp skills search <query>` returns relevant results ranked by relevance
265
+ - [ ] AI agent (Claude Code or Codex) loads installed skills in its system prompt context
266
+
267
+ ## Troubleshooting
268
+
269
+ | Problem | Cause | Solution |
270
+ | ----------------------------------------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
271
+ | `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 |
272
+ | 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` |
273
+ | `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 |
274
+ | 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 |
275
+ | 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 |
276
+
277
+ ## Reference
278
+
279
+ - **Docs:** <https://docs.agentfront.dev/frontmcp/servers/skills>
280
+ - **Related skills:** `frontmcp-setup`, `frontmcp-development`, `frontmcp-config`, `frontmcp-deployment`
@@ -1,34 +1,33 @@
1
1
  ---
2
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
3
+ description: Compose multiple @App classes, ESM packages, and remote MCP servers into a single FrontMCP gateway
10
4
  ---
11
5
 
12
6
  # Multi-App Composition
13
7
 
14
8
  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
9
 
16
- ## When to Use Multi-App
10
+ ## When to Use This Skill
17
11
 
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:
12
+ ### Must Use
19
13
 
20
- ```typescript
21
- @App({ name: 'Calculator', tools: [AddTool, SubtractTool] })
22
- class CalcApp {}
14
+ - Composing multiple `@App` classes with separate domains into a single `@FrontMcp` server
15
+ - Aggregating external MCP servers via `app.remote()` or npm packages via `app.esm()` into a unified gateway
16
+ - Configuring per-app authentication modes (e.g., one app public, another requiring OAuth)
23
17
 
24
- @FrontMcp({
25
- info: { name: 'my-server', version: '1.0.0' },
26
- apps: [CalcApp],
27
- })
28
- export default class Server {}
29
- ```
18
+ ### Recommended
19
+
20
+ - Setting up shared tools, resources, or plugins that span all apps in the server
21
+ - Isolating apps with `standalone: true` or `standalone: 'includeInParent'` for scoped auth or session separation
22
+ - Namespacing tools from multiple apps or remote servers to prevent naming collisions
30
23
 
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.
24
+ ### Skip When
25
+
26
+ - Your server has a single logical domain with one `@App` class (see `project-structure-standalone`)
27
+ - You are scaffolding an Nx monorepo workspace and need generator commands (see `project-structure-nx`)
28
+ - You need to create individual tools, resources, or prompts rather than compose apps (see `create-tool`)
29
+
30
+ > **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
31
 
33
32
  ## Local Apps
34
33
 
@@ -356,3 +355,51 @@ class AdminApp {}
356
355
  })
357
356
  export default class Server {}
358
357
  ```
358
+
359
+ ## Common Patterns
360
+
361
+ | Pattern | Correct | Incorrect | Why |
362
+ | -------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
363
+ | 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 |
364
+ | 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 |
365
+ | 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 |
366
+ | 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 |
367
+ | 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 |
368
+
369
+ ## Verification Checklist
370
+
371
+ ### Configuration
372
+
373
+ - [ ] `@FrontMcp` `apps` array includes all local, ESM, and remote apps
374
+ - [ ] Each `@App` has a unique `id` (or unique `name` if `id` is omitted)
375
+ - [ ] `namespace` is set on ESM and remote apps to prevent tool name collisions
376
+ - [ ] Server-level `tools`, `plugins`, and `providers` are declared for shared capabilities
377
+
378
+ ### Runtime
379
+
380
+ - [ ] All app tools appear in `tools/list` with correct namespace prefixes
381
+ - [ ] Shared tools appear without a namespace prefix
382
+ - [ ] `standalone: true` apps are isolated and do not appear in parent tool listing
383
+ - [ ] `standalone: 'includeInParent'` apps have isolated scope but visible tools
384
+ - [ ] Per-app auth modes are enforced independently per app
385
+
386
+ ### Remote Apps
387
+
388
+ - [ ] `app.remote()` URL is reachable and returns valid MCP capabilities
389
+ - [ ] `remoteAuth` credentials are correct and not expired
390
+ - [ ] `fallbackToSSE` is enabled if the remote server does not support Streamable HTTP
391
+
392
+ ## Troubleshooting
393
+
394
+ | Problem | Cause | Solution |
395
+ | ---------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
396
+ | 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 |
397
+ | Remote app tools not appearing | Remote server is unreachable or returns empty capabilities | Verify the URL, check `transportOptions.timeout`, and ensure `remoteAuth` is correct |
398
+ | 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 |
399
+ | `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 |
400
+ | 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 |
401
+
402
+ ## Reference
403
+
404
+ - [Multi-App Composition Documentation](https://docs.agentfront.dev/frontmcp/features/multi-app-composition)
405
+ - Related skills: `project-structure-standalone`, `project-structure-nx`, `configure-auth`, `create-tool`
@@ -1,21 +1,33 @@
1
1
  ---
2
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
3
+ description: Scaffold, build, test, and deploy FrontMCP projects using the @frontmcp/nx plugin in a monorepo
10
4
  ---
11
5
 
12
6
  # Nx Monorepo Workflow for FrontMCP
13
7
 
14
8
  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
9
 
16
- ## When to Use Nx
10
+ ## When to Use This Skill
17
11
 
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.
12
+ ### Must Use
13
+
14
+ - Your project contains multiple apps or shared libraries in a monorepo structure
15
+ - You need fine-grained build caching and affected-only testing in CI
16
+ - You are scaffolding a new FrontMCP workspace with multiple deployment targets
17
+
18
+ ### Recommended
19
+
20
+ - You want generator-based scaffolding for every FrontMCP primitive (tools, resources, prompts, skills, etc.)
21
+ - You need to visualize and manage complex dependency graphs across projects
22
+ - Your team benefits from parallelized builds and consistent project structure
23
+
24
+ ### Skip When
25
+
26
+ - Your project is a single standalone MCP server with no shared libraries -- use `frontmcp create` instead
27
+ - You are adding FrontMCP to an existing non-Nx build system (Turborepo, Lerna) -- use `setup-project` instead
28
+ - You only need to configure storage or auth without workspace scaffolding -- use `setup-sqlite` or `setup-redis` instead
29
+
30
+ > **Decision:** Use this skill when managing a multi-project FrontMCP monorepo; skip it for single-server projects.
19
31
 
20
32
  ## Step 1 -- Initialize the Workspace
21
33
 
@@ -43,13 +55,13 @@ nx g @frontmcp/nx:workspace my-workspace
43
55
 
44
56
  The workspace generator creates the directory structure (`apps/`, `libs/`, `servers/`) and base configuration. It accepts these options:
45
57
 
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 |
58
+ | Option | Type | Default | Description |
59
+ | ----------------- | --------------------------- | ---------- | -------------------------------- |
60
+ | `name` | `string` | (required) | Workspace name |
61
+ | `packageManager` | `'npm' \| 'yarn' \| 'pnpm'` | `'npm'` | Package manager to use |
62
+ | `skipInstall` | `boolean` | `false` | Skip package installation |
63
+ | `skipGit` | `boolean` | `false` | Skip git initialization |
64
+ | `createSampleApp` | `boolean` | `true` | Create a sample demo application |
53
65
 
54
66
  ## Step 2 -- Generate Apps and Libraries
55
67
 
@@ -252,7 +264,7 @@ nx run-many -t build,test,lint
252
264
 
253
265
  After scaffolding, the workspace follows this directory layout:
254
266
 
255
- ```
267
+ ```text
256
268
  my-project/
257
269
  apps/
258
270
  my-app/
@@ -355,3 +367,53 @@ Complete list of all `@frontmcp/nx` generators from `generators.json`:
355
367
  | `job` | `nx g @frontmcp/nx:job <name> --project=<app>` | Generate a @Job class |
356
368
  | `workflow` | `nx g @frontmcp/nx:workflow <name> --project=<app>` | Generate a @Workflow class |
357
369
  | `auth-provider` | `nx g @frontmcp/nx:auth-provider <name> --project=<app>` | Generate an @AuthProvider class |
370
+
371
+ ## Common Patterns
372
+
373
+ | Pattern | Correct | Incorrect | Why |
374
+ | -------------------------- | ------------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------- |
375
+ | 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 |
376
+ | 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 |
377
+ | 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 |
378
+ | 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 |
379
+ | 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 |
380
+
381
+ ## Verification Checklist
382
+
383
+ ### Workspace Setup
384
+
385
+ - [ ] `@frontmcp/nx` is listed in `devDependencies`
386
+ - [ ] `nx.json` exists at workspace root with valid configuration
387
+ - [ ] `apps/`, `libs/`, and `servers/` directories exist
388
+
389
+ ### Generation
390
+
391
+ - [ ] Generated files are placed in the correct directory (`apps/<app>/src/<type>/`)
392
+ - [ ] Barrel exports (`index.ts`) are updated after each generator run
393
+ - [ ] `.spec.ts` test file is created alongside each generated class
394
+
395
+ ### Build and Test
396
+
397
+ - [ ] `nx build <server>` completes without TypeScript errors or warnings
398
+ - [ ] `nx test <app>` passes with 95%+ coverage
399
+ - [ ] `nx affected -t test` correctly identifies changed projects
400
+
401
+ ### Development Workflow
402
+
403
+ - [ ] `nx serve <server>` or `nx dev <server>` starts the server successfully
404
+ - [ ] `nx graph` renders the project dependency graph in the browser
405
+
406
+ ## Troubleshooting
407
+
408
+ | Problem | Cause | Solution |
409
+ | ---------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
410
+ | `Cannot find module '@frontmcp/nx'` | Plugin not installed | Run `yarn add -D @frontmcp/nx` and ensure it appears in `devDependencies` |
411
+ | 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/` |
412
+ | `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 |
413
+ | 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 |
414
+ | 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` |
415
+
416
+ ## Reference
417
+
418
+ - **Docs:** [Nx Plugin Overview](https://docs.agentfront.dev/frontmcp/nx-plugin/overview)
419
+ - **Related skills:** `setup-project`, `setup-sqlite`, `setup-redis`