fix(claude): discover repo-local .agents/skills in skill discovery - #5488
fix(claude): discover repo-local .agents/skills in skill discovery#5488RoshanMhatre wants to merge 2 commits into
Conversation
Claude Code loads skills from the Agent Skills standard directory .agents/skills in addition to .claude/skills, but discoverClaudeSkills only scanned <config dir>/skills and <cwd>/.claude/skills, so repo-local .agents/skills never reached the provider snapshot or the picker. Add <cwd>/.agents/skills as a project-scoped root between the user root and <cwd>/.claude/skills, keeping last-write-wins collision handling so precedence is user < .agents < .claude. Fixes pingdotgg#5487
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved f13664d This PR adds a new skill discovery path ( You can customize Macroscope's approvability policy. Learn more. |
Fixes #5487.
What changed
discoverClaudeSkills(apps/server/src/provider/Drivers/ClaudeSkills.ts) now scans<cwd>/.agents/skillsin addition to<Claude config dir>/skillsand<cwd>/.claude/skills. The new root is project-scoped and sits between the existing two, keeping the existing last-write-wins map so collision precedence isuser < .agents < .claude— project beats user, and.claude/skillsbeats.agents/skillson a same-name collision. 5 lines of driver code; the rest is tests and a short doc note indocs/user/providers-claude.md.Why it should exist
Claude Code loads repo-local skills from
.agents/skills(the Agent Skills cross-tool standard directory) as well as.claude/skills, and the Codex app-server already reports.agents/skillsentries to T3. But T3's own Claude filesystem discovery only scanned.claude/skills, so.agents/skillsskills could never reach the provider snapshot or the$picker — even with a correct project cwd.Scope: deliberately Claude-only
The same user-visible symptom exists on Codex, but with a different root cause that is already tracked with a fix in flight: Codex discovery is delegated to
codex app-server(which does scan.agents/skills), and the failure there is the probe cwd — #3040, fix in #5335. This PR intentionally does not touch that. It is complementary to the cwd work (#5335, #4546): once those land, Claude's.agents/skillswould still be missing without this scan root, and with both, repo-local.agents/skillswork across providers.Testing
Three new cases:
.agents/skills-only discovery, three-way name collision (.claudewins), and.agents-vs-user collision (.agentswins).tsgo --noEmiton apps/server passes;vp lintandvp fmt --checkon the touched files are clean. No UI change (the picker consumes the snapshot as before), so no screenshots.Note
Low Risk
Small, localized change to skill path enumeration with tests; no auth, data, or UI behavior changes beyond listing more skills.
Overview
Claude skill discovery now includes the workspace
.agents/skillstree (Agent Skills standard), so those skills show up in the provider snapshot and$picker like Claude Code does.Scan order is user config
skills→.agents/skills→.claude/skills, with later roots winning on duplicate names (.claudestill beats.agents).User docs add a short “Where Claude Skills Are Loaded” section describing the three folders and collision rule. New tests cover
.agents-only discovery and two-way/three-way name collisions.Reviewed by Cursor Bugbot for commit 0714f1e. Bugbot is set up for automated code reviews on this repo. Configure here.