Skip to content

Commit 8a868fc

Browse files
anirudhsamaclaude
andcommitted
fix(server): discover project skills for Claude
The Claude driver scanned project skills from the server's own startup directory, so a project's .claude/skills never reached the composer. Expose snapshotForCwd on the Claude instance, reusing the existing filesystem scanner with the thread's working directory, so the workspace snapshot plumbing from #8778 applies to Claude too. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 70cd258 commit 8a868fc

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎apps/server/src/provider/Drivers/ClaudeDriver.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
type ProviderSnapshotSettings,
5858
} from "../providerUpdateSettings.ts";
5959
import { makeClaudeCapabilitiesCacheKey, makeClaudeContinuationGroupKey } from "./ClaudeHome.ts";
60+
import { discoverClaudeSkills } from "./ClaudeSkills.ts";
6061
const decodeClaudeSettings = Schema.decodeSync(ClaudeSettings);
6162

6263
const DRIVER_KIND = ProviderDriverKind.make("claudeAgent");
@@ -212,6 +213,17 @@ export const ClaudeDriver: ProviderDriver<ClaudeSettings, ClaudeDriverEnv> = {
212213
}),
213214
),
214215
);
216+
const snapshotForCwd = (cwd: string) =>
217+
!effectiveConfig.enabled
218+
? snapshot.getSnapshot
219+
: Effect.all([
220+
snapshot.getSnapshot,
221+
discoverClaudeSkills(effectiveConfig, cwd, processEnv),
222+
]).pipe(
223+
Effect.map(([machineSnapshot, skills]) => ({ ...machineSnapshot, skills })),
224+
Effect.provideService(FileSystem.FileSystem, fileSystem),
225+
Effect.provideService(Path.Path, path),
226+
);
215227

216228
return {
217229
instanceId,
@@ -224,6 +236,7 @@ export const ClaudeDriver: ProviderDriver<ClaudeSettings, ClaudeDriverEnv> = {
224236
accentColor,
225237
enabled,
226238
snapshot,
239+
snapshotForCwd,
227240
adapter,
228241
textGeneration,
229242
} satisfies ProviderInstance;

0 commit comments

Comments
 (0)