Skip to main content

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

Optional Properties

Agent Skills Spec Properties

These properties align with the Anthropic Agent Skills specification:

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 to SkillContent:

Skill Validation

Skills are validated on server startup. Validation strictness is configured per skill via the toolValidation 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 the skillDir() helper:
Expected directory structure:

Agent Skills Spec Example

A fully spec-compliant skill:

SkillContext

Context class details

SkillRegistry

Skill registry API

@Tool

Define tools

Skills Overview

Skills documentation