Documentation
¶
Overview ¶
Package skill 解析通用 Agent Skills 格式(SKILL.md),按目录优先级生成去重、排序的 skill 目录, 显式引用时由 Session 读取正文;模型也可按 Path 用通用工具读取。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Skill ¶
type Skill struct {
Name string
Description string
// Path 是 SKILL.md 在所在 Executor 文件系统中的绝对路径;记录扫描时的路径,不解析符号链接。
// 例如本机 skill 为 /home/me/.claude/skills/pdf/SKILL.md,openvaala 内置 skill 为 /skills/openvaala/SKILL.md。
Path string
// Executor 是 SKILL.md 所在的 Executor,例如内置 skill 为 "openvaala"。
Executor string
// contains filtered or unexported fields
}
Skill 是可供 Agent 选用的目录项,保存来源工作区供接受 slash 引用时读取正文。
func GetSkillsByNames ¶
GetSkillsByNames 按目录顺序选择指定名称的 Skill。
func LoadSkills ¶
func LoadSkills(ctx context.Context, directories []SkillDirectory) ([]*Skill, error)
LoadSkills 扫描并加载 Skill 目录。
type SkillDirectory ¶
type SkillDirectory struct {
Workspace workspace.Workspace
ExecutorID string
Path string
Strict bool
// NamePrefix 加在目录里每个 skill 名前面:插件目录为 "<插件名>:",其他目录为空。
NamePrefix string
}
SkillDirectory 指向递归包含多个技能的目录,或直接包含 SKILL.md 的单个技能目录,经 Workspace 读取。 ExecutorID 是目录所在的 Executor,写入这个目录里每个 Skill 的 Executor;Strict 为 true 时目录读不了或 skill 格式错误会让加载失败,否则跳过。
Click to show internal directories.
Click to hide internal directories.