skills key of a schema’s main export. Each skill is stored as a separate .mjs file alongside the schema.
Skills are optional. Most schemas only need tools. Add skills when your schema has tools that work together in a predictable workflow that benefits from step-by-step guidance.
When to Use Skills
| Use Case | Skill Needed? |
|---|---|
| Single tool call (get price, check status) | No |
| Multi-step workflow (fetch data, transform, report) | Yes |
| Common combination of tools that agents should know about | Yes |
| Simple tool with clear description | No |
- Multiple tools from the schema work together in a specific sequence
- The workflow requires context about how to interpret intermediate results
- AI agents would benefit from structured guidance on tool composition
Schema Declaration
Skills are referenced in themain export’s skills array:
Skill Reference Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Skill identifier. Must match ^[a-z][a-z0-9-]*$ (lowercase, hyphens). |
file | string | Yes | Path to the .mjs skill file, relative to the schema. Must end in .mjs. |
description | string | Yes | What this skill does. Visible to AI clients. |
Skill File Format
Each skill is a.mjs file that exports a skill object:
Skill Object Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Must match the name in the schema’s skills array entry. |
version | string | Yes | Must be 'flowmcp-skill/1.0.0'. |
description | string | Yes | What this skill does. |
requires | object | Yes | Dependencies: tools, resources, and external arrays. |
input | array | No | User-provided input parameters. |
output | string | No | Description of what the skill produces. |
content | string | Yes | The instruction text with placeholders. |
requires Object
| Field | Type | Description |
|---|---|---|
tools | string[] | Tool names from the schema that this skill uses. Must match tool names in main.tools. |
resources | string[] | Resource names from the schema that this skill uses. Must match names in main.resources. |
external | string[] | External capabilities not provided by the schema (for documentation purposes). |
input Array
Each input parameter:
| Field | Type | Description |
|---|---|---|
key | string | Parameter name (camelCase). Referenced in content as {{input:key}}. |
type | string | Must be string, number, or boolean. |
description | string | What this input parameter is for. |
required | boolean | Whether the user must provide this value. |
Placeholder System
Thecontent field supports four types of placeholders:
| Placeholder | Syntax | Resolves To | Example |
|---|---|---|---|
| Tool reference | {{tool:name}} | Tool name from requires.tools | {{tool:getContractAbi}} |
| Resource reference | {{resource:name}} | Resource name from requires.resources | {{resource:verifiedContracts}} |
| Skill reference | {{skill:name}} | Another skill in the same schema | {{skill:quick-check}} |
| Input reference | {{input:key}} | User-provided input value | {{input:address}} |
Placeholder Rules
{{tool:x}}—xshould be listed inrequires.tools{{resource:x}}—xshould be listed inrequires.resources{{skill:x}}—xmust reference another skill in the same schema (no circular references){{input:x}}—xshould match aninput[].key
{{skill:x}} which must resolve.
Versioning
All skills use the version string'flowmcp-skill/1.0.0'. This version identifies the skill format, not the skill’s content version. When the skill format changes, this version will be updated.
Constraints
| Constraint | Value | Rationale |
|---|---|---|
| Max skills per schema | 4 | Skills compose tools; keep schemas focused |
| Skill name pattern | ^[a-z][a-z0-9-]*$ | Lowercase with hyphens |
| Skill file extension | .mjs | ES module format |
| Version | flowmcp-skill/1.0.0 | Fixed for v3.0.0 |
| Content | Non-empty string | Must contain instructions |
| No circular references | Via {{skill:x}} | Prevents infinite loops |
Complete Example
A schema with tools, a resource, and a skill:full-contract-audit.mjs):
Validation Rules
Skills are validated by rules SKL001-SKL025. Key rules include:| Code | Rule |
|---|---|
| SKL002 | Maximum 4 skills per schema |
| SKL005 | Skill file must end in .mjs |
| SKL008 | skill.name must match the name in main.skills entry |
| SKL009 | Version must be 'flowmcp-skill/1.0.0' |
| SKL013 | requires.tools entries must match tool names in schema |
| SKL014 | requires.resources entries must match resource names in schema |
| SKL025 | No circular skill references via {{skill:x}} placeholders |
Group-Level Skills vs Schema-Level Skills
FlowMCP has two types of skills:| Type | Location | Format | Purpose |
|---|---|---|---|
| Schema-level | .mjs files alongside schema | export const skill object | Distributed with the schema, composing that schema’s tools |
| Group-level | .md files in .flowmcp/skills/ | Markdown with sections | Project-specific workflows across multiple schemas |