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
+11 -4
View File
@@ -25,10 +25,17 @@ calls a tool.
Two tools are registered when skills are present:
| Tool | Parameters | Description |
|-------------------|----------------------------------|----------------------------------------------------------|
| `read_skill` | `name` (string) | Returns the SKILL.md body and a list of supporting files |
| `read_skill_file` | `name` (string), `path` (string) | Returns the content of a supporting file |
| Tool | Parameters | Description |
|-------------------|----------------------------------|------------------------------------------------------------------------------------------------------------|
| `read_skill` | `name` (string) | Returns the SKILL.md body, the absolute skill directory (workspace skills), and a list of supporting files |
| `read_skill_file` | `name` (string), `path` (string) | Returns the content of a supporting file |
For workspace skills, `read_skill` also returns `dir`, the absolute path to
the skill directory in the workspace. The agent's `read_file` and `execute`
tools operate on that same workspace filesystem, so you can join `dir` with a
supporting file's relative path to read or run that file directly, for example
to execute a bundled `scripts/` helper. `read_skill_file` remains available as
a path-safe convenience for reading supporting files.
### Directory structure