14.2 Skill 加载流程
14.2.1 Skill.dirs()——搜索路径构建
// skill/skill.ts
export async function dirs() {
return state().then((x) => x.dirs)
}const addSkill = async (match: string) => {
const md = await ConfigMarkdown.parse(match)
// ... 解析和验证 ...
dirs.add(path.dirname(match)) // 记录目录
skills[parsed.data.name] = { /* ... */ }
}14.2.2 SkillTool——通过工具加载 Skill 到上下文
14.2.3 Skill 与 Agent Prompt 的关系
14.2.4 Skill 查询 API
消费者
使用的 API
用途
14.2.5 小结
Last updated
