@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.
- package/README.md +2 -2
- package/catalog/TEMPLATE.md +58 -13
- package/catalog/frontmcp-config/SKILL.md +156 -0
- package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +5 -0
- package/catalog/frontmcp-config/references/configure-auth.md +243 -0
- package/catalog/frontmcp-config/references/configure-elicitation.md +183 -0
- package/catalog/frontmcp-config/references/configure-http.md +210 -0
- package/catalog/frontmcp-config/references/configure-session.md +210 -0
- package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +5 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +234 -0
- package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +5 -0
- package/catalog/frontmcp-config/references/configure-transport.md +200 -0
- package/catalog/frontmcp-config/references/setup-redis.md +9 -0
- package/catalog/frontmcp-config/references/setup-sqlite.md +9 -0
- package/catalog/frontmcp-deployment/SKILL.md +152 -0
- package/catalog/frontmcp-deployment/references/build-for-browser.md +143 -0
- package/catalog/frontmcp-deployment/references/build-for-cli.md +191 -0
- package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +66 -20
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +218 -0
- package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +77 -59
- package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +18 -4
- package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +69 -36
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +65 -0
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +229 -0
- package/catalog/frontmcp-development/SKILL.md +126 -0
- package/catalog/frontmcp-development/references/create-adapter.md +170 -0
- package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +10 -5
- package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +83 -40
- package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +62 -15
- package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +100 -7
- package/catalog/frontmcp-development/references/create-plugin.md +506 -0
- package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +65 -22
- package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +63 -23
- package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +148 -26
- package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +174 -20
- package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +114 -28
- package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +5 -0
- package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +5 -0
- package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +172 -23
- package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +61 -14
- package/catalog/frontmcp-development/references/decorators-guide.md +754 -0
- package/catalog/frontmcp-development/references/official-adapters.md +199 -0
- package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +97 -27
- package/catalog/frontmcp-extensibility/SKILL.md +103 -0
- package/catalog/frontmcp-extensibility/references/vectoriadb.md +289 -0
- package/catalog/frontmcp-guides/SKILL.md +420 -0
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +641 -0
- package/catalog/frontmcp-guides/references/example-task-manager.md +517 -0
- package/catalog/frontmcp-guides/references/example-weather-api.md +297 -0
- package/catalog/frontmcp-production-readiness/SKILL.md +98 -0
- package/catalog/frontmcp-production-readiness/references/common-checklist.md +156 -0
- package/catalog/frontmcp-production-readiness/references/production-browser.md +46 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +62 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +61 -0
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +52 -0
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +53 -0
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +66 -0
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +61 -0
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +52 -0
- package/catalog/frontmcp-setup/SKILL.md +132 -0
- package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +280 -0
- package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +66 -19
- package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +79 -17
- package/catalog/frontmcp-setup/references/project-structure-nx.md +251 -0
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +217 -0
- package/catalog/frontmcp-setup/references/readme-guide.md +226 -0
- package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +63 -58
- package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +60 -82
- package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +65 -72
- package/catalog/frontmcp-testing/SKILL.md +135 -0
- package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +79 -63
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +5 -0
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +5 -0
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +5 -0
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +5 -0
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +5 -0
- package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +6 -0
- package/catalog/skills-manifest.json +337 -382
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js.map +1 -1
- package/src/loader.js +0 -1
- package/src/loader.js.map +1 -1
- package/src/manifest.d.ts +15 -3
- package/src/manifest.js +3 -3
- package/src/manifest.js.map +1 -1
- package/catalog/adapters/create-adapter/SKILL.md +0 -127
- package/catalog/adapters/official-adapters/SKILL.md +0 -136
- package/catalog/auth/configure-auth/SKILL.md +0 -250
- package/catalog/auth/configure-session/SKILL.md +0 -201
- package/catalog/config/configure-elicitation/SKILL.md +0 -136
- package/catalog/config/configure-http/SKILL.md +0 -167
- package/catalog/config/configure-throttle/SKILL.md +0 -189
- package/catalog/config/configure-transport/SKILL.md +0 -151
- package/catalog/deployment/build-for-browser/SKILL.md +0 -95
- package/catalog/deployment/build-for-cli/SKILL.md +0 -100
- package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
- package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
- package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
- package/catalog/development/decorators-guide/SKILL.md +0 -598
- package/catalog/plugins/create-plugin/SKILL.md +0 -336
- package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
- package/catalog/setup/project-structure-nx/SKILL.md +0 -186
- package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-plugin
|
|
3
|
-
description: Build a FrontMCP plugin with lifecycle hooks and context extensions. Use when creating custom plugins, extending tool context, or adding cross-cutting concerns.
|
|
4
|
-
tags:
|
|
5
|
-
- plugins
|
|
6
|
-
- extensibility
|
|
7
|
-
- hooks
|
|
8
|
-
- context
|
|
9
|
-
bundle:
|
|
10
|
-
- full
|
|
11
|
-
visibility: both
|
|
12
|
-
priority: 5
|
|
13
|
-
parameters:
|
|
14
|
-
- name: plugin-name
|
|
15
|
-
description: Name for the new plugin (kebab-case)
|
|
16
|
-
type: string
|
|
17
|
-
required: true
|
|
18
|
-
- name: with-context-extension
|
|
19
|
-
description: Whether the plugin adds properties to ExecutionContextBase
|
|
20
|
-
type: boolean
|
|
21
|
-
required: false
|
|
22
|
-
default: false
|
|
23
|
-
- name: with-dynamic-options
|
|
24
|
-
description: Whether the plugin accepts runtime configuration options
|
|
25
|
-
type: boolean
|
|
26
|
-
required: false
|
|
27
|
-
default: false
|
|
28
|
-
examples:
|
|
29
|
-
- scenario: Create a simple logging plugin with no context extensions
|
|
30
|
-
parameters:
|
|
31
|
-
plugin-name: audit-log
|
|
32
|
-
with-context-extension: false
|
|
33
|
-
expected-outcome: A plugin that hooks into tool execution to log audit events
|
|
34
|
-
- scenario: Create an advanced plugin that extends ToolContext with a new property
|
|
35
|
-
parameters:
|
|
36
|
-
plugin-name: feature-flags
|
|
37
|
-
with-context-extension: true
|
|
38
|
-
with-dynamic-options: true
|
|
39
|
-
expected-outcome: A configurable plugin that adds this.featureFlags to all tool contexts
|
|
40
|
-
license: MIT
|
|
41
|
-
compatibility: Requires Node.js 18+ and @frontmcp/sdk
|
|
42
|
-
metadata:
|
|
43
|
-
category: plugins
|
|
44
|
-
difficulty: advanced
|
|
45
|
-
docs: https://docs.agentfront.dev/frontmcp/plugins/creating-plugins
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
# Create a FrontMCP Plugin
|
|
49
|
-
|
|
50
|
-
This skill covers building custom plugins for FrontMCP and using all 6 official plugins. Plugins are modular units that extend server behavior through providers, context extensions, lifecycle hooks, and contributed tools/resources/prompts.
|
|
51
|
-
|
|
52
|
-
## Plugin Decorator Signature
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
function Plugin(metadata: PluginMetadata): ClassDecorator;
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
The `PluginMetadata` interface:
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
interface PluginMetadata {
|
|
62
|
-
name: string;
|
|
63
|
-
id?: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
providers?: ProviderType[];
|
|
66
|
-
exports?: ProviderType[];
|
|
67
|
-
plugins?: PluginType[];
|
|
68
|
-
adapters?: AdapterType[];
|
|
69
|
-
tools?: ToolType[];
|
|
70
|
-
resources?: ResourceType[];
|
|
71
|
-
prompts?: PromptType[];
|
|
72
|
-
skills?: SkillType[];
|
|
73
|
-
scope?: 'app' | 'server'; // default: 'app'
|
|
74
|
-
contextExtensions?: ContextExtension[];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
interface ContextExtension {
|
|
78
|
-
property: string;
|
|
79
|
-
token: Token<unknown>;
|
|
80
|
-
errorMessage?: string;
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## DynamicPlugin Base Class
|
|
85
|
-
|
|
86
|
-
For plugins that accept runtime configuration, extend `DynamicPlugin<TOptions, TInput>`:
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
abstract class DynamicPlugin<TOptions extends object, TInput extends object = TOptions> {
|
|
90
|
-
static dynamicProviders?(options: any): readonly ProviderType[];
|
|
91
|
-
static init<TThis>(options: InitOptions<TInput>): PluginReturn<TOptions>;
|
|
92
|
-
get<T>(token: Reference<T>): T;
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
- `TOptions` -- the resolved options type (after parsing/defaults)
|
|
97
|
-
- `TInput` -- the input type users provide to `init()` (may have optional fields)
|
|
98
|
-
- `init()` creates a provider entry for use in `plugins: [...]` arrays
|
|
99
|
-
- `dynamicProviders()` returns providers computed from the input options
|
|
100
|
-
|
|
101
|
-
## Step 1: Create a Simple Plugin
|
|
102
|
-
|
|
103
|
-
The minimal plugin only needs a name:
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
import { Plugin } from '@frontmcp/sdk';
|
|
107
|
-
|
|
108
|
-
@Plugin({
|
|
109
|
-
name: 'audit-log',
|
|
110
|
-
description: 'Logs tool executions for audit compliance',
|
|
111
|
-
})
|
|
112
|
-
export default class AuditLogPlugin {}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Register it in your server:
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
import { FrontMcp, App } from '@frontmcp/sdk';
|
|
119
|
-
import AuditLogPlugin from './plugins/audit-log.plugin';
|
|
120
|
-
|
|
121
|
-
@App()
|
|
122
|
-
class MyApp {}
|
|
123
|
-
|
|
124
|
-
@FrontMcp({
|
|
125
|
-
info: { name: 'my-server', version: '1.0.0' },
|
|
126
|
-
apps: [MyApp],
|
|
127
|
-
plugins: [AuditLogPlugin],
|
|
128
|
-
tools: [
|
|
129
|
-
/* your tools */
|
|
130
|
-
],
|
|
131
|
-
})
|
|
132
|
-
class MyServer {}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Step 2: Add Providers
|
|
136
|
-
|
|
137
|
-
Plugins contribute injectable services via `providers`:
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { Plugin, Provider } from '@frontmcp/sdk';
|
|
141
|
-
import type { Token } from '@frontmcp/sdk';
|
|
142
|
-
|
|
143
|
-
export const AuditLoggerToken: Token<AuditLogger> = Symbol('AuditLogger');
|
|
144
|
-
|
|
145
|
-
@Provider()
|
|
146
|
-
class AuditLogger {
|
|
147
|
-
async logToolCall(toolName: string, userId: string, input: unknown): Promise<void> {
|
|
148
|
-
console.log(`[AUDIT] ${userId} called ${toolName}`, input);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
@Plugin({
|
|
153
|
-
name: 'audit-log',
|
|
154
|
-
description: 'Logs tool executions for audit compliance',
|
|
155
|
-
providers: [{ provide: AuditLoggerToken, useClass: AuditLogger }],
|
|
156
|
-
exports: [AuditLogger],
|
|
157
|
-
})
|
|
158
|
-
export default class AuditLogPlugin {}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Step 3: Add Context Extensions
|
|
162
|
-
|
|
163
|
-
Context extensions add properties to `ExecutionContextBase` so tools access plugin services via `this.propertyName`. Two parts are required:
|
|
164
|
-
|
|
165
|
-
### Part A: TypeScript Type Declaration (Module Augmentation)
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
// audit-log.context-extension.ts
|
|
169
|
-
import type { AuditLogger } from './audit-logger';
|
|
170
|
-
|
|
171
|
-
declare module '@frontmcp/sdk' {
|
|
172
|
-
interface ExecutionContextBase {
|
|
173
|
-
/** Audit logger provided by AuditLogPlugin */
|
|
174
|
-
readonly auditLog: AuditLogger;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### Part B: Register via Plugin Metadata
|
|
180
|
-
|
|
181
|
-
The SDK handles runtime installation when you declare `contextExtensions` in plugin metadata. Do not modify `ExecutionContextBase.prototype` directly.
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
import { Plugin } from '@frontmcp/sdk';
|
|
185
|
-
import type { Token } from '@frontmcp/sdk';
|
|
186
|
-
import './audit-log.context-extension'; // Import for type augmentation side effect
|
|
187
|
-
|
|
188
|
-
export const AuditLoggerToken: Token<AuditLogger> = Symbol('AuditLogger');
|
|
189
|
-
|
|
190
|
-
@Plugin({
|
|
191
|
-
name: 'audit-log',
|
|
192
|
-
description: 'Logs tool executions for audit compliance',
|
|
193
|
-
providers: [{ provide: AuditLoggerToken, useClass: AuditLogger }],
|
|
194
|
-
contextExtensions: [
|
|
195
|
-
{
|
|
196
|
-
property: 'auditLog',
|
|
197
|
-
token: AuditLoggerToken,
|
|
198
|
-
errorMessage: 'AuditLogPlugin is not installed. Add it to your @FrontMcp plugins array.',
|
|
199
|
-
},
|
|
200
|
-
],
|
|
201
|
-
})
|
|
202
|
-
export default class AuditLogPlugin {}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Now tools can use `this.auditLog`:
|
|
206
|
-
|
|
207
|
-
```typescript
|
|
208
|
-
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
209
|
-
|
|
210
|
-
@Tool({ name: 'delete_record' })
|
|
211
|
-
class DeleteRecordTool extends ToolContext {
|
|
212
|
-
async execute(input: { recordId: string }) {
|
|
213
|
-
await this.auditLog.logToolCall('delete_record', this.scope.userId, input);
|
|
214
|
-
return { deleted: true };
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## Step 4: Create a Configurable Plugin with DynamicPlugin
|
|
220
|
-
|
|
221
|
-
For plugins that accept runtime options, extend `DynamicPlugin`:
|
|
222
|
-
|
|
223
|
-
```typescript
|
|
224
|
-
import { Plugin, DynamicPlugin, ProviderType } from '@frontmcp/sdk';
|
|
225
|
-
import type { Token } from '@frontmcp/sdk';
|
|
226
|
-
|
|
227
|
-
export interface MyPluginOptions {
|
|
228
|
-
endpoint: string;
|
|
229
|
-
refreshIntervalMs: number;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export type MyPluginOptionsInput = Omit<MyPluginOptions, 'refreshIntervalMs'> & {
|
|
233
|
-
refreshIntervalMs?: number;
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
export const MyServiceToken: Token<MyService> = Symbol('MyService');
|
|
237
|
-
|
|
238
|
-
@Plugin({
|
|
239
|
-
name: 'my-plugin',
|
|
240
|
-
description: 'A configurable plugin',
|
|
241
|
-
contextExtensions: [
|
|
242
|
-
{
|
|
243
|
-
property: 'myService',
|
|
244
|
-
token: MyServiceToken,
|
|
245
|
-
errorMessage: 'MyPlugin is not installed.',
|
|
246
|
-
},
|
|
247
|
-
],
|
|
248
|
-
})
|
|
249
|
-
export default class MyPlugin extends DynamicPlugin<MyPluginOptions, MyPluginOptionsInput> {
|
|
250
|
-
options: MyPluginOptions;
|
|
251
|
-
|
|
252
|
-
constructor(options: MyPluginOptionsInput = { endpoint: '' }) {
|
|
253
|
-
super();
|
|
254
|
-
this.options = { refreshIntervalMs: 30_000, ...options };
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
static override dynamicProviders(options: MyPluginOptionsInput): ProviderType[] {
|
|
258
|
-
return [
|
|
259
|
-
{
|
|
260
|
-
provide: MyServiceToken,
|
|
261
|
-
useFactory: () =>
|
|
262
|
-
new MyService({
|
|
263
|
-
refreshIntervalMs: 30_000,
|
|
264
|
-
...options,
|
|
265
|
-
}),
|
|
266
|
-
},
|
|
267
|
-
];
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Register with `init()`:
|
|
273
|
-
|
|
274
|
-
```typescript
|
|
275
|
-
@FrontMcp({
|
|
276
|
-
info: { name: 'my-server', version: '1.0.0' },
|
|
277
|
-
apps: [MyApp],
|
|
278
|
-
plugins: [
|
|
279
|
-
MyPlugin.init({
|
|
280
|
-
endpoint: 'https://api.example.com',
|
|
281
|
-
refreshIntervalMs: 60_000,
|
|
282
|
-
}),
|
|
283
|
-
],
|
|
284
|
-
})
|
|
285
|
-
class MyServer {}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Step 5: Extend Tool Metadata
|
|
289
|
-
|
|
290
|
-
Plugins can add fields to the `@Tool` decorator via global augmentation:
|
|
291
|
-
|
|
292
|
-
```typescript
|
|
293
|
-
declare global {
|
|
294
|
-
interface ExtendFrontMcpToolMetadata {
|
|
295
|
-
audit?: {
|
|
296
|
-
enabled: boolean;
|
|
297
|
-
level: 'info' | 'warn' | 'critical';
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
Tools then use it:
|
|
304
|
-
|
|
305
|
-
```typescript
|
|
306
|
-
@Tool({
|
|
307
|
-
name: 'delete_user',
|
|
308
|
-
audit: { enabled: true, level: 'critical' },
|
|
309
|
-
})
|
|
310
|
-
class DeleteUserTool extends ToolContext {
|
|
311
|
-
/* ... */
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Official Plugins
|
|
318
|
-
|
|
319
|
-
For official plugin installation, configuration, and examples, see the **official-plugins** skill. FrontMCP provides 6 official plugins: CodeCall, Remember, Approval, Cache, Feature Flags, and Dashboard. Install individually or via `@frontmcp/plugins` (meta-package).
|
|
320
|
-
|
|
321
|
-
## Common Mistakes
|
|
322
|
-
|
|
323
|
-
- **Module-level side effects for context extension** -- do not call `installExtension()` at the top level of a module. This causes circular dependencies. The SDK handles installation via `contextExtensions` metadata.
|
|
324
|
-
- **Forgetting the type augmentation** -- without `declare module '@frontmcp/sdk'`, TypeScript will not recognize `this.auditLog` in tools.
|
|
325
|
-
- **Using `any` types in providers** -- use `unknown` for generic defaults.
|
|
326
|
-
- **Scope confusion** -- `scope: 'server'` makes hooks fire for all apps in a gateway. Default to `scope: 'app'`.
|
|
327
|
-
- **Direct prototype modification** -- use the `contextExtensions` metadata array instead of directly modifying `ExecutionContextBase.prototype`.
|
|
328
|
-
|
|
329
|
-
## Reference
|
|
330
|
-
|
|
331
|
-
- Plugin system docs: [docs.agentfront.dev/frontmcp/plugins/creating-plugins](https://docs.agentfront.dev/frontmcp/plugins/creating-plugins)
|
|
332
|
-
- `@Plugin` decorator: import from `@frontmcp/sdk` — [source](https://github.com/agentfront/frontmcp/tree/main/libs/sdk/src/common/decorators/plugin.decorator.ts)
|
|
333
|
-
- `DynamicPlugin` base class: import from `@frontmcp/sdk` — [source](https://github.com/agentfront/frontmcp/tree/main/libs/sdk/src/common/dynamic/dynamic.plugin.ts)
|
|
334
|
-
- `PluginMetadata` interface (contextExtensions): import from `@frontmcp/sdk` — [source](https://github.com/agentfront/frontmcp/tree/main/libs/sdk/src/common/metadata/plugin.metadata.ts)
|
|
335
|
-
- Official plugins: `@frontmcp/plugin-cache`, `@frontmcp/plugin-codecall`, `@frontmcp/plugin-remember`, `@frontmcp/plugin-approval`, `@frontmcp/plugin-feature-flags`, `@frontmcp/plugin-dashboard`
|
|
336
|
-
- Meta-package: `@frontmcp/plugins` (re-exports cache, codecall, dashboard, remember)
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontmcp-skills-usage
|
|
3
|
-
description: Search, install, and manage FrontMCP development skills for Claude Code and Codex. Use when setting up skills for AI-assisted development, choosing between static and dynamic skill delivery, or configuring skill providers.
|
|
4
|
-
tags: [skills, cli, install, claude, codex, search, catalog]
|
|
5
|
-
priority: 10
|
|
6
|
-
visibility: both
|
|
7
|
-
license: Apache-2.0
|
|
8
|
-
metadata:
|
|
9
|
-
docs: https://docs.agentfront.dev/frontmcp/servers/skills
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# FrontMCP Skills — Search, Install, and Usage
|
|
13
|
-
|
|
14
|
-
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).
|
|
15
|
-
|
|
16
|
-
## Quick Start
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
# Search for skills about tools
|
|
20
|
-
frontmcp skills search "create tool"
|
|
21
|
-
|
|
22
|
-
# List all skills
|
|
23
|
-
frontmcp skills list
|
|
24
|
-
|
|
25
|
-
# Show full skill content
|
|
26
|
-
frontmcp skills show create-tool
|
|
27
|
-
|
|
28
|
-
# Install a skill for Claude Code
|
|
29
|
-
frontmcp skills install create-tool --provider claude
|
|
30
|
-
|
|
31
|
-
# Install a skill for Codex
|
|
32
|
-
frontmcp skills install create-tool --provider codex
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## CLI Commands
|
|
36
|
-
|
|
37
|
-
### `frontmcp skills search <query>`
|
|
38
|
-
|
|
39
|
-
Semantic search through the catalog using weighted text matching (description 3x, tags 2x, name 1x):
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
frontmcp skills search "authentication oauth"
|
|
43
|
-
frontmcp skills search "deploy vercel" --category deployment
|
|
44
|
-
frontmcp skills search "plugin hooks" --tag middleware --limit 5
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### `frontmcp skills list`
|
|
48
|
-
|
|
49
|
-
List all skills, optionally filtered:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
frontmcp skills list # All skills
|
|
53
|
-
frontmcp skills list --category development # Development skills only
|
|
54
|
-
frontmcp skills list --tag redis # Skills tagged with redis
|
|
55
|
-
frontmcp skills list --bundle recommended # Recommended bundle
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### `frontmcp skills show <name>`
|
|
59
|
-
|
|
60
|
-
Print the full SKILL.md content to stdout — useful for piping to AI context:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
frontmcp skills show create-tool # Print full skill
|
|
64
|
-
frontmcp skills show configure-auth # Print auth skill
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### `frontmcp skills install <name>`
|
|
68
|
-
|
|
69
|
-
Copy a skill to a provider-specific directory:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Claude Code — installs to .claude/skills/<name>/SKILL.md
|
|
73
|
-
frontmcp skills install create-tool --provider claude
|
|
74
|
-
|
|
75
|
-
# Codex — installs to .codex/skills/<name>/SKILL.md
|
|
76
|
-
frontmcp skills install decorators-guide --provider codex
|
|
77
|
-
|
|
78
|
-
# Custom directory
|
|
79
|
-
frontmcp skills install setup-project --dir ./my-skills
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Two Approaches: Static vs Dynamic
|
|
83
|
-
|
|
84
|
-
### Static Installation (Copy to Disk)
|
|
85
|
-
|
|
86
|
-
Install skills once — they live in your project and are always available:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
# Install for Claude Code
|
|
90
|
-
frontmcp skills install create-tool --provider claude
|
|
91
|
-
frontmcp skills install create-resource --provider claude
|
|
92
|
-
frontmcp skills install configure-auth --provider claude
|
|
93
|
-
|
|
94
|
-
# Install for Codex
|
|
95
|
-
frontmcp skills install decorators-guide --provider codex
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Directory structure after install:**
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
my-project/
|
|
102
|
-
├── .claude/
|
|
103
|
-
│ └── skills/
|
|
104
|
-
│ ├── create-tool/
|
|
105
|
-
│ │ ├── SKILL.md
|
|
106
|
-
│ │ └── references/
|
|
107
|
-
│ ├── create-resource/
|
|
108
|
-
│ │ └── SKILL.md
|
|
109
|
-
│ └── configure-auth/
|
|
110
|
-
│ ├── SKILL.md
|
|
111
|
-
│ └── references/
|
|
112
|
-
├── .codex/
|
|
113
|
-
│ └── skills/
|
|
114
|
-
│ └── decorators-guide/
|
|
115
|
-
│ └── SKILL.md
|
|
116
|
-
└── src/
|
|
117
|
-
└── ...
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### Dynamic Search (On-Demand via CLI)
|
|
121
|
-
|
|
122
|
-
Use the CLI to search and show skills on demand — no installation needed:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Search for what you need
|
|
126
|
-
frontmcp skills search "how to create a tool with zod"
|
|
127
|
-
|
|
128
|
-
# Pipe skill content directly into context
|
|
129
|
-
frontmcp skills show create-tool
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
This works because `frontmcp skills show` outputs the full SKILL.md content to stdout.
|
|
133
|
-
|
|
134
|
-
## Comparison: Static vs Dynamic
|
|
135
|
-
|
|
136
|
-
| Aspect | Static Install | Dynamic CLI Search |
|
|
137
|
-
| ----------------- | ------------------------------------- | -------------------------------------------- |
|
|
138
|
-
| **Setup** | `frontmcp skills install <name>` once | No setup — just use `frontmcp skills search` |
|
|
139
|
-
| **Availability** | Always loaded by AI agent | On-demand, requires CLI invocation |
|
|
140
|
-
| **Context usage** | Skills in system prompt (uses tokens) | Only loaded when searched (saves tokens) |
|
|
141
|
-
| **Updates** | Re-install to update | Always uses latest catalog |
|
|
142
|
-
| **Offline** | Works offline after install | Needs catalog available |
|
|
143
|
-
| **Best for** | Core skills you use daily | Occasional reference, exploration |
|
|
144
|
-
| **Token cost** | Higher (all installed skills loaded) | Lower (only searched skills loaded) |
|
|
145
|
-
|
|
146
|
-
### Recommended Approach
|
|
147
|
-
|
|
148
|
-
**Install 5-10 core skills statically** for your most common workflows, and use dynamic search for everything else:
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
# Core skills — install statically
|
|
152
|
-
frontmcp skills install setup-project --provider claude
|
|
153
|
-
frontmcp skills install create-tool --provider claude
|
|
154
|
-
frontmcp skills install decorators-guide --provider claude
|
|
155
|
-
frontmcp skills install configure-auth --provider claude
|
|
156
|
-
frontmcp skills install project-structure-standalone --provider claude
|
|
157
|
-
|
|
158
|
-
# Everything else — search on demand
|
|
159
|
-
frontmcp skills search "deploy to vercel"
|
|
160
|
-
frontmcp skills search "rate limiting"
|
|
161
|
-
frontmcp skills show configure-throttle
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Provider Directories
|
|
165
|
-
|
|
166
|
-
| Provider | Install directory | Auto-loaded by |
|
|
167
|
-
| ----------- | -------------------------------- | ------------------------- |
|
|
168
|
-
| Claude Code | `.claude/skills/<name>/SKILL.md` | Claude Code system prompt |
|
|
169
|
-
| Codex | `.codex/skills/<name>/SKILL.md` | Codex agent context |
|
|
170
|
-
|
|
171
|
-
## Bundle Presets
|
|
172
|
-
|
|
173
|
-
When scaffolding a project, use `--skills` to install a preset bundle:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
# Recommended bundle (core skills for the deployment target)
|
|
177
|
-
frontmcp create my-app --skills recommended
|
|
178
|
-
|
|
179
|
-
# Minimal bundle (just project setup + create-tool)
|
|
180
|
-
frontmcp create my-app --skills minimal
|
|
181
|
-
|
|
182
|
-
# Full bundle (all skills)
|
|
183
|
-
frontmcp create my-app --skills full
|
|
184
|
-
|
|
185
|
-
# No skills
|
|
186
|
-
frontmcp create my-app --skills none
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Available Categories
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
frontmcp skills list --category setup # Project setup and configuration
|
|
193
|
-
frontmcp skills list --category config # Server configuration (transport, HTTP, throttle, elicitation)
|
|
194
|
-
frontmcp skills list --category development # Creating tools, resources, prompts, agents, skills, providers
|
|
195
|
-
frontmcp skills list --category deployment # Build and deploy (node, vercel, lambda, cli, browser, sdk)
|
|
196
|
-
frontmcp skills list --category auth # Authentication and session management
|
|
197
|
-
frontmcp skills list --category plugins # Official and custom plugins
|
|
198
|
-
frontmcp skills list --category adapters # OpenAPI and custom adapters
|
|
199
|
-
frontmcp skills list --category testing # Testing with Jest and @frontmcp/testing
|
|
200
|
-
```
|