You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(skills): workers discover skills on demand via read_skill tool
Previously workers received a single skill's full content injected into
their system prompt at spawn time. This had two problems:
- Workers were locked into one skill chosen by the channel upfront
- Workers couldn't access skills they turned out to need mid-task
New approach (aligned with the design docs):
- Workers see the full skills listing (name + description) in their
system prompt, same as the channel
- Channel suggests relevant skills via suggested_skills=[...] on
spawn_worker — these are flagged in the listing but not mandatory
- Workers call the new read_skill tool to fetch the full content of
any skill they decide is relevant — including ones not suggested
- read_skill reads from the in-memory SkillSet (not the file tool),
so the workspace boundary is never involved
Changes:
- src/tools/read_skill.rs: new ReadSkillTool, scoped to SkillSet
- src/tools.rs: register ReadSkillTool in create_worker_tool_server
- src/skills.rs: replace render_worker_prompt with render_worker_skills,
takes suggested names and builds listing with suggested flag
- src/prompts/engine.rs: render_skills_worker now takes Vec<SkillInfo>
with suggested field; SkillInfo gains suggested: bool
- src/agent/channel.rs: spawn_worker_from_state takes suggested_skills
&[&str] instead of skill_name Option<&str>
- src/tools/spawn_worker.rs: skill: Option<String> ->
suggested_skills: Vec<String>
- prompts/en/fragments/skills_worker.md.j2: rewritten — listing with
suggestions flagged, instruction to call read_skill before starting
- prompts/en/fragments/skills_channel.md.j2: updated example to use
suggested_skills=[...]
You have access to the following skills. Skills contain specialized instructions for specific tasks. When a user's request matches a skill, spawn a worker to handle it and include the skill name in the task description so the worker knows which skill to follow.
3
+
You have access to the following skills. When a user's request matches one or more skills, spawn a worker and pass the relevant skill names as `suggested_skills`. The worker will read the skills it needs automatically.
4
4
5
-
To use a skill, spawn a worker with a task like: "Use the [skill-name] skill to [task]. Read the skill instructions at [path] first."
5
+
Example: `spawn_worker(task="Generate a 30-second downtempo track.", suggested_skills=["generate_music"])`
6
+
7
+
You may suggest multiple skills if the task spans more than one: `suggested_skills=["github", "coding-agent"]`
You are executing the **{{ skill_name }}** skill. Follow these instructions:
3
+
You have access to the following skills. Before starting your task, scan the list and call `read_skill` for any skill that is relevant — you may read more than one.
4
4
5
-
{{ skill_content }}
5
+
Skills marked as **suggested** were recommended by the channel for this specific task. Read those first, then decide if any others apply.
0 commit comments