feat: 更新技能管理工具文档,明确技能创建和修改的正确流程及存储路径

This commit is contained in:
ooodc 2026-05-23 21:12:39 +08:00
parent b6f2de053d
commit f68e915b04
2 changed files with 22 additions and 5 deletions

View File

@ -71,7 +71,21 @@
- 如果任务涉及文件、命令、配置或下一步操作,优先给出最关键的那部分。 - 如果任务涉及文件、命令、配置或下一步操作,优先给出最关键的那部分。
## PICO配置 ## PICO配置
- Skill安装在[basedir]/skills
### 技能系统
- **技能存储路径**:
- 项目级: `{project-root}/.picobot/skills/{skill-name}/SKILL.md`
- 用户级: `~/.picobot/skills/{skill-name}/SKILL.md`
- **创建/修改技能**:
- 必须使用 `skill_manage` 工具的 `create``update` action
- 不要使用 `write` 工具直接写入技能文件
- `skill_manage` 会自动创建正确的目录结构
- **使用技能**:
- Skill 不是工具名,不能直接调用
- 必须先调用 `skill_activate` 工具激活技能,再按指令执行
## 补充要求 ## 补充要求

View File

@ -24,15 +24,18 @@ impl Tool for SkillManageTool {
fn description(&self) -> &str { fn description(&self) -> &str {
"Manage PicoBot skills. Actions: list, get, create, update, delete, disable, reload.\n\n\ "Manage PicoBot skills. Actions: list, get, create, update, delete, disable, reload.\n\n\
IMPORTANT: To create or modify skills, ALWAYS use this tool (skill_manage), NOT the write tool.\n\n\
Skill Structure:\n\ Skill Structure:\n\
- Folder name: kebab-case (lowercase with hyphens, e.g., 'my-cool-skill')\n\ - Folder name: kebab-case (lowercase with hyphens, e.g., 'my-cool-skill')\n\
- Required: SKILL.md with YAML frontmatter + Markdown body\n\ - Required: SKILL.md with YAML frontmatter + Markdown body\n\
- Optional folders: scripts/, references/, assets/\n\ - Optional folders: scripts/, references/, assets/\n\
- Storage: .picobot/skills/{name}/SKILL.md or ~/.picobot/skills/{name}/SKILL.md\n\n\ - Storage paths (created automatically by this tool):\n\
- Project scope: {current-dir}/.picobot/skills/{name}/SKILL.md\n\
- User scope: ~/.picobot/skills/{name}/SKILL.md\n\n\
Installing from Zip:\n\ Installing from Zip:\n\
- Extract skill folders to skills/ directory\n\ - Extract skill folders to .picobot/skills/ directory (NOT skills/)\n\
- If zip contains multiple skills, extract each subfolder separately\n\ - If zip contains multiple skills, extract each subfolder separately\n\
- Final structure: skills/{skill-name}/SKILL.md" - Final structure: .picobot/skills/{skill-name}/SKILL.md"
} }
fn parameters_schema(&self) -> serde_json::Value { fn parameters_schema(&self) -> serde_json::Value {
@ -51,7 +54,7 @@ impl Tool for SkillManageTool {
}, },
"name": { "name": {
"type": "string", "type": "string",
"description": "Skill folder name in kebab-case (e.g., 'my-cool-skill', 'code-review'). Must match the folder name under .picobot/skills/ or ~/.picobot/skills/" "description": "Skill folder name in kebab-case (e.g., 'my-cool-skill', 'code-review'). The skill_manage tool automatically creates files at .picobot/skills/{name}/SKILL.md (project scope) or ~/.picobot/skills/{name}/SKILL.md (user scope)."
}, },
"names": { "names": {
"type": "array", "type": "array",