feat(agent/agentcontextconfig): discover skills from ~/.coder/skills#25271
Merged
mafredri merged 1 commit intoMay 13, 2026
Merged
Conversation
The default skills lookup only scanned the project-relative .agents/skills directory, so personal skills had to be repeated per project or wired in via CODER_AGENT_EXP_SKILLS_DIRS. Now the default is the comma-separated list ~/.coder/skills,.agents/skills, which lets discoverSkills's existing first-occurrence-wins policy prefer home-scoped skills over project ones with the same name. The change is additive when ~/.coder/skills is absent (missing directories are silently skipped in discoverSkills) and unaffects users who set the env var explicitly. Closes CODAGT-403.
b18bd21 to
1cda7e5
Compare
johnstcn
approved these changes
May 13, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds
~/.coder/skillsto the agent's default skills discovery list so personal skills work across every workspace without per-project setup. Closes CODAGT-403.Change
DefaultSkillsDirinagent/agentcontextconfig/api.gois now"~/.coder/skills,.agents/skills"instead of".agents/skills". The existingResolvePaths(comma-split) anddiscoverSkills(first-occurrence-wins per skill name) machinery handles the rest: home-scoped skills override project-scoped ones with the same name.Back-compat
~/.coder/skillsdirectory see no change.discoverSkillssilently skips missing directories.CODER_AGENT_EXP_SKILLS_DIRSare unaffected. The env var fully overrides the default.DefaultSkillsDiris exported, but the package is experimental (CODER_AGENT_EXP_*). Keeping the constant name singular avoids a breaking rename.Tests
Three subtests added to
TestResolveinagent/agentcontextconfig/api_test.go:DefaultDiscoversHomeAndProjectSkills— both dirs populated, both skills surface.DefaultHomeSkillsOverrideProjectSkills— same skill name in both, home wins.DefaultSkipsMissingHomeSkillsDir— only project skill exists, default still works.Out of scope
CLAUDE.md/ instruction-file alias fallback (tracked separately in CODAGT-338).Pre-push opt-out
pre-pushwas disabled viagit config coder.pre-push falsebecausetest-storybookconsistently fails onsrc/pages/UsersPage/UsersPage.stories.tsx > Update User Role Error(Radix UIpointer-events: noneflake) on this workspace, and this PR is Go-only with zerosite/changes. CI is the source of truth.PR authored by Coder Agents on behalf of @mafredri.