claude-code-templates 1.24.14 → 1.24.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -232,39 +232,21 @@ Requirements:
232
232
  - Do NOT include any explanations, ONLY code blocks with filenames`
233
233
  : config.prompt;
234
234
 
235
- // TEMPORARY SOLUTION: Load agent content manually and pass as systemPrompt
236
- //
237
- // NOTE: This is a workaround because the current version of @anthropic-ai/claude-agent-sdk
238
- // does not properly support `settingSources: ['project']` for loading agents from .claude/
239
- //
240
- // FUTURE: Once the SDK properly supports settingSources, we should use:
241
- // settingSources: ['project']
242
- // instead of manually loading and passing the agent content.
243
- //
244
- // The SDK version ^0.1.0 is the latest available but seems to have issues with
245
- // automatic agent loading. We need to revisit this in future SDK updates.
246
- let agentSystemPrompt = '';
247
- if (agents.length > 0) {
248
- const agentPath = path.join(process.cwd(), '.claude', 'agents', `${agents[0].replace(/\//g, '-')}.md`);
249
- if (fs.existsSync(agentPath)) {
250
- agentSystemPrompt = fs.readFileSync(agentPath, 'utf-8');
251
- log(`Loaded agent from: ${agentPath}`);
252
- } else {
253
- log(`Agent file not found: ${agentPath}`, 'warning');
254
- }
255
- }
256
-
257
235
  // Configure Claude Agent SDK options
236
+ // Using settingSources: ['project'] to automatically load agents from .claude/ directory
237
+ // This is supported in SDK version ^0.1.23 and later
258
238
  const options: ClaudeAgentOptions = {
259
239
  model: 'claude-sonnet-4-5',
260
240
  apiKey: config.anthropicApiKey,
261
- // Use custom system prompt with agent content if available
262
- // TODO: Replace with settingSources once SDK properly supports it
263
- systemPrompt: agentSystemPrompt
264
- ? { type: 'text', text: agentSystemPrompt }
265
- : { type: 'preset', preset: 'claude_code' },
241
+ systemPrompt: { type: 'preset', preset: 'claude_code' },
242
+ // Automatically load agents, settings, and configurations from .claude/ directory
243
+ settingSources: ['project'],
266
244
  };
267
245
 
246
+ if (agents.length > 0) {
247
+ log(`Using agents from .claude/agents/ directory via settingSources`, 'success');
248
+ }
249
+
268
250
  // Collect the full response
269
251
  let generatedCode = '';
270
252
 
@@ -17,7 +17,7 @@
17
17
  "format:check": "prettier --check ."
18
18
  },
19
19
  "dependencies": {
20
- "@anthropic-ai/claude-agent-sdk": "^0.1.0",
20
+ "@anthropic-ai/claude-agent-sdk": "^0.1.23",
21
21
  "@cloudflare/sandbox": "^0.1.0",
22
22
  "node-fetch": "^3.3.2"
23
23
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-templates",
3
- "version": "1.24.14",
3
+ "version": "1.24.15",
4
4
  "description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
5
5
  "main": "src/index.js",
6
6
  "bin": {