refactor: centralize skills prompt resolution

This commit is contained in:
Peter Steinberger
2026-01-09 21:27:11 +01:00
parent cf8d7139e1
commit 24605379b9
7 changed files with 78 additions and 62 deletions

View File

@@ -15,7 +15,7 @@ The prompt is assembled by Clawdbot and injected into each agent run.
The prompt is intentionally compact and uses fixed sections:
- **Tooling**: current tool list + short descriptions.
- **Skills**: tells the model how to load skill instructions on demand.
- **Skills** (when available): tells the model how to load skill instructions on demand.
- **Clawdbot Self-Update**: how to run `config.apply` and `update.run`.
- **Workspace**: working directory (`agents.defaults.workspace`).
- **Workspace Files (injected)**: indicates bootstrap files are included below.
@@ -52,7 +52,8 @@ Use `agents.defaults.userTimezone` in `~/.clawdbot/clawdbot.json` to change the
When eligible skills exist, Clawdbot injects a compact **available skills list**
(`formatSkillsForPrompt`) that includes the **file path** for each skill. The
prompt instructs the model to use `read` to load the SKILL.md at the listed
location (workspace, managed, or bundled).
location (workspace, managed, or bundled). If no skills are eligible, the
Skills section is omitted.
```
<available_skills>