claude-code-templates 1.16.0 → 1.16.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +9 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-templates",
3
- "version": "1.16.0",
3
+ "version": "1.16.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": {
package/src/index.js CHANGED
@@ -321,35 +321,22 @@ async function installIndividualAgent(agentName, targetDir, options) {
321
321
 
322
322
  const agentContent = await response.text();
323
323
 
324
- // For agents, they are typically part of templates, so we need to determine
325
- // the appropriate language/framework and install the complete template
326
- const language = extractLanguageFromAgent(agentContent, agentName);
327
- const framework = extractFrameworkFromAgent(agentContent, agentName);
324
+ // Create .claude/agents directory if it doesn't exist
325
+ const agentsDir = path.join(targetDir, '.claude', 'agents');
326
+ await fs.ensureDir(agentsDir);
328
327
 
329
- console.log(chalk.yellow(`📝 Agent "${agentName}" is part of ${language}/${framework} template`));
330
- console.log(chalk.blue('🚀 Installing complete template with this agent...'));
331
-
332
- // Install the template that contains this agent (avoid recursion)
333
- const setupOptions = {
334
- ...options,
335
- language,
336
- framework,
337
- yes: true,
338
- targetDirectory: targetDir,
339
- agent: null // Remove agent to avoid recursion
340
- };
341
- delete setupOptions.agent;
342
- await createClaudeConfig(setupOptions);
328
+ // Write the agent file
329
+ const targetFile = path.join(agentsDir, `${agentName}.md`);
330
+ await fs.writeFile(targetFile, agentContent, 'utf8');
343
331
 
344
332
  console.log(chalk.green(`✅ Agent "${agentName}" installed successfully!`));
333
+ console.log(chalk.cyan(`📁 Installed to: ${path.relative(targetDir, targetFile)}`));
345
334
  console.log(chalk.cyan(`📦 Downloaded from: ${githubUrl}`));
346
335
 
347
336
  // Track successful agent installation
348
337
  trackingService.trackDownload('agent', agentName, {
349
- language: language,
350
- framework: framework,
351
- installation_type: 'individual_agent',
352
- template_installed: true,
338
+ installation_type: 'individual_component',
339
+ target_directory: path.relative(process.cwd(), targetDir),
353
340
  source: 'github_main'
354
341
  });
355
342