Add load_skill tool to bypass workspace restriction for builtin skills
When restrictToWorkspace is enabled, the agent cannot read builtin skill files via read_file since they live outside the workspace. This adds a dedicated load_skill tool that reads skills by name through the SkillsLoader, which accesses files directly via Python without the workspace restriction. - Add LoadSkillTool to filesystem tools - Register it in the agent loop - Update system prompt to instruct agent to use load_skill instead of read_file - Remove raw filesystem paths from skills summary
This commit is contained in:
@@ -213,7 +213,7 @@ Stay focused on the assigned task. Your final response will be reported back to
|
||||
|
||||
skills_summary = SkillsLoader(self.workspace).build_skills_summary()
|
||||
if skills_summary:
|
||||
parts.append(f"## Skills\n\nRead SKILL.md with read_file to use a skill.\n\n{skills_summary}")
|
||||
parts.append(f"## Skills\n\nUse load_skill tool to load a skill by name.\n\n{skills_summary}")
|
||||
|
||||
return "\n\n".join(parts)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user