Skip to content

fix(claude): discover repo-local .agents/skills in skill discovery - #5488

Open
RoshanMhatre wants to merge 2 commits into
pingdotgg:mainfrom
RoshanMhatre:fix/claude-agents-skills-discovery
Open

fix(claude): discover repo-local .agents/skills in skill discovery#5488
RoshanMhatre wants to merge 2 commits into
pingdotgg:mainfrom
RoshanMhatre:fix/claude-agents-skills-discovery

Conversation

@RoshanMhatre

@RoshanMhatre RoshanMhatre commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #5487.

What changed

discoverClaudeSkills (apps/server/src/provider/Drivers/ClaudeSkills.ts) now scans <cwd>/.agents/skills in addition to <Claude config dir>/skills and <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 is user < .agents < .claude — project beats user, and .claude/skills beats .agents/skills on a same-name collision. 5 lines of driver code; the rest is tests and a short doc note in docs/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/skills entries to T3. But T3's own Claude filesystem discovery only scanned .claude/skills, so .agents/skills skills 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/skills would still be missing without this scan root, and with both, repo-local .agents/skills work across providers.

Testing

$ vp test run src/provider/Drivers/ClaudeSkills.test.ts   # apps/server
Test Files  1 passed (1)
     Tests  9 passed (9)

Three new cases: .agents/skills-only discovery, three-way name collision (.claude wins), and .agents-vs-user collision (.agents wins). tsgo --noEmit on apps/server passes; vp lint and vp fmt --check on 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/skills tree (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 (.claude still 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.

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
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f15c758-97b5-4852-8ad9-8d1306e4e380

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 6, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved f13664d

This PR adds a new skill discovery path (.agents/skills) using the same pattern as the existing .claude/skills discovery. The implementation is a 5-line addition to an existing array, with comprehensive tests covering collision scenarios. Low-risk additive change.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Skill discovery never scans repo-local .agents/skills (Agent Skills standard dir)

1 participant