Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

MergedRoshanMhatre(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5488/headmerged by juliusmarminge View on GitHub

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 scanning and merge order; behavior is covered by new tests and does not touch auth or data handling.

Overview Claude skill discovery now includes the workspace .agents/skills tree (Agent Skills layout) so repo-local skills show up in the provider snapshot and $ picker, not only .claude/skills.

Scan order is user config skills → .agents/skills → .claude/skills, with later roots winning on same name (user < .agents < .claude). Comments and user docs describe that precedence.

Three tests cover .agents-only discovery and two- and three-way name collisions; no UI changes.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 40778e6b862151fbe5b1647190071dfbdb22e9c7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add <workspace>/.agents/skills to Claude skill discovery with precedence ordering

  • discoverClaudeSkills now scans three roots in order: user config skills, <cwd>/.agents/skills, then <cwd>/.claude/skills, with later roots winning on name collisions.
  • Skills are accumulated into a Map by name, so .claude project skills override .agents project skills, which override user skills.
  • New tests cover discovery from <workspace>/.agents/skills and verify all three precedence tiers.
  • providers-claude.md documents the updated lookup order.
Macroscope summarized 40778e6.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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: 58401630-9ae2-40d4-b891-e5453cf542c4

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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.

      No code changes detected at 40778e6. Prior analysis still applies.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged thisad47d23

    5. juliusmarminge closed this

Sign in to join this conversation.