mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-17 14:17:28 +08:00
align skill selection protocol with openclaw behavior
This commit is contained in:
@@ -107,12 +107,18 @@ func (cb *ContextBuilder) BuildSystemPrompt() string {
|
|||||||
parts = append(parts, bootstrapContent)
|
parts = append(parts, bootstrapContent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skills - show summary, AI can read full content with read_file tool
|
// Skills - OpenClaw-aligned selection protocol + available skill catalog
|
||||||
skillsSummary := cb.skillsLoader.BuildSkillsSummary()
|
skillsSummary := cb.skillsLoader.BuildSkillsSummary()
|
||||||
if skillsSummary != "" {
|
if skillsSummary != "" {
|
||||||
parts = append(parts, fmt.Sprintf(`# Skills
|
parts = append(parts, fmt.Sprintf(`# Skills (mandatory protocol)
|
||||||
|
|
||||||
The following skills extend your capabilities. To use a skill, read its SKILL.md file using the read_file tool.
|
Before replying: scan <skill><description> entries in <skills>.
|
||||||
|
- If exactly one skill clearly applies: read its SKILL.md (via read tool) and follow it.
|
||||||
|
- If multiple could apply: choose the most specific one, then read/follow it.
|
||||||
|
- If none clearly apply: do not read any SKILL.md.
|
||||||
|
Constraints:
|
||||||
|
- Never read more than one skill up front.
|
||||||
|
- If SKILL.md references relative paths, resolve against the skill directory.
|
||||||
|
|
||||||
%s`, skillsSummary))
|
%s`, skillsSummary))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user