fix: load user-scope skills from ~/.claude/skills#55
Merged
Conversation
The Claude Agent SDK only scans skill directories for settingSources that are explicitly enabled. Phantom was passing ["project"] which ignored user-scope skills entirely. Flipping this to ["project", "user"] lets the agent load any SKILL.md the operator drops into the mounted phantom_claude volume on the next query() init, with no restart needed. Unblocks the skills editor surface planned for the Dashboard v2 work. Trivial, additive, no test impact.
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.
Summary
Flip
settingSourcesfrom["project"]to["project", "user"]insrc/agent/runtime.tsso the Claude Agent SDK scans user-scope skill directories on everyquery()init.Why
The SDK only reads
SKILL.mdfiles from directories whose scope is enabled viasettingSources. Phantom was only enabling project scope, which meant anySKILL.mddropped into~/.claude/skills/<name>/inside the container (on the persistent volume that survives rebuilds) was silently ignored. This one-character fix unblocks user-authored skills from being picked up by the next message the agent handles, with no restart, no rescan API, no other plumbing.Scope
src/agent/runtime.tsTest plan
bun test- 978 pass / 0 fail / 10 skipbun run lintcleanbun run typecheckcleanSKILL.mdinto the running container's user skill directory and verify it fires on the next message