mirror of
https://github.com/coder/coder.git
synced 2026-09-21 12:44:32 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user