claude-code-templates 1.14.14 → 1.14.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.
package/README.md CHANGED
@@ -51,14 +51,14 @@ npx claude-code-templates@latest --health-check
51
51
 
52
52
  ## šŸ“– Documentation
53
53
 
54
- **[šŸ“š Complete Documentation](https://aitmpl.com/docu/)** - Comprehensive guides, examples, and API reference
54
+ **[šŸ“š Complete Documentation](https://docs.aitmpl.com/)** - Comprehensive guides, examples, and API reference
55
55
 
56
56
  Quick links:
57
- - [Getting Started](https://aitmpl.com/docu/docs/intro) - Installation and first steps
58
- - [Project Setup](https://aitmpl.com/docu/docs/project-setup/interactive-setup) - Configure your projects
59
- - [Analytics Dashboard](https://aitmpl.com/docu/docs/analytics/overview) - Real-time monitoring
60
- - [Individual Components](https://aitmpl.com/docu/docs/components/overview) - Agents, Commands, MCPs
61
- - [CLI Options](https://aitmpl.com/docu/docs/cli-options) - All available commands
57
+ - [Getting Started](https://docs.aitmpl.com/docs/intro) - Installation and first steps
58
+ - [Project Setup](https://docs.aitmpl.com/docs/project-setup/interactive-setup) - Configure your projects
59
+ - [Analytics Dashboard](https://docs.aitmpl.com/docs/analytics/overview) - Real-time monitoring
60
+ - [Individual Components](https://docs.aitmpl.com/docs/components/overview) - Agents, Commands, MCPs
61
+ - [CLI Options](https://docs.aitmpl.com/docs/cli-options) - All available commands
62
62
 
63
63
  ## šŸ¤ Contributing
64
64
 
@@ -71,7 +71,7 @@ MIT License - see the [LICENSE](LICENSE) file for details.
71
71
  ## šŸ”— Links
72
72
 
73
73
  - **🌐 Browse Components**: [aitmpl.com](https://aitmpl.com)
74
- - **šŸ“š Documentation**: [aitmpl.com/docu](https://aitmpl.com/docu)
74
+ - **šŸ“š Documentation**: [docs.aitmpl.com](https://docs.aitmpl.com)
75
75
  - **šŸ› Issues**: [GitHub Issues](https://github.com/davila7/claude-code-templates/issues)
76
76
  - **šŸ’¬ Discussions**: [GitHub Discussions](https://github.com/davila7/claude-code-templates/discussions)
77
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-templates",
3
- "version": "1.14.14",
3
+ "version": "1.14.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": {
@@ -16,7 +16,9 @@ class HealthChecker {
16
16
  system: [],
17
17
  claudeCode: [],
18
18
  project: [],
19
+ agents: [],
19
20
  commands: [],
21
+ mcps: [],
20
22
  hooks: []
21
23
  };
22
24
  this.totalChecks = 0;
@@ -42,6 +44,14 @@ class HealthChecker {
42
44
  await this.checkProjectSetupWithSpinner();
43
45
  await this.sleep(3000);
44
46
 
47
+ // Agents check
48
+ await this.checkAgentsWithSpinner();
49
+ await this.sleep(3000);
50
+
51
+ // MCP servers check
52
+ await this.checkMCPServersWithSpinner();
53
+ await this.sleep(3000);
54
+
45
55
  // Custom commands check
46
56
  await this.checkCustomCommandsWithSpinner();
47
57
  await this.sleep(3000);
@@ -165,6 +175,54 @@ class HealthChecker {
165
175
  localSettingsSpinner.succeed(`${this.getStatusIcon(localSettingsInfo.status)} Local Settings │ ${localSettingsInfo.message}`);
166
176
  }
167
177
 
178
+ /**
179
+ * Check agents with spinner and immediate results
180
+ */
181
+ async checkAgentsWithSpinner() {
182
+ console.log(chalk.cyan('\nā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”'));
183
+ console.log(chalk.cyan('│ AGENTS │'));
184
+ console.log(chalk.cyan('ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜'));
185
+
186
+ // Project agents
187
+ const projectSpinner = ora('Scanning Project Agents...').start();
188
+ const projectAgents = this.checkProjectAgents();
189
+ this.addResult('agents', 'Project Agents', projectAgents.status, projectAgents.message);
190
+ projectSpinner.succeed(`${this.getStatusIcon(projectAgents.status)} Project Agents │ ${projectAgents.message}`);
191
+
192
+ // Personal agents
193
+ const personalSpinner = ora('Scanning Personal Agents...').start();
194
+ const personalAgents = this.checkPersonalAgents();
195
+ this.addResult('agents', 'Personal Agents', personalAgents.status, personalAgents.message);
196
+ personalSpinner.succeed(`${this.getStatusIcon(personalAgents.status)} Personal Agents │ ${personalAgents.message}`);
197
+
198
+ // Agent syntax validation
199
+ const syntaxSpinner = ora('Validating Agent Syntax...').start();
200
+ const syntaxInfo = this.checkAgentSyntax();
201
+ this.addResult('agents', 'Agent Syntax', syntaxInfo.status, syntaxInfo.message);
202
+ syntaxSpinner.succeed(`${this.getStatusIcon(syntaxInfo.status)} Agent Syntax │ ${syntaxInfo.message}`);
203
+ }
204
+
205
+ /**
206
+ * Check MCP servers with spinner and immediate results
207
+ */
208
+ async checkMCPServersWithSpinner() {
209
+ console.log(chalk.cyan('\nā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”'));
210
+ console.log(chalk.cyan('│ MCP SERVERS │'));
211
+ console.log(chalk.cyan('ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜'));
212
+
213
+ // Project MCP configuration
214
+ const projectMCPSpinner = ora('Scanning Project MCP Configuration...').start();
215
+ const projectMCP = this.checkProjectMCPConfiguration();
216
+ this.addResult('mcps', 'Project MCP Config', projectMCP.status, projectMCP.message);
217
+ projectMCPSpinner.succeed(`${this.getStatusIcon(projectMCP.status)} Project MCP Config │ ${projectMCP.message}`);
218
+
219
+ // MCP configuration validation
220
+ const mcpValidationSpinner = ora('Validating MCP Configuration...').start();
221
+ const mcpValidation = this.checkMCPConfigurationSyntax();
222
+ this.addResult('mcps', 'MCP Config Syntax', mcpValidation.status, mcpValidation.message);
223
+ mcpValidationSpinner.succeed(`${this.getStatusIcon(mcpValidation.status)} MCP Config Syntax │ ${mcpValidation.message}`);
224
+ }
225
+
168
226
  /**
169
227
  * Check custom commands with spinner and immediate results
170
228
  */
@@ -552,6 +610,123 @@ class HealthChecker {
552
610
  }
553
611
  }
554
612
 
613
+ checkProjectMCPConfiguration() {
614
+ const currentDir = process.cwd();
615
+ const mcpConfigPath = path.join(currentDir, '.mcp.json');
616
+
617
+ if (fs.existsSync(mcpConfigPath)) {
618
+ try {
619
+ const mcpConfig = JSON.parse(fs.readFileSync(mcpConfigPath, 'utf8'));
620
+
621
+ if (mcpConfig.mcpServers && typeof mcpConfig.mcpServers === 'object') {
622
+ const serverCount = Object.keys(mcpConfig.mcpServers).length;
623
+ return {
624
+ status: 'pass',
625
+ message: `${serverCount} MCP servers configured in .mcp.json`
626
+ };
627
+ } else {
628
+ return {
629
+ status: 'warn',
630
+ message: 'No mcpServers found in .mcp.json'
631
+ };
632
+ }
633
+ } catch (error) {
634
+ return {
635
+ status: 'fail',
636
+ message: 'Invalid JSON syntax in .mcp.json'
637
+ };
638
+ }
639
+ } else {
640
+ return {
641
+ status: 'warn',
642
+ message: 'No project MCP configuration found (.mcp.json)'
643
+ };
644
+ }
645
+ }
646
+
647
+ checkMCPConfigurationSyntax() {
648
+ const configPaths = [
649
+ path.join(process.cwd(), '.mcp.json')
650
+ ];
651
+
652
+ let totalServers = 0;
653
+ let validServers = 0;
654
+ let invalidServers = 0;
655
+ const issues = [];
656
+
657
+ for (const configPath of configPaths) {
658
+ if (fs.existsSync(configPath)) {
659
+ try {
660
+ const mcpConfig = JSON.parse(fs.readFileSync(configPath, 'utf8'));
661
+
662
+ if (mcpConfig.mcpServers && typeof mcpConfig.mcpServers === 'object') {
663
+ const servers = mcpConfig.mcpServers;
664
+
665
+ for (const [serverName, serverConfig] of Object.entries(servers)) {
666
+ totalServers++;
667
+
668
+ // Validate server configuration structure
669
+ if (!serverConfig || typeof serverConfig !== 'object') {
670
+ invalidServers++;
671
+ issues.push(`Invalid server config for ${serverName} in ${path.basename(configPath)}`);
672
+ continue;
673
+ }
674
+
675
+ // Check required fields
676
+ if (!serverConfig.command) {
677
+ invalidServers++;
678
+ issues.push(`Missing command for ${serverName} in ${path.basename(configPath)}`);
679
+ continue;
680
+ }
681
+
682
+ // Optional: Check if args is array when present
683
+ if (serverConfig.args && !Array.isArray(serverConfig.args)) {
684
+ invalidServers++;
685
+ issues.push(`Invalid args format for ${serverName} in ${path.basename(configPath)} (should be array)`);
686
+ continue;
687
+ }
688
+
689
+ // Optional: Check if env is object when present
690
+ if (serverConfig.env && typeof serverConfig.env !== 'object') {
691
+ invalidServers++;
692
+ issues.push(`Invalid env format for ${serverName} in ${path.basename(configPath)} (should be object)`);
693
+ continue;
694
+ }
695
+
696
+ validServers++;
697
+ }
698
+ }
699
+ } catch (error) {
700
+ // JSON parsing error already handled in other checks
701
+ }
702
+ }
703
+ }
704
+
705
+ if (totalServers === 0) {
706
+ return {
707
+ status: 'warn',
708
+ message: 'No MCP servers configured'
709
+ };
710
+ }
711
+
712
+ if (invalidServers === 0) {
713
+ return {
714
+ status: 'pass',
715
+ message: `All ${totalServers} MCP server configurations are valid`
716
+ };
717
+ } else if (validServers > 0) {
718
+ return {
719
+ status: 'warn',
720
+ message: `${validServers}/${totalServers} MCP servers valid, ${invalidServers} issues found`
721
+ };
722
+ } else {
723
+ return {
724
+ status: 'fail',
725
+ message: `All ${totalServers} MCP server configurations have issues`
726
+ };
727
+ }
728
+ }
729
+
555
730
  checkProjectCommands() {
556
731
  const currentDir = process.cwd();
557
732
  const commandsDir = path.join(currentDir, '.claude', 'commands');
@@ -625,6 +800,129 @@ class HealthChecker {
625
800
  }
626
801
  }
627
802
 
803
+ checkProjectAgents() {
804
+ const currentDir = process.cwd();
805
+ const agentsDir = path.join(currentDir, '.claude', 'agents');
806
+
807
+ if (fs.existsSync(agentsDir)) {
808
+ const agents = this.countAgentsRecursively(agentsDir);
809
+ return {
810
+ status: 'pass',
811
+ message: `${agents} agents found in .claude/agents/`
812
+ };
813
+ } else {
814
+ return {
815
+ status: 'warn',
816
+ message: 'No project agents directory found'
817
+ };
818
+ }
819
+ }
820
+
821
+ checkPersonalAgents() {
822
+ const homeDir = os.homedir();
823
+ const agentsDir = path.join(homeDir, '.claude', 'agents');
824
+
825
+ if (fs.existsSync(agentsDir)) {
826
+ const agents = this.countAgentsRecursively(agentsDir);
827
+ return {
828
+ status: 'pass',
829
+ message: `${agents} agents found in ~/.claude/agents/`
830
+ };
831
+ } else {
832
+ return {
833
+ status: 'warn',
834
+ message: 'No personal agents directory found'
835
+ };
836
+ }
837
+ }
838
+
839
+ countAgentsRecursively(dir) {
840
+ let count = 0;
841
+ try {
842
+ const items = fs.readdirSync(dir);
843
+ for (const item of items) {
844
+ const itemPath = path.join(dir, item);
845
+ const stat = fs.statSync(itemPath);
846
+ if (stat.isDirectory()) {
847
+ count += this.countAgentsRecursively(itemPath);
848
+ } else if (item.endsWith('.md')) {
849
+ count++;
850
+ }
851
+ }
852
+ } catch (error) {
853
+ // Handle permission or access errors
854
+ }
855
+ return count;
856
+ }
857
+
858
+ checkAgentSyntax() {
859
+ const currentDir = process.cwd();
860
+ const agentsDir = path.join(currentDir, '.claude', 'agents');
861
+
862
+ if (!fs.existsSync(agentsDir)) {
863
+ return {
864
+ status: 'warn',
865
+ message: 'No agents to validate'
866
+ };
867
+ }
868
+
869
+ const agents = this.getAgentFilesRecursively(agentsDir);
870
+ let issuesFound = 0;
871
+ let agentsChecked = 0;
872
+
873
+ for (const agentPath of agents) {
874
+ try {
875
+ const content = fs.readFileSync(agentPath, 'utf8');
876
+ agentsChecked++;
877
+
878
+ // Check for frontmatter (agent metadata)
879
+ if (!content.includes('---') || !content.includes('name:') || !content.includes('description:')) {
880
+ issuesFound++;
881
+ }
882
+ } catch (error) {
883
+ issuesFound++;
884
+ }
885
+ }
886
+
887
+ if (agentsChecked === 0) {
888
+ return {
889
+ status: 'warn',
890
+ message: 'No agents to validate'
891
+ };
892
+ }
893
+
894
+ if (issuesFound === 0) {
895
+ return {
896
+ status: 'pass',
897
+ message: `All ${agentsChecked} agents have proper syntax`
898
+ };
899
+ } else {
900
+ return {
901
+ status: 'warn',
902
+ message: `${issuesFound}/${agentsChecked} agents missing proper frontmatter`
903
+ };
904
+ }
905
+ }
906
+
907
+ getAgentFilesRecursively(dir) {
908
+ let files = [];
909
+ try {
910
+ const items = fs.readdirSync(dir);
911
+ for (const item of items) {
912
+ const itemPath = path.join(dir, item);
913
+ const stat = fs.statSync(itemPath);
914
+ if (stat.isDirectory()) {
915
+ files = files.concat(this.getAgentFilesRecursively(itemPath));
916
+ } else if (item.endsWith('.md')) {
917
+ files.push(itemPath);
918
+ }
919
+ }
920
+ } catch (error) {
921
+ // Handle permission or access errors
922
+ }
923
+ return files;
924
+ }
925
+
628
926
  checkUserHooks() {
629
927
  const homeDir = os.homedir();
630
928
  const settingsPath = path.join(homeDir, '.claude', 'settings.json');
@@ -1041,7 +1339,9 @@ class HealthChecker {
1041
1339
  ...this.results.system,
1042
1340
  ...this.results.claudeCode,
1043
1341
  ...this.results.project,
1342
+ ...this.results.agents,
1044
1343
  ...this.results.commands,
1344
+ ...this.results.mcps,
1045
1345
  ...this.results.hooks
1046
1346
  ];
1047
1347
 
@@ -1052,6 +1352,16 @@ class HealthChecker {
1052
1352
  recommendations.push('Consider switching to Zsh for better autocompletion and features');
1053
1353
  } else if (result.check === 'Command Syntax' && result.message.includes('$ARGUMENTS')) {
1054
1354
  recommendations.push('Add $ARGUMENTS placeholder to command files for proper parameter handling');
1355
+ } else if (result.check === 'Agent Syntax' && result.message.includes('frontmatter')) {
1356
+ recommendations.push('Add proper frontmatter (name, description) to agent files');
1357
+ } else if (result.check === 'Project Agents' && result.message.includes('No project agents directory')) {
1358
+ recommendations.push('Create .claude/agents/ directory to organize your custom agents');
1359
+ } else if (result.check === 'Project MCP Config' && result.message.includes('No project MCP configuration')) {
1360
+ recommendations.push('Create .mcp.json file to configure MCP servers for your project');
1361
+ } else if (result.check === 'MCP Config Syntax' && result.message.includes('Invalid JSON')) {
1362
+ recommendations.push('Fix JSON syntax errors in MCP configuration files');
1363
+ } else if (result.check === 'MCP Config Syntax' && result.message.includes('Missing command')) {
1364
+ recommendations.push('Add missing command fields to MCP server configurations');
1055
1365
  } else if (result.check === 'Local Hooks' && result.message.includes('Invalid JSON')) {
1056
1366
  recommendations.push('Fix JSON syntax error in .claude/settings.local.json');
1057
1367
  }
package/src/index.js CHANGED
@@ -271,7 +271,7 @@ async function createClaudeConfig(options = {}) {
271
271
  console.log(chalk.white(' 3. Start using Claude Code with: claude'));
272
272
  console.log('');
273
273
  console.log(chalk.blue('🌐 View all available templates at: https://aitmpl.com/'));
274
- console.log(chalk.blue('šŸ“– Read the complete documentation at: https://aitmpl.com/docu/'));
274
+ console.log(chalk.blue('šŸ“– Read the complete documentation at: https://docs.aitmpl.com/'));
275
275
 
276
276
  if (config.language !== 'common') {
277
277
  console.log(chalk.yellow(`šŸ’” Language-specific features for ${config.language} have been configured`));