Options for the skills middleware.
interface SkillsMiddlewareOptionsBackend instance or factory function for file operations. Use a factory for StateBackend since it requires runtime state.
Tools the model sees only after a skill that lists them in its SKILL.md
frontmatter, as a space-separated metadata.include_tools, is read or
pinned.
Pass an array of tools, or a SkillToolResolver that looks up the
tools one include_tools name stands for when a skill is read or pinned.
Unlike other middleware's tools, these are never registered with the
agent: see createSkillsMiddleware for how they are disclosed and
gated.
List of skill source paths to load. Paths must use POSIX conventions (forward slashes). Later sources override earlier ones for skills with the same name (last one wins).
Two formats are accepted for each entry:
Parent directory (e.g. "/skills/", "/skills/user/"): the directory
is scanned and every subdirectory that contains a SKILL.md is loaded as
a separate skill.
Direct skill path (e.g. "/skills/my-skill/"): the path points to a
single skill directory whose SKILL.md lives at its root. Detected
automatically when the directory listing contains a SKILL.md file.
Both formats can be mixed in the same array:
sources: [
"/skills/", // loads all skills in the directory
"/skills/my-skill/", // loads a single skill by path
]