feat(skills): workers discover skills on demand via read_skill tool#172
Merged
jamiepine merged 1 commit intospacedriveapp:mainfrom Feb 23, 2026
Merged
Conversation
0bd0a1f to
e12d666
Compare
44a3bb4 to
0f7f6bf
Compare
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=[...]
0f7f6bf to
6d4a68e
Compare
jamiepine
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously workers received a single skill's full content injected into their system prompt at spawn time (
skill="name"onspawn_worker). Two problems with that approach:This replaces the
skill: Option<String>parameter withsuggested_skills: Vec<String>and adds aread_skilltool available to all workers. Workers now:read_skill("name")to fetch the full content of any skill on demandThe
read_skilltool reads directly fromRuntimeConfig.skills(the in-memory ArcSwap), so it works within the worker's existing security boundary without needing file access.