Basic Usage
The class body is optional. When you use
@Skill, the runtime loads
instructions (and resources) from the decorator metadata via
SkillInstance, so loadInstructions() and build() on your class are
never invoked — you only need to override them if you construct a
SkillContext subclass manually outside the decorator pipeline. See
Advanced: overriding loadInstructions / build.Advanced: overriding loadInstructions / build
You only need to override these methods when you bypass the@Skill
decorator and want to drive loading yourself. Otherwise, leave the body
empty — the runtime does the work for you.
Signature
Configuration Options
Required Properties
| Property | Type | Constraints | Description |
|---|---|---|---|
name | string | kebab-case, 1-64 chars, no -- | Unique skill identifier |
description | string | 1-1024 chars, non-empty | Skill description |
instructions | string | { file: string } | { url: string } | Skill instructions |
Optional Properties
| Property | Type | Description |
|---|---|---|
tools | SkillToolInput[] | Tools used by the skill |
id | string | Stable identifier (defaults to name) |
parameters | SkillParameter[] | Input parameters |
examples | SkillExample[] | Usage examples |
tags | string[] | Categorization tags |
priority | number | Search ranking weight (default: 0) |
hideFromDiscovery | boolean | Hide from search results (default: false) |
visibility | 'mcp' | 'http' | 'both' | Discovery visibility (default: 'both') |
toolValidation | 'strict' | 'warn' | 'ignore' | Tool reference validation mode (default: 'warn') |
Agent Skills Spec Properties
These properties align with the Anthropic Agent Skills specification:| Property | Type | Description |
|---|---|---|
license | string | License name or reference (e.g. 'MIT', 'Apache-2.0') |
compatibility | string | Environment requirements (max 500 chars) |
specMetadata | Record<string, string> | Arbitrary key-value metadata (maps to spec metadata) |
allowedTools | string | Space-delimited pre-approved tools (maps to spec allowed-tools) |
resources | SkillResources | Bundled resource directories (scripts, references, examples, assets) |
Instruction Sources
Inline String
File Reference
File path resolution. Relative paths in
instructions: { file: '…' },
resources.references, and resources.examples resolve against the
directory of the source file that declared the @Skill class — not
process.cwd(). The directory is captured at decoration time by walking
the call stack, and the same rule applies to the inline skill() helper.
For bundled CLIs the framework additionally falls back to the build-time
_skills/manifest.json so paths keep resolving after frontmcp build.URL Reference
Tool References
By Name
By Class
With Purpose
With Class and Purpose
Parameters
Define input parameters for skills:Examples
Provide usage examples:Function-Based Alternative
Skill Content Output
Skills build toSkillContent:
Skill Validation
Skills are validated on server startup. Validation strictness is configured per skill via thetoolValidation field on @Skill:
- strict: Fail if skill references missing tools
- warn (default): Log warnings but continue
- ignore: Skip tool validation
Skill Sessions
Skills can be loaded into sessions for focused tool access:Full Example
SKILL.md Files
Load skills from SKILL.md files with YAML frontmatter (per Agent Skills spec):Loading SKILL.md Files
Skill Directories
Load entire skill directories with theskillDir() helper:
Agent Skills Spec Example
A fully spec-compliant skill:Related
SkillContext
Context class details
SkillRegistry
Skill registry API
@Tool
Define tools
Skills Overview
Skills documentation