skills array. Keystroke materializes the attached skills into the agent’s workspace before each prompt runs.
Attach by folder name
Theskills option on defineAgent() takes the folder names of skills under src/skills/:
src/agents/support.ts
skills: ["support"], Keystroke expects a folder at src/skills/support/ with a SKILL.md. If no such folder exists, the agent fails to build with an “unknown skill” error; the name and the folder must match.
Attach more than one
List as many skills as the agent needs:Where skills land at runtime
Attached skills are written into the agent’s workspace at/workspace/agent/skills/{slug}/ before the prompt runs. The agent reads them like local files, opening SKILL.md first and pulling in references/ on demand. Seeding is idempotent: the files are written once per session and the agent’s own edits during a run are preserved.
Because skills live under /workspace, you can reference them from the systemPrompt by path if you want to be explicit:
Skills and files together
An agent can use both skills and files. Skills give it instructions it loads on demand; files give it context documents to read. A typical support agent uses both:Next steps
Create skills
Write a SKILL.md with clear task guidance.
Attach files to agents
Add static context documents alongside skills.
Build agents
Configure models, tools, skills, and files.
Import skills
Reuse skills from external registries.