feat: return workspace skill directory from read_skill (#26713)

Workspace skills live on the workspace filesystem, and the agent's read_file
and execute tools already operate there. read_skill now returns "dir", the
absolute skill directory, for workspace skills, so the agent can read or run
bundled supporting files (for example a scripts/ helper) with the workspace
tools. The field is omitted for personal skills, which are database-backed and
have no files. read_skill_file is unchanged.

Generated with Coder Agents on behalf of @kylecarbs.
This commit is contained in:
Kyle Carberry
2026-06-25 12:05:54 -06:00
committed by GitHub
parent a1921b6bc0
commit 48fd0ef4bc
3 changed files with 38 additions and 4 deletions
+3
View File
@@ -351,8 +351,11 @@ func ReadSkill(options ReadSkillOptions) fantasy.AgentTool {
if ok {
return response, nil
}
// Include the absolute skill directory so the agent can
// reach supporting files with read_file and execute.
return toolResponse(map[string]any{
"name": args.Name,
"dir": content.Dir,
"body": content.Body,
"files": nonNilFiles(content.Files),
}), nil