2.1 KiB
2.1 KiB
Skills System
Skills are reusable capability packages that extend what the agent can do without modifying the core source code.
Structure
skills/
index.md ← registry of all available skills
<skill-name>/
SKILL.md ← documentation: purpose, usage, script API
<script>.py ← one or more Python scripts
How the agent uses skills
skills/index.mdis injected into the agent's system prompt automatically as a<skills_index>block, so every agent discovers available skills without reading it explicitly. Controlled by theinject_skillsmeta.json flag (defaulttrue; see agents.md) — set it tofalsefor background agents that don't need skills. The block is skipped silently when no skills are installed.- It reads the relevant
SKILL.mdto understand how to invoke the script. - It runs the script via a shell command (e.g.
python3 skills/pdf/scripts/...). - It uses the script's stdout as the result.
Path note: the injected
<skills_index>shows the index path relative to the session's working directory when it lives under it, absolute otherwise. In a project chat (working directory = project root) it shows as absolute, since skills live under Skald's own cwd. Invoking a skill from a project session still needs care —execute_cmdruns with the project working directory, so scripts referenced cwd-relative (python3 skills/...) won't resolve; use an absolute path orcdto Skald's root.
Adding a skill
- Create
skills/<name>/SKILL.md— document purpose, required inputs, expected output, and example invocation. - Add the Python script(s) alongside it.
- Register the skill in
skills/index.mdby adding a row to the table.
No code changes or restarts are required — the agent discovers skills at runtime by reading the index.
Conventions
- Scripts must be runnable with
python3and accept arguments from the command line. - Scripts should write their result to stdout and errors to stderr, exiting with code
0on success. - Keep each script focused on one task. Compose multiple skills via the agent, not within a single script.