@agiflowai/one-mcp 0.2.5 → 0.2.7

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 CHANGED
@@ -192,6 +192,183 @@ filesystem:
192
192
  read_file, list_directory, search_files
193
193
  ```
194
194
 
195
+ ### Skills
196
+
197
+ Skills are reusable prompt templates that provide specialized capabilities to AI agents. They are markdown files with YAML frontmatter that get loaded and made available through the `describe_tools` output.
198
+
199
+ #### Configuration
200
+
201
+ Enable skills by adding a `skills` section to your config:
202
+
203
+ ```yaml
204
+ mcpServers:
205
+ # ... your MCP servers
206
+
207
+ skills:
208
+ paths:
209
+ - ".claude/skills" # Relative to config file
210
+ - "/absolute/path/to/skills" # Absolute paths also supported
211
+ ```
212
+
213
+ #### Skill File Structure
214
+
215
+ Skills can be organized in two ways:
216
+
217
+ **Flat structure:**
218
+ ```
219
+ .claude/skills/
220
+ ├── pdf/
221
+ │ └── SKILL.md
222
+ └── data-analysis/
223
+ └── SKILL.md
224
+ ```
225
+
226
+ **Skill file format (`SKILL.md`):**
227
+ ```markdown
228
+ ---
229
+ name: pdf
230
+ description: Create and manipulate PDF documents
231
+ ---
232
+
233
+ # PDF Skill
234
+
235
+ This skill helps you work with PDF files...
236
+
237
+ ## Usage
238
+ ...
239
+ ```
240
+
241
+ #### Required Frontmatter
242
+
243
+ Each `SKILL.md` must have:
244
+ - `name`: Unique identifier for the skill
245
+ - `description`: Brief description shown to AI agents
246
+
247
+ #### How Skills Work
248
+
249
+ 1. Skills are discovered from configured paths at startup
250
+ 2. Available skills are listed in the `describe_tools` output
251
+ 3. AI agents can invoke skills by name (e.g., `skill: "pdf"`)
252
+ 4. The skill's content expands as a prompt providing specialized instructions
253
+
254
+ #### Precedence
255
+
256
+ When multiple paths are configured, skills from earlier paths take precedence over skills with the same name from later paths.
257
+
258
+ ### Prompt-Based Skills
259
+
260
+ You can also convert MCP server prompts into skills. This allows you to expose prompts from MCP servers as executable skills that AI agents can invoke.
261
+
262
+ #### Auto-Detection from Front-Matter (Recommended)
263
+
264
+ The easiest way to create prompt-based skills is to add YAML front-matter directly in your prompt content. one-mcp automatically detects prompts with `name` and `description` front-matter and exposes them as skills.
265
+
266
+ **Prompt content with front-matter:**
267
+ ```markdown
268
+ ---
269
+ name: code-reviewer
270
+ description: Review code for best practices and potential issues
271
+ ---
272
+
273
+ # Code Review Instructions
274
+
275
+ When reviewing code, follow these guidelines...
276
+ ```
277
+
278
+ MCP servers like `@agiflowai/scaffold-mcp` support the `--prompt-as-skill` flag to automatically add front-matter to prompts:
279
+
280
+ ```yaml
281
+ mcpServers:
282
+ scaffold-mcp:
283
+ command: npx
284
+ args:
285
+ - -y
286
+ - "@agiflowai/scaffold-mcp"
287
+ - "mcp-serve"
288
+ - "--prompt-as-skill" # Enables front-matter in prompts
289
+ ```
290
+
291
+ **Multi-line descriptions** are supported using YAML block scalars:
292
+
293
+ ```markdown
294
+ ---
295
+ name: complex-skill
296
+ description: |
297
+ A skill that does multiple things:
298
+ - First capability
299
+ - Second capability
300
+ - Third capability
301
+ ---
302
+ ```
303
+
304
+ #### Explicit Configuration (Alternative)
305
+
306
+ You can also explicitly configure which prompts should be exposed as skills:
307
+
308
+ ```yaml
309
+ mcpServers:
310
+ my-server:
311
+ command: npx
312
+ args:
313
+ - -y
314
+ - "@mycompany/mcp-server"
315
+ config:
316
+ instruction: "My MCP server"
317
+ prompts:
318
+ code-review:
319
+ skill:
320
+ name: code-reviewer
321
+ description: "Review code for best practices and potential issues"
322
+ folder: "./prompts/code-review" # Optional: resource folder
323
+ documentation:
324
+ skill:
325
+ name: doc-generator
326
+ description: "Generate documentation from code"
327
+ ```
328
+
329
+ #### How Prompt-Based Skills Work
330
+
331
+ 1. **Discovery**: one-mcp scans all prompts from connected servers for front-matter with `name` and `description`
332
+ 2. **Fallback**: Explicitly configured prompts (in `config.prompts`) take precedence over auto-detected ones
333
+ 3. **Invocation**: When an AI agent requests a prompt-based skill, one-mcp:
334
+ - Fetches the prompt content from the MCP server
335
+ - Returns the prompt messages as skill instructions
336
+ 4. **Execution**: The AI agent follows the skill instructions
337
+
338
+ #### Skill Configuration Fields (Explicit Config)
339
+
340
+ | Field | Required | Description |
341
+ |-------|----------|-------------|
342
+ | `name` | Yes | Unique skill identifier shown to AI agents |
343
+ | `description` | Yes | Brief description of what the skill does |
344
+ | `folder` | No | Optional folder path for skill resources |
345
+
346
+ #### Skill Naming and Precedence
347
+
348
+ - **File-based skills** take precedence over prompt-based skills with the same name
349
+ - Skills are only prefixed with `skill__` when they clash with MCP tool names
350
+ - Skills that only clash with other skills are deduplicated (first one wins, no prefix)
351
+
352
+ #### Example Use Case
353
+
354
+ Convert a complex prompt from an MCP server into a reusable skill:
355
+
356
+ ```yaml
357
+ mcpServers:
358
+ architect-mcp:
359
+ command: npx
360
+ args: ["-y", "@agiflowai/architect-mcp", "mcp-serve"]
361
+ config:
362
+ instruction: "Architecture and design patterns"
363
+ prompts:
364
+ design-review:
365
+ skill:
366
+ name: design-reviewer
367
+ description: "Review code architecture and suggest improvements"
368
+ ```
369
+
370
+ When the AI agent invokes `design-reviewer`, it receives the full prompt content from `architect-mcp`'s `design-review` prompt, enabling sophisticated code review capabilities.
371
+
195
372
  ---
196
373
 
197
374
  ## MCP Tools
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_http = require('./http-Q8LPwwwP.cjs');
2
+ const require_http = require('./http-B4NAfsQl.cjs');
3
3
  let node_fs_promises = require("node:fs/promises");
4
4
  let node_path = require("node:path");
5
5
  let liquidjs = require("liquidjs");
@@ -548,7 +548,7 @@ const initCommand = new commander.Command("init").description("Initialize MCP co
548
548
 
549
549
  //#endregion
550
550
  //#region package.json
551
- var version = "0.2.4";
551
+ var version = "0.2.6";
552
552
 
553
553
  //#endregion
554
554
  //#region src/cli.ts
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as findConfigFile, c as ConfigFetcherService, i as createServer, n as SseTransportHandler, o as SkillService, r as StdioTransportHandler, s as McpClientManagerService, t as HttpTransportHandler } from "./http-BKDyW8YB.mjs";
2
+ import { a as SkillService, c as ConfigFetcherService, i as createServer, n as SseTransportHandler, o as findConfigFile, r as StdioTransportHandler, s as McpClientManagerService, t as HttpTransportHandler } from "./http-DSkkpGJU.mjs";
3
3
  import { writeFile } from "node:fs/promises";
4
4
  import { resolve } from "node:path";
5
5
  import { Liquid } from "liquidjs";
@@ -548,7 +548,7 @@ const initCommand = new Command("init").description("Initialize MCP configuratio
548
548
 
549
549
  //#endregion
550
550
  //#region package.json
551
- var version = "0.2.4";
551
+ var version = "0.2.6";
552
552
 
553
553
  //#endregion
554
554
  //#region src/cli.ts