Skip to main content

Function: loadSkillFromDir()

loadSkillFromDir(skillDir): Promise<SkillEntry | null>

Defined in: packages/agentos/src/cognition/skills/SkillLoader.ts:201

Load a single skill from a directory.

SKILL.md is read below the folder that holds skillDir, so the skill's own folder is looked at too: never through a symbolic link at that folder or below it, never waiting, and only when it is a regular file (readFileOutsideLinks). A SKILL.md refused that way, or one that cannot be loaded, is skipped with a warning.

Parameters​

skillDir​

string

Path to skill directory (should contain SKILL.md). It may not be a symbolic link; the folder that holds it may.

Returns​

Promise<SkillEntry | null>

SkillEntry, or null when the folder holds no SKILL.md or its SKILL.md was skipped