Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/4414/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

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 (homePath → CLAUDE_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](https://cursor.com/bugbot) for commit 7be852bd89a80f3b67602301b9bc1cf4d67a850f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

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.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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

      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 nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring 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 nameStatusExplanation
      Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Title check✅ PassedThe title clearly summarizes the main change: Claude Code skills are now discoverable in the composer picker.
      Description check✅ PassedThe 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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

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

      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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. t3dotgg(GitHub profile, opens in a new tab) changed the title

    5. 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 2f41c073a2f846e9a96082e76cd1b2c3a7e44c18 and bc25d3014f925f61167e564aabde2bc6a6b4448c.

      ⛔ 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
    6. 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](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4e605f8a0aa5807466ece73d60d066586187f3cf. Configure [here](https://www.cursor.com/dashboard/bugbot).

Sign in to join this conversation.