claude-code-templates 1.20.0 ā 1.20.1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
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": {
|
|
@@ -265,7 +265,10 @@ if (!fs.existsSync(agentPath)) {
|
|
|
265
265
|
process.exit(1);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
const
|
|
268
|
+
const rawSystemPrompt = fs.readFileSync(agentPath, 'utf8');
|
|
269
|
+
|
|
270
|
+
// Remove YAML front matter if present to get clean system prompt
|
|
271
|
+
const systemPrompt = rawSystemPrompt.replace(/^---[\\s\\S]*?---\\n/, '').trim();
|
|
269
272
|
|
|
270
273
|
// Parse arguments and detect context
|
|
271
274
|
const args = process.argv.slice(2);
|
|
@@ -275,6 +278,8 @@ let explicitDirs = [];
|
|
|
275
278
|
let autoDetect = true;
|
|
276
279
|
|
|
277
280
|
// Parse command line arguments
|
|
281
|
+
let verbose = false;
|
|
282
|
+
|
|
278
283
|
for (let i = 0; i < args.length; i++) {
|
|
279
284
|
const arg = args[i];
|
|
280
285
|
|
|
@@ -286,6 +291,8 @@ for (let i = 0; i < args.length; i++) {
|
|
|
286
291
|
autoDetect = false;
|
|
287
292
|
} else if (arg === '--no-auto') {
|
|
288
293
|
autoDetect = false;
|
|
294
|
+
} else if (arg === '--verbose' || arg === '-v') {
|
|
295
|
+
verbose = true;
|
|
289
296
|
} else if (arg === '--help' || arg === '-h') {
|
|
290
297
|
console.log('Usage: ${agentName} [options] "your prompt"');
|
|
291
298
|
console.log('');
|
|
@@ -294,6 +301,7 @@ for (let i = 0; i < args.length; i++) {
|
|
|
294
301
|
console.log(' --file <path> Include specific file');
|
|
295
302
|
console.log(' --dir <path> Include specific directory');
|
|
296
303
|
console.log(' --no-auto Disable auto-detection');
|
|
304
|
+
console.log(' --verbose, -v Enable verbose debugging output');
|
|
297
305
|
console.log('');
|
|
298
306
|
console.log('Examples:');
|
|
299
307
|
console.log(' ${agentName} "review for security issues" # Auto-detect');
|
|
@@ -385,8 +393,20 @@ const escapedSystemPrompt = systemPrompt.replace(/"/g, '\\\\"').replace(/\`/g, '
|
|
|
385
393
|
const finalPrompt = userInput + contextPrompt;
|
|
386
394
|
const escapedFinalPrompt = finalPrompt.replace(/"/g, '\\\\"').replace(/\`/g, '\\\\\`');
|
|
387
395
|
|
|
388
|
-
// Build Claude command with SDK
|
|
389
|
-
const claudeCmd = \`claude -p "\${escapedFinalPrompt}" --
|
|
396
|
+
// Build Claude command with SDK - use --system-prompt instead of --append-system-prompt for better control
|
|
397
|
+
const claudeCmd = \`claude -p "\${escapedFinalPrompt}" --system-prompt "\${escapedSystemPrompt}"\${verbose ? ' --verbose' : ''}\`;
|
|
398
|
+
|
|
399
|
+
// Debug output if verbose
|
|
400
|
+
if (verbose) {
|
|
401
|
+
console.log('\\nš DEBUG MODE - Command Details:');
|
|
402
|
+
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā');
|
|
403
|
+
console.log('š User Input:', userInput);
|
|
404
|
+
console.log('š Project Context:', contextPrompt ? 'Auto-detected' : 'None');
|
|
405
|
+
console.log('šÆ Final Prompt Length:', finalPrompt.length, 'characters');
|
|
406
|
+
console.log('š¤ System Prompt Preview:', systemPrompt.substring(0, 150) + '...');
|
|
407
|
+
console.log('ā” Claude Command:', claudeCmd);
|
|
408
|
+
console.log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\\n');
|
|
409
|
+
}
|
|
390
410
|
|
|
391
411
|
// Show loading indicator
|
|
392
412
|
const frames = ['ā ', 'ā ', 'ā ¹', 'ā ø', 'ā ¼', 'ā “', 'ā ¦', 'ā §', 'ā ', 'ā '];
|