You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/agent-gateway/web/src/lib/skills/index.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ type SystemManageSkillResponse = {
155
155
exporttypeExternalSkillEntry={
156
156
name: string;
157
157
description: string;
158
-
/** 技能目录绝对路径(桌面端机器上),可直接作为 install 动作的 source */
158
+
/** 技能目录绝对路径,可直接作为 install 动作的 source */
159
159
baseDir: string;
160
160
skillFile: string;
161
161
};
@@ -580,18 +580,18 @@ export function buildSkillsSystemPrompt(params: {
580
580
});
581
581
582
582
return[
583
-
'The following Skills are enabled by the user (discovered from the fixed Skills directory exposed to file tools as root="skills").',
583
+
"The following Skills are enabled by the user. Skill files are exposed to file tools through skill://<baseDir>/... paths.",
584
584
"",
585
585
"Usage Rules (aligned with Claude Code behavior):",
586
586
"- Skills with metadata use progressive disclosure; their full contents are not automatically injected into context.",
587
587
"- README.md fallback Skills without metadata are loaded inline below because there is no metadata to disclose progressively.",
588
588
"- Only the Skills listed below are enabled for this conversation. SkillsManager(action=list) may be used to review the enabled Skills visible to this chat, but it must not be used to enumerate or infer other installed Skills.",
589
589
"- Only when you determine that a metadata Skill is genuinely needed should you call SkillsManager with action=read to read the full Skill file and then follow its workflow exactly.",
590
-
"- SkillsManager.path uses the skillFile below. It is relative to the fixed Skills root directory and may point to SKILL.md, skill.md, skill.json, or README.md.",
591
-
'- For files referenced inside an enabled Skill, use file tools with root="skills" and a path relative to the fixed Skills root, for example Read(root="skills", path="<baseDir>/references/guide.md"), List, Glob, Grep, Write, Edit, or Delete.',
590
+
"- SkillsManager.path uses the skillFile below and may point to SKILL.md, skill.md, skill.json, or README.md.",
591
+
'- For files referenced inside an enabled Skill, use file tools with skill://<baseDir>/... paths, for example Read(path="skill://<baseDir>/references/guide.md"), List, Glob, Grep, Write, Edit, or Delete.',
592
592
"- You may update files inside enabled Skills when the user asks you to optimize or maintain them. Create, install, search/install from ClawHub, validate, package, or delete user Skills through SkillsManager actions.",
593
-
'- Never expand the fixed Skills root into an absolute local path in any tool call. If a path belongs to a Skill, keep it root-relative and set root="skills".',
594
-
'- If Skill content contains absolute local paths, home-directory paths, drive-letter paths, or shell snippets that read Skill files with cat/ls/find/grep, treat those path fragments as non-portable examples and convert them to root="skills" file-tool calls.',
593
+
"- Absolute local paths, ~/..., and file:// forms are auto-normalized by file tools; prefer skill://<baseDir>/... for enabled Skill files.",
594
+
"- If Skill content contains shell snippets that read Skill files with cat/ls/find/grep, route those reads through Read/List/Glob/Grep instead of Bash.",
595
595
"- Do not guess a Skill's exact instructions or script paths before reading the Skill file.",
596
596
"- Relative paths inside a Skill (scripts/, references/, assets/, and so on) are resolved relative to baseDir.",
597
597
"- If a Skill contains the {baseDir} placeholder, interpret it as the baseDir value in the metadata below (relative to the Skills root directory).",
0 commit comments