@frontmcp/skills 0.0.1 → 1.0.0-beta.9

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 (84) hide show
  1. package/catalog/TEMPLATE.md +58 -13
  2. package/catalog/frontmcp-config/SKILL.md +140 -0
  3. package/catalog/frontmcp-config/references/configure-auth.md +238 -0
  4. package/catalog/frontmcp-config/references/configure-elicitation.md +178 -0
  5. package/catalog/frontmcp-config/references/configure-http.md +205 -0
  6. package/catalog/frontmcp-config/references/configure-session.md +205 -0
  7. package/catalog/frontmcp-config/references/configure-throttle.md +229 -0
  8. package/catalog/frontmcp-config/references/configure-transport.md +195 -0
  9. package/catalog/frontmcp-config/references/setup-redis.md +4 -0
  10. package/catalog/frontmcp-config/references/setup-sqlite.md +4 -0
  11. package/catalog/frontmcp-deployment/SKILL.md +124 -0
  12. package/catalog/frontmcp-deployment/references/build-for-browser.md +138 -0
  13. package/catalog/frontmcp-deployment/references/build-for-cli.md +138 -0
  14. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +65 -24
  15. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +213 -0
  16. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +73 -60
  17. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +11 -2
  18. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +65 -37
  19. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +60 -0
  20. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +224 -0
  21. package/catalog/frontmcp-development/SKILL.md +118 -0
  22. package/catalog/frontmcp-development/references/create-adapter.md +165 -0
  23. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +5 -5
  24. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +82 -44
  25. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +61 -19
  26. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +63 -11
  27. package/catalog/{plugins/create-plugin/SKILL.md → frontmcp-development/references/create-plugin.md} +65 -60
  28. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +62 -26
  29. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +62 -27
  30. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +62 -30
  31. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +69 -24
  32. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +71 -20
  33. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +62 -26
  34. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +60 -18
  35. package/catalog/{development/decorators-guide/SKILL.md → frontmcp-development/references/decorators-guide.md} +123 -34
  36. package/catalog/frontmcp-development/references/official-adapters.md +194 -0
  37. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +68 -22
  38. package/catalog/frontmcp-guides/SKILL.md +417 -0
  39. package/catalog/frontmcp-guides/references/example-knowledge-base.md +636 -0
  40. package/catalog/frontmcp-guides/references/example-task-manager.md +512 -0
  41. package/catalog/frontmcp-guides/references/example-weather-api.md +292 -0
  42. package/catalog/frontmcp-setup/SKILL.md +127 -0
  43. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +265 -0
  44. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +65 -23
  45. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +78 -21
  46. package/catalog/frontmcp-setup/references/project-structure-nx.md +246 -0
  47. package/catalog/frontmcp-setup/references/project-structure-standalone.md +212 -0
  48. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +62 -62
  49. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +59 -86
  50. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +64 -76
  51. package/catalog/frontmcp-testing/SKILL.md +121 -0
  52. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +78 -67
  53. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +1 -0
  54. package/catalog/skills-manifest.json +34 -383
  55. package/package.json +1 -1
  56. package/src/manifest.d.ts +3 -3
  57. package/src/manifest.js +1 -3
  58. package/src/manifest.js.map +1 -1
  59. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  60. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  61. package/catalog/auth/configure-auth/SKILL.md +0 -250
  62. package/catalog/auth/configure-session/SKILL.md +0 -201
  63. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  64. package/catalog/config/configure-http/SKILL.md +0 -167
  65. package/catalog/config/configure-throttle/SKILL.md +0 -189
  66. package/catalog/config/configure-transport/SKILL.md +0 -151
  67. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  68. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  69. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  70. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  71. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  72. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  73. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  74. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
  75. /package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +0 -0
  76. /package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +0 -0
  77. /package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +0 -0
  78. /package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +0 -0
  79. /package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +0 -0
  80. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +0 -0
  81. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +0 -0
  82. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +0 -0
  83. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +0 -0
  84. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +0 -0
@@ -0,0 +1,292 @@
1
+ # Example: Weather API (Beginner)
2
+
3
+ > Skills used: setup-project, create-tool, create-resource, setup-testing, deploy-to-node
4
+
5
+ A complete beginner MCP server that exposes a weather lookup tool and a static resource listing supported cities. Demonstrates server setup, Zod input/output schemas, `this.fetch()` for HTTP calls, `this.fail()` for error handling, and both unit and E2E tests.
6
+
7
+ ---
8
+
9
+ ## Project Setup
10
+
11
+ ```jsonc
12
+ // package.json
13
+ {
14
+ "name": "weather-api",
15
+ "version": "1.0.0",
16
+ "private": true,
17
+ "scripts": {
18
+ "build": "frontmcp build",
19
+ "start": "frontmcp start",
20
+ "test": "jest --coverage",
21
+ },
22
+ "dependencies": {
23
+ "@frontmcp/sdk": "^1.0.0",
24
+ "zod": "^3.23.0",
25
+ },
26
+ "devDependencies": {
27
+ "@frontmcp/testing": "^1.0.0",
28
+ "jest": "^29.0.0",
29
+ "ts-jest": "^29.0.0",
30
+ "typescript": "^5.4.0",
31
+ },
32
+ }
33
+ ```
34
+
35
+ ---
36
+
37
+ ## Server Entry Point
38
+
39
+ ```typescript
40
+ // src/main.ts
41
+ import { FrontMcp } from '@frontmcp/sdk';
42
+ import { WeatherApp } from './weather.app';
43
+
44
+ @FrontMcp({
45
+ info: { name: 'weather-api', version: '1.0.0' },
46
+ apps: [WeatherApp],
47
+ })
48
+ export default class WeatherServer {}
49
+ ```
50
+
51
+ ---
52
+
53
+ ## App Registration
54
+
55
+ ```typescript
56
+ // src/weather.app.ts
57
+ import { App } from '@frontmcp/sdk';
58
+ import { GetWeatherTool } from './tools/get-weather.tool';
59
+ import { CitiesResource } from './resources/cities.resource';
60
+
61
+ @App({
62
+ name: 'Weather',
63
+ description: 'Weather lookup tools and city data',
64
+ tools: [GetWeatherTool],
65
+ resources: [CitiesResource],
66
+ })
67
+ export class WeatherApp {}
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Tool: Get Weather
73
+
74
+ ```typescript
75
+ // src/tools/get-weather.tool.ts
76
+ import { Tool, ToolContext } from '@frontmcp/sdk';
77
+ import { z } from 'zod';
78
+
79
+ @Tool({
80
+ name: 'get_weather',
81
+ description: 'Get current weather for a city',
82
+ inputSchema: {
83
+ city: z.string().min(1).describe('City name'),
84
+ units: z.enum(['celsius', 'fahrenheit']).default('celsius').describe('Temperature units'),
85
+ },
86
+ outputSchema: {
87
+ temperature: z.number(),
88
+ condition: z.string(),
89
+ humidity: z.number(),
90
+ city: z.string(),
91
+ },
92
+ })
93
+ export class GetWeatherTool extends ToolContext {
94
+ async execute(input: { city: string; units: 'celsius' | 'fahrenheit' }) {
95
+ const url = `https://api.weather.example.com/v1/current?city=${encodeURIComponent(input.city)}&units=${input.units}`;
96
+
97
+ let response: Response;
98
+ try {
99
+ response = await this.fetch(url);
100
+ } catch (err) {
101
+ this.fail(new Error(`Weather API unreachable: ${String(err)}`));
102
+ }
103
+
104
+ if (!response.ok) {
105
+ this.fail(new Error(`Weather API error: ${response.status} ${response.statusText}`));
106
+ }
107
+
108
+ const data = await response.json();
109
+
110
+ return {
111
+ temperature: data.temp,
112
+ condition: data.condition,
113
+ humidity: data.humidity,
114
+ city: input.city,
115
+ };
116
+ }
117
+ }
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Resource: Supported Cities
123
+
124
+ ```typescript
125
+ // src/resources/cities.resource.ts
126
+ import { Resource, ResourceContext } from '@frontmcp/sdk';
127
+
128
+ const SUPPORTED_CITIES = ['London', 'Tokyo', 'New York', 'Paris', 'Sydney', 'Berlin', 'Toronto', 'Mumbai'];
129
+
130
+ @Resource({
131
+ uri: 'weather://cities',
132
+ name: 'Supported Cities',
133
+ description: 'List of cities with available weather data',
134
+ mimeType: 'application/json',
135
+ })
136
+ export class CitiesResource extends ResourceContext {
137
+ async read() {
138
+ return JSON.stringify(SUPPORTED_CITIES);
139
+ }
140
+ }
141
+ ```
142
+
143
+ ---
144
+
145
+ ## Unit Test: GetWeatherTool
146
+
147
+ ```typescript
148
+ // test/get-weather.tool.spec.ts
149
+ import { ToolContext } from '@frontmcp/sdk';
150
+ import { GetWeatherTool } from '../src/tools/get-weather.tool';
151
+
152
+ describe('GetWeatherTool', () => {
153
+ let tool: GetWeatherTool;
154
+
155
+ beforeEach(() => {
156
+ tool = new GetWeatherTool();
157
+ });
158
+
159
+ it('should return weather data for a valid city', async () => {
160
+ const mockResponse = {
161
+ ok: true,
162
+ json: async () => ({
163
+ temp: 22,
164
+ condition: 'Sunny',
165
+ humidity: 45,
166
+ }),
167
+ } as unknown as Response;
168
+
169
+ const ctx = {
170
+ fetch: jest.fn().mockResolvedValue(mockResponse),
171
+ fail: jest.fn((err: Error) => {
172
+ throw err;
173
+ }),
174
+ mark: jest.fn(),
175
+ get: jest.fn(),
176
+ tryGet: jest.fn(),
177
+ notify: jest.fn(),
178
+ respondProgress: jest.fn(),
179
+ } as unknown as ToolContext;
180
+ Object.assign(tool, ctx);
181
+
182
+ const result = await tool.execute({ city: 'London', units: 'celsius' });
183
+
184
+ expect(result).toEqual({
185
+ temperature: 22,
186
+ condition: 'Sunny',
187
+ humidity: 45,
188
+ city: 'London',
189
+ });
190
+ expect(ctx.fetch).toHaveBeenCalledWith(expect.stringContaining('city=London'));
191
+ });
192
+
193
+ it('should fail when city is empty (Zod validation)', () => {
194
+ const { z } = require('zod');
195
+ const schema = z.object({
196
+ city: z.string().min(1),
197
+ units: z.enum(['celsius', 'fahrenheit']).default('celsius'),
198
+ });
199
+
200
+ expect(() => schema.parse({ city: '' })).toThrow();
201
+ });
202
+
203
+ it('should fail when the weather API returns an error', async () => {
204
+ const mockResponse = {
205
+ ok: false,
206
+ status: 404,
207
+ statusText: 'Not Found',
208
+ } as unknown as Response;
209
+
210
+ const failFn = jest.fn((err: Error) => {
211
+ throw err;
212
+ });
213
+ const ctx = {
214
+ fetch: jest.fn().mockResolvedValue(mockResponse),
215
+ fail: failFn,
216
+ mark: jest.fn(),
217
+ get: jest.fn(),
218
+ tryGet: jest.fn(),
219
+ notify: jest.fn(),
220
+ respondProgress: jest.fn(),
221
+ } as unknown as ToolContext;
222
+ Object.assign(tool, ctx);
223
+
224
+ await expect(tool.execute({ city: 'Atlantis', units: 'celsius' })).rejects.toThrow(
225
+ 'Weather API error: 404 Not Found',
226
+ );
227
+
228
+ expect(failFn).toHaveBeenCalled();
229
+ });
230
+ });
231
+ ```
232
+
233
+ ---
234
+
235
+ ## E2E Test: Weather Server
236
+
237
+ ```typescript
238
+ // test/weather.e2e.spec.ts
239
+ import { McpTestClient, TestServer } from '@frontmcp/testing';
240
+ import Server from '../src/main';
241
+
242
+ describe('Weather Server E2E', () => {
243
+ let client: McpTestClient;
244
+ let server: TestServer;
245
+
246
+ beforeAll(async () => {
247
+ server = await TestServer.start({ command: 'npx tsx src/main.ts' });
248
+ client = await McpTestClient.create({ baseUrl: server.info.baseUrl }).buildAndConnect();
249
+ });
250
+
251
+ afterAll(async () => {
252
+ await client.disconnect();
253
+ await server.stop();
254
+ });
255
+
256
+ it('should list tools including get_weather', async () => {
257
+ const { tools } = await client.listTools();
258
+
259
+ expect(tools.length).toBeGreaterThan(0);
260
+ expect(tools).toContainTool('get_weather');
261
+ });
262
+
263
+ it('should call get_weather with a valid city', async () => {
264
+ const result = await client.callTool('get_weather', {
265
+ city: 'London',
266
+ units: 'celsius',
267
+ });
268
+
269
+ expect(result).toBeSuccessful();
270
+ expect(result.content[0].text).toBeDefined();
271
+
272
+ const parsed = JSON.parse(result.content[0].text);
273
+ expect(parsed).toHaveProperty('temperature');
274
+ expect(parsed).toHaveProperty('condition');
275
+ expect(parsed).toHaveProperty('humidity');
276
+ expect(parsed).toHaveProperty('city', 'London');
277
+ });
278
+
279
+ it('should read the cities resource', async () => {
280
+ const { resources } = await client.listResources();
281
+ const citiesResource = resources.find((r) => r.uri === 'weather://cities');
282
+ expect(citiesResource).toBeDefined();
283
+
284
+ const result = await client.readResource('weather://cities');
285
+ const cities = JSON.parse(result.contents[0].text);
286
+
287
+ expect(Array.isArray(cities)).toBe(true);
288
+ expect(cities).toContain('London');
289
+ expect(cities).toContain('Tokyo');
290
+ });
291
+ });
292
+ ```
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: frontmcp-setup
3
+ description: "Domain router for project setup and scaffolding \u2014 new projects, project structure, Nx workspaces, storage backends, multi-app composition, and the skills system. Use when starting or organizing a FrontMCP project."
4
+ tags: [router, setup, scaffold, project, nx, redis, sqlite, structure, guide]
5
+ priority: 10
6
+ visibility: both
7
+ license: Apache-2.0
8
+ metadata:
9
+ docs: https://docs.agentfront.dev/frontmcp/getting-started/quickstart
10
+ ---
11
+
12
+ # FrontMCP Setup Router
13
+
14
+ Entry point for project setup and scaffolding. This skill helps you find the right setup guide based on your project needs — from initial scaffolding to storage backends, project structure, and multi-app composition.
15
+
16
+ ## When to Use This Skill
17
+
18
+ ### Must Use
19
+
20
+ - Starting a new FrontMCP project from scratch and need to choose between standalone vs Nx monorepo
21
+ - Setting up storage backends (Redis, SQLite) for session or state management
22
+ - Organizing an existing project and need canonical directory layout guidance
23
+
24
+ ### Recommended
25
+
26
+ - Onboarding to the FrontMCP project structure and naming conventions
27
+ - Setting up multi-app composition within a single server
28
+ - Understanding the skills system and how to browse, install, and manage skills
29
+
30
+ ### Skip When
31
+
32
+ - You need to build specific components like tools or resources (see `frontmcp-development`)
33
+ - You need to configure transport, auth, or throttling (see `frontmcp-config`)
34
+ - You need to deploy or build for a target platform (see `frontmcp-deployment`)
35
+
36
+ > **Decision:** Use this skill when you need to CREATE or ORGANIZE a project. Use other routers when you need to build, configure, deploy, or test.
37
+
38
+ ## Prerequisites
39
+
40
+ - Node.js 22+ and npm/yarn installed
41
+ - `frontmcp` CLI available globally (`npm install -g frontmcp`)
42
+
43
+ ## Steps
44
+
45
+ 1. Use the Scenario Routing Table below to find the right setup guide for your task
46
+ 2. Scaffold your project with `frontmcp create` (standalone) or `frontmcp create --nx` (monorepo)
47
+ 3. Configure storage and project structure per the relevant reference files
48
+ 4. Follow the Recommended Reading Order for a complete setup walkthrough
49
+
50
+ ## Scenario Routing Table
51
+
52
+ | Scenario | Reference | Description |
53
+ | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------- |
54
+ | Scaffold a new project with `frontmcp create` | `references/setup-project.md` | CLI scaffolder, manual setup, deployment-specific config |
55
+ | Organize a standalone (non-Nx) project | `references/project-structure-standalone.md` | File layout, naming conventions (`<name>.<type>.ts`), folder hierarchy |
56
+ | Organize an Nx monorepo | `references/project-structure-nx.md` | apps/, libs/, servers/ layout, generators, dependency rules |
57
+ | Set up Redis for production storage | `references/setup-redis.md` | Docker Redis, Vercel KV, pub/sub for subscriptions |
58
+ | Set up SQLite for local development | `references/setup-sqlite.md` | WAL mode, migration helpers, encryption |
59
+ | Compose multiple apps into one server | `references/multi-app-composition.md` | `@FrontMcp` with multiple `@App` classes, cross-app providers |
60
+ | Use Nx build, test, and CI commands | `references/nx-workflow.md` | `nx build`, `nx test`, `nx run-many`, caching, affected commands |
61
+ | Browse, install, and manage skills | `references/frontmcp-skills-usage.md` | CLI commands, bundles, categories, search |
62
+
63
+ ## Recommended Reading Order
64
+
65
+ 1. **`references/setup-project.md`** — Start here for any new project
66
+ 2. **`references/project-structure-standalone.md`** or **`references/project-structure-nx.md`** — Choose your layout
67
+ 3. **`references/setup-redis.md`** or **`references/setup-sqlite.md`** — Add storage if needed
68
+ 4. **`references/multi-app-composition.md`** — Scale to multiple apps (when needed)
69
+ 5. **`references/nx-workflow.md`** — Nx-specific build and CI commands (if using Nx)
70
+ 6. **`references/frontmcp-skills-usage.md`** — Learn the skills system
71
+
72
+ ## Cross-Cutting Patterns
73
+
74
+ | Pattern | Rule |
75
+ | -------------- | -------------------------------------------------------------------------------- |
76
+ | Project type | Standalone for single-app projects; Nx for multi-app or team projects |
77
+ | File naming | `<name>.<type>.ts` (e.g., `fetch-weather.tool.ts`) everywhere |
78
+ | Test naming | `.spec.ts` extension (not `.test.ts`) |
79
+ | Entry point | `main.ts` must `export default` the `@FrontMcp` class |
80
+ | Storage choice | Redis for production/serverless; SQLite for local dev/CLI; memory for tests only |
81
+ | App boundaries | Each `@App` is a self-contained module; shared logic goes in providers |
82
+
83
+ ## Common Patterns
84
+
85
+ | Pattern | Correct | Incorrect | Why |
86
+ | --------------------- | ----------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------- |
87
+ | Project scaffolding | `frontmcp create` or `frontmcp create --nx` | Manual setup from scratch | CLI sets up correct structure, dependencies, and config files |
88
+ | Entry point | `export default class MyServer` in `main.ts` | Named export or no default export | FrontMCP loads the default export at startup |
89
+ | Storage in production | Redis or platform-native (Vercel KV, DynamoDB) | Memory store or SQLite | Memory is lost on restart; SQLite doesn't work on serverless |
90
+ | Multi-app composition | Separate `@App` classes composed in `@FrontMcp` | One giant `@App` with all components | Separate apps enable independent testing and modular architecture |
91
+ | File organization | Feature folders for 10+ components | Flat `tools/` directory with dozens of files | Feature folders make domain boundaries visible |
92
+
93
+ ## Verification Checklist
94
+
95
+ ### Project Structure
96
+
97
+ - [ ] `main.ts` exists with `export default` of `@FrontMcp` class
98
+ - [ ] At least one `@App` class registered in the server
99
+ - [ ] Files follow `<name>.<type>.ts` naming convention
100
+ - [ ] Test files use `.spec.ts` extension
101
+
102
+ ### Storage
103
+
104
+ - [ ] Storage backend chosen and configured (Redis/SQLite/memory)
105
+ - [ ] Connection string in environment variables, not hardcoded
106
+ - [ ] Storage accessible from the server process
107
+
108
+ ### Build and Dev
109
+
110
+ - [ ] `frontmcp dev` starts successfully with file watching
111
+ - [ ] `frontmcp build --target <target>` completes without errors
112
+ - [ ] Tests pass with `jest` or `nx test`
113
+
114
+ ## Troubleshooting
115
+
116
+ | Problem | Cause | Solution |
117
+ | ------------------------ | -------------------------------- | --------------------------------------------------------------------- |
118
+ | `frontmcp create` fails | Missing Node.js 22+ or npm/yarn | Install Node.js 22+ and ensure npm/yarn is available |
119
+ | Server fails to start | `main.ts` missing default export | Add `export default MyServerClass` to `main.ts` |
120
+ | Redis connection refused | Redis not running or wrong URL | Start Redis (`docker compose up redis`) or fix `REDIS_URL` env var |
121
+ | Nx generator not found | `@frontmcp/nx` not installed | Run `npm install -D @frontmcp/nx` |
122
+ | Skills not loading | Skills placed in wrong directory | Catalog skills go in top-level `skills/`, app skills in `src/skills/` |
123
+
124
+ ## Reference
125
+
126
+ - [Getting Started](https://docs.agentfront.dev/frontmcp/getting-started/quickstart)
127
+ - Domain routers: `frontmcp-development`, `frontmcp-deployment`, `frontmcp-testing`, `frontmcp-config`, `frontmcp-guides`
@@ -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`