fix: discover project-level Claude skills for the picker in the desktop app #4546
main fromrefs/pull/4546/head·opened View on GitHubWhat#
Project-level Claude Code skills (<project>/.claude/skills/) now show up in the $ picker and / autocomplete for projects added via the UI in the desktop app. Previously only user-level skills (~/.claude/skills/) appeared there, even though project skills executed fine when invoked inside a thread.
Fixes #4544 (open packaged-desktop reproduction), fixes #2048, fixes #2416 (original report: #1283). Reproduced on 0.0.29-nightly.20260725.899, i.e. after #4414 landed.
Why #4414 didn't cover the desktop app#
discoverClaudeSkills (added in #4414) is correct in itself, but it receives ServerConfig.cwd — the working directory of the T3 server process. That is only ever the user's repository in the npx t3-launched-from-inside-a-repo flow. In the desktop app the server cwd is unrelated to whatever project is open in the sidebar, so the project-scope scan silently found nothing. The snapshot is also global rather than per project, so even with a correct path, one project's skills would leak into every other project's picker.
How#
- New
server.discoverProviderSkillsRPC ({ instanceId, cwd }→{ skills | null }) that re-runs skill discovery against the active project's own path (or worktree).skills: nullmeans "this driver has no workspace-scoped discovery", so clients can distinguish that from "this project has no skills". ProviderInstancegains an optionaldiscoverSkills(cwd)capability. The Claude driver implements it as a closure over its instance config, reusingdiscoverClaudeSkillsunchanged — the existing project-wins-on-collision rule and best-effort semantics apply as-is.- The web app resolves picker/timeline skills through a
useWorkspaceProviderSkillshook keyed by the thread's workspace (project path or worktree), falling back to the snapshot's skills while loading, on older servers without the RPC, or for drivers that answernull.
The npx t3 flow is unchanged: the snapshot still scans the server cwd, and the per-workspace call returns the same result there.
Codex#
The Codex driver has the same server-cwd assumption (#3040): its snapshot probe passes process.cwd() to the app-server skills/list call (CodexProvider.ts). Not touched here — Codex discovery goes through the app-server JSON-RPC client rather than the filesystem and deserves its own tests. The new per-instance discoverSkills capability is the seam to fix it separately.
Testing#
ClaudeSkills.test.ts: new case covering two projects with different skill sets discovered against their own paths (not the process cwd), each seeing only its own project skills plus shared user skills — 7/7 passing.server.test.ts: new end-to-end WebSocket RPC test verifying the requested cwd reaches discovery and that instances without the capability answerskills: null— all 20 ws routing tests passing.- Typecheck, oxlint, and formatting clean across
contracts,client-runtime,server, andweb. - Manually verified in the desktop app: project skills appear in the
$picker for a sidebar-added project whose path differs from the server cwd.
🤖 Generated with Claude Code
Note
Low Risk Read-scoped RPC and UI wiring with graceful fallbacks; no auth or persistence changes. Filesystem discovery is best-effort as before.
Overview
Project-level Claude skills now show in the $ picker and composer when the desktop app’s open project path differs from the server process cwd.
Adds server.discoverProviderSkills (instanceId + workspace cwd → skills or skills: null). ProviderInstance gains optional discoverSkills(cwd); the Claude driver implements it via existing discoverClaudeSkills. The web app uses useWorkspaceProviderSkills (keyed by active project/worktree) in ChatView and ChatComposer, falling back to snapshot skills while loading, on older servers, or when the driver returns null.
Tests cover per-project isolation in ClaudeSkills.test.ts and WebSocket RPC routing in server.test.ts.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Approvability#
Verdict: Needs human review
This PR introduces a new feature spanning multiple layers (new RPC endpoint, server method, client hook, UI integration) rather than a simple bug fix. The scope of new capability - workspace-scoped skill discovery affecting the desktop app's skill picker - warrants human review.
You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).I need this to be merged its the only thing stopping me using t3 code
Does this fix the issue for codex as well? that doesn't discover project skills either
@t3dotgg @juliusmarminge Please could we get this in or another fix for project specific skill to be discovered for codex and claude? (I am using the mac desktop app)
Very annoying issue. Please merge this ASAP.
Note
🤖 GPT-5.6 Sol responding on behalf of Theo
Closing this PR after an automated pass over open pull requests. Repository-local Claude skill discovery already shipped in #5488.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
2e560cb5-5e0a-4735-ba7c-ef7f1d0c0ad1You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
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