Skip to content

fix: Claude Code skills discoverable for the composer $ picker#4414

Merged
t3dotgg merged 5 commits into
mainfrom
claude-skill-discovery
Jul 24, 2026
Merged

fix: Claude Code skills discoverable for the composer $ picker#4414
t3dotgg merged 5 commits into
mainfrom
claude-skill-discovery

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problem

The composer's $ skill selector only worked for Codex. The Codex driver populates the provider snapshot's skills array via the app-server's skills/list RPC, but the Claude provider never set skills at all, so buildServerProvider defaulted it to [] and the composer always showed "No skills found. Try / to browse provider commands."

Fix

Add filesystem skill discovery to the Claude provider, mirroring what the Codex app-server does for Codex:

  • ClaudeSkills.ts (new): scans <config dir>/skills (user scope — CLAUDE_CONFIG_DIR when the instance sets homePath, else ~/.claude) and <cwd>/.claude/skills (project scope) for <skill-dir>/SKILL.md, parses YAML frontmatter for name/description, and maps entries into ServerProviderSkill[]. Project skills win name collisions (Claude Code's most-specific-wins resolution). Discovery is best-effort: unreadable roots, stray files, and malformed frontmatter are skipped rather than failing the snapshot; a frontmatter-less skill falls back to its directory name.
  • ClaudeProvider.ts: checkClaudeProviderStatus now accepts the workspace cwd, runs discovery, and attaches skills to the ready/unverified-auth snapshots.
  • ClaudeDriver.ts: passes ServerConfig.cwd and provides FileSystem to the status check.

The Agent SDK init handshake surfaces skills only as slash commands without filesystem paths, so scanning the same directories Claude Code loads from is the practical way to get paths + scopes for the picker.

No client changes needed — the web/mobile composers already render whatever selectedProviderStatus.skills contains.

Testing

  • New ClaudeSkills.test.ts covering user+project discovery, collision precedence, malformed-frontmatter/stray-file tolerance, and missing roots (4 tests).
  • Existing ProviderRegistry / Claude probe suites pass (48 tests).
  • typecheck, lint, fmt clean.

🤖 Generated with Claude Code


Note

Low Risk
Read-only local filesystem discovery during provider status checks; failures are swallowed so snapshots stay available.

Overview
Claude provider snapshots now include filesystem-discovered skills so the composer $ picker can list them (previously only Codex populated skills).

Adds discoverClaudeSkills, which scans user <configDir>/skills and project <cwd>/.claude/skills for SKILL.md files, parses YAML frontmatter via the new yaml dependency, and returns ServerProviderSkill entries with scope and paths. Config dir resolution matches the spawned CLI (homePathCLAUDE_CONFIG_DIR~/.claude, with relative env paths resolved against workspace cwd). Project skills override user skills on name collisions; bad roots, missing files, and invalid frontmatter are skipped without failing the status check.

checkClaudeProviderStatus takes workspace cwd, runs discovery, and passes skills into buildServerProvider for both ready and auth-unknown paths. ClaudeDriver supplies FileSystem and passes cwd into the status check.

Reviewed by Cursor Bugbot for commit 7be852b. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Make Claude Code skills discoverable via the composer $ picker

  • Adds discoverClaudeSkills in ClaudeSkills.ts to enumerate skills from two roots: <configDir>/skills (user scope) and <cwd>/.claude/skills (project scope), parsing YAML frontmatter from each SKILL.md file.
  • Config directory resolves with this precedence: config.homePath, then CLAUDE_CONFIG_DIR env var (resolved relative to workspace cwd), then ~/.claude.
  • Project-scope skills take precedence over user-scope skills on name collisions; entries with missing frontmatter fall back to the directory name.
  • checkClaudeProviderStatus in ClaudeProvider.ts now accepts an optional cwd and requires FileSystem, returning discovered skills in the ServerProviderDraft.

Macroscope summarized 7be852b.

Summary by CodeRabbit

  • New Features

    • Claude Code skills are now automatically discovered and shown in the $ picker.
    • Skills can be loaded from both user-level and project-level locations.
    • Skill names and descriptions are read from SKILL.md metadata.
    • Project-level skills take precedence when names overlap.
  • Bug Fixes

    • Missing, unreadable, or malformed skill files no longer interrupt Claude provider status checks.
    • Skills are safely ignored when configured skill directories do not exist.

The $ skill selector only ever worked for Codex because the Codex
app-server is the sole source that populated the provider snapshot's
skills array; the Claude provider always shipped an empty list, so the
composer showed "No skills found".

Scan the Claude config dir (CLAUDE_CONFIG_DIR or ~/.claude) and the
workspace .claude/skills for SKILL.md entries, parse their YAML
frontmatter for name/description, and surface them as
ServerProviderSkill entries on the Claude provider snapshot. Project
skills win name collisions, matching Claude Code's most-specific-wins
resolution, and discovery is best-effort so malformed skills never
degrade the snapshot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Claude provider checks now discover skills from user and project filesystem roots, parse their metadata, resolve collisions, and include the results in provider drafts. Filesystem access and the YAML parser dependency are wired into the relevant effects.

Changes

Claude Skills Provider Flow

Layer / File(s) Summary
Skill discovery and validation
apps/server/src/provider/Drivers/ClaudeSkills.ts, apps/server/src/provider/Drivers/ClaudeSkills.test.ts, apps/server/package.json
Adds filesystem-based Claude skill discovery with YAML frontmatter parsing, project-over-user precedence, fallback metadata, sorting, failure tolerance, and coverage for these cases.
Filesystem access for Claude checks
apps/server/src/provider/Drivers/ClaudeDriver.ts
Provides the filesystem service to Claude capability-check effects.
Provider draft integration
apps/server/src/provider/Layers/ClaudeProvider.ts
Accepts an optional working directory, discovers skills during status checks, and includes them in provider drafts for both capability outcomes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant checkClaudeProviderStatus
  participant discoverClaudeSkills
  participant FileSystem
  participant ServerProviderDraft
  checkClaudeProviderStatus->>discoverClaudeSkills: pass claudeSettings and cwd
  discoverClaudeSkills->>FileSystem: read skill roots and SKILL.md files
  FileSystem-->>discoverClaudeSkills: skill metadata
  discoverClaudeSkills-->>checkClaudeProviderStatus: sorted skills
  checkClaudeProviderStatus->>ServerProviderDraft: include skills in provider draft
Loading

Suggested reviewers: juliusmarminge

Poem

A rabbit hops through folders bright,
Finds skills tucked in YAML light.
Project carrots win the race,
Drafts now hold each skill in place.
Thump, thump—Claude is set just right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: Claude Code skills are now discoverable in the composer picker.
Description check ✅ Passed The description covers the problem, fix, and testing, but it does not follow the template headings or include a completed checklist.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude-skill-discovery

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 24, 2026
Comment thread apps/server/src/provider/Drivers/ClaudeSkills.ts
@macroscopeapp

macroscopeapp Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces new functionality (skill discovery for the composer picker) rather than a simple fix. While well-tested and self-contained, new user-facing capabilities that change what users see in the UI warrant human review.

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

Skill discovery now matches the config-dir precedence the spawned CLI
sees: instance homePath (which makeClaudeEnvironment exports as
CLAUDE_CONFIG_DIR), then a CLAUDE_CONFIG_DIR already present in the
process environment, then ~/.claude. Previously an exported
CLAUDE_CONFIG_DIR was ignored, so the $ picker could list skills from a
different directory than the Claude runtime would load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@t3dotgg t3dotgg changed the title Discover Claude Code skills for the composer $ picker fix: Claude Code skills discoverable for the composer $ picker Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/server/src/provider/Drivers/ClaudeSkills.ts`:
- Around line 27-53: The parseSkillFrontmatter flow must distinguish absent
frontmatter from malformed YAML: return an explicit parse-validity state,
preserve valid metadata, and have the discovery logic skip malformed entries
before applying the directory-name fallback. Update
apps/server/src/provider/Drivers/ClaudeSkills.ts lines 27-53 and 104-105
accordingly; update apps/server/src/provider/Drivers/ClaudeSkills.test.ts lines
96-119 so only the skill without frontmatter is discovered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7a51c3b6-70f9-4d4d-bce6-032b4b4a23a3

📥 Commits

Reviewing files that changed from the base of the PR and between 2f41c07 and bc25d30.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • apps/server/package.json
  • apps/server/src/provider/Drivers/ClaudeDriver.ts
  • apps/server/src/provider/Drivers/ClaudeSkills.test.ts
  • apps/server/src/provider/Drivers/ClaudeSkills.ts
  • apps/server/src/provider/Layers/ClaudeProvider.ts

Comment thread apps/server/src/provider/Drivers/ClaudeSkills.ts Outdated
A SKILL.md whose frontmatter fails to parse won't load in Claude Code,
so surfacing it in the picker under its directory name advertised a
skill the runtime can't run. Distinguish missing frontmatter (directory
name fallback still applies) from malformed frontmatter (entry skipped).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e605f8. Configure here.

Comment thread apps/server/src/provider/Drivers/ClaudeSkills.ts Outdated
Env vars reach the spawned CLI unexpanded, so a literal `~` in
CLAUDE_CONFIG_DIR stays literal for the runtime. Expanding it during
skill discovery scanned a different directory than the CLI would use;
resolve the value verbatim instead for parity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread apps/server/src/provider/Drivers/ClaudeSkills.ts Outdated
The spawned CLI resolves a relative CLAUDE_CONFIG_DIR against its own
cwd (the workspace), while discovery resolved it against the server
process's cwd — scanning a different skills directory. Resolve against
the workspace cwd for parity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@colonelpanic8

Copy link
Copy Markdown

yes! please merge!

@t3dotgg
t3dotgg merged commit 6b9a598 into main Jul 24, 2026
16 checks passed
@t3dotgg
t3dotgg deleted the claude-skill-discovery branch July 24, 2026 01:39
jetblk added a commit to jetblk/t3code that referenced this pull request Jul 24, 2026
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…otgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)
cursor Bot pushed a commit to aaditagrawal/t3code that referenced this pull request Jul 25, 2026
…4309pingdotgg#4488) (#187)

* fix(client-runtime): keep a warm thread un-settled despite a merged/closed PR (pingdotgg#4309)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 193e3c6)

* Fix composer context strip alignment and glass shell (pingdotgg#4404)

(cherry picked from commit 6ef7aa8)

* Polish iOS git progress overlay with glass effects (pingdotgg#4387)

(cherry picked from commit ce467da)

* Improve composer glass fallbacks (pingdotgg#4406)

Co-authored-by: codex <codex@users.noreply.github.com>
(cherry picked from commit 67a7b1a)

* feat(web): collapse large git diffs by default to make chat more readable (pingdotgg#4409)

(cherry picked from commit 51672b6)

* Stop new threads inheriting checkout/branch from viewed thread (pingdotgg#4411)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 2f41c07)

* fix: tone down branch-mismatch banner (pingdotgg#4416)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit fc3f78f)

* fix: Claude Code skills discoverable for the composer $ picker (pingdotgg#4414)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 6b9a598)

* fix(web): keep settled threads reachable when opened directly (pingdotgg#4413)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit bb38c33)

* feat(sidebar-v2): thread snoozing (pingdotgg#4311)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: maria <maria@kuuro.net>
(cherry picked from commit 202e560)

* Upgrade Clerk packages and Expo integration (pingdotgg#4440)

(cherry picked from commit 5d17354)

Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>

* Increase light-mode contrast for user message bubbles (pingdotgg#4441)

(cherry picked from commit 15e875a)

* Restore model picker layout and retain iterative test state (pingdotgg#4450)

Co-authored-by: codex <codex@users.noreply.github.com>
(cherry picked from commit f7cc776)

* Color settled PR labels on hover (pingdotgg#4451)

Co-authored-by: codex <codex@users.noreply.github.com>
(cherry picked from commit a7ee309)

* [codex] Fix glass hover compositing artifacts (pingdotgg#4446)

Co-authored-by: codex <codex@users.noreply.github.com>
(cherry picked from commit ece0508)

* Add Claude Opus 5 model (pingdotgg#4472)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Theo Browne <me@t3.gg>
(cherry picked from commit 41a430a)

* feat(web): add collapse-all toggle to diff panel (pingdotgg#4475)

(cherry picked from commit 38cfc25)

* feat(web): show fast mode as a bolt instead of a "Normal" label (pingdotgg#4488)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 5719e8a)

* fix(sync): preserve Droid medium-access with Auto runtime mode

Keep fork-only medium-access in RuntimeMode alongside upstream Auto.
Update presentation maps and drop obsolete provider kind from slug helper.

Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>

* fix(sync): restore fork release and runtime-mode adaptations

Keep WSL node-pty on bullseye glibc, pin releases to the fork, and stop
hard-requiring upstream relay/npm publish. Scope Auto vs Medium access by
provider, normalize carried modes on new threads, and fix Claude/Droid
type regressions from the restack.

Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>

* fix(sync): refresh lockfile after Clerk upgrade restack

Align patchedDependencies hashes (react-native-screens) and importer
entries with the current workspace patches so frozen CI installs succeed.

Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>

---------

Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: maria <maria@kuuro.net>
Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>
Co-authored-by: tomlit <tomlit@gmail.com>
Co-authored-by: jan <hi@4bs3nt.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants