Skip to main content

Class Definition

Properties

Overridable Methods

Both methods below have default implementations that throw SkillContextNotImplementedError. Under the normal @Skill pipeline the runtime drives loading via SkillInstance against the decorator metadata, so these methods are never invoked on your class — overriding them is optional. This is what makes class MySkill extends SkillContext {} (no body) compile under strict TypeScript.Override these methods only when you construct a SkillContext subclass manually outside the @Skill decorator pipeline and need bespoke loading/assembly logic. The detailed examples below show that advanced pattern.

loadInstructions()

Load skill instructions from the configured source.
Default behaviour: throws SkillContextNotImplementedError. The runtime calls SkillInstance.loadInstructions() (not this method) under the @Skill pipeline, resolving:
  • Inline string
  • File reference ({ file: './path.md' })
  • URL reference ({ url: 'https://...' })

build()

Build the complete skill content.
Default behaviour: throws SkillContextNotImplementedError. The runtime calls SkillInstance.load() (not this method) under the @Skill pipeline.

Minimal Example

That’s enough. The runtime resolves instructions, resources, and tool references from the decorator metadata for you.

SkillContent Interface

Methods

getToolRefs()

Get normalized tool references from metadata.

getToolNames()

Get tool names from metadata.

Basic Example

File-Based Instructions

URL-Based Instructions

With Parameters and Examples

Full Example

@Skill

Skill decorator

SkillRegistry

Skill registry

Skills Overview

Skills documentation

@Tool

Tool decorator