Skip to content

Documentation / @agentick/core / loadSkill

Function: loadSkill()

loadSkill<TInput>(path, opts?): Promise<SkillDef<TInput>>

Defined in: core/src/skill/loader.ts:81

Load a skill from disk.

If path is a directory, reads <path>/SKILL.md. If path ends with .md, reads it as a single-file skill (convenience).

Type Parameters

TInput

TInput = unknown

Parameters

path

string

opts?

LoadSkillOptions<TInput> = {}

Returns

Promise<SkillDef<TInput>>

Examples

typescript
const Triage = await loadSkill("./skills/triage");
// reads ./skills/triage/SKILL.md
typescript
const Inline = await loadSkill("./inline-skill.md");

Released under the ISC License.