Generate Commander.js CLI project structure with TypeScript, commands, options, and best practices. Creates a complete scaffolded CLI application ready for development.
Generates a complete Commander.js CLI application with TypeScript, proper project structure, and best practices.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdGenerate a complete Commander.js CLI application with TypeScript, proper project structure, and best practices.
Invoke this skill when you need to:
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Name of the CLI project (kebab-case) |
| description | string | Yes | Short description of the CLI |
| commands | array | No | List of commands to scaffold |
| typescript | boolean | No | Use TypeScript (default: true) |
| packageManager | string | No | npm, yarn, or pnpm (default: npm) |
{
"commands": [
{
"name": "init",
"description": "Initialize a new project",
"options": [
{ "flags": "-t, --template <name>", "description": "Template to use" },
{ "flags": "-f, --force", "description": "Overwrite existing files" }
],
"arguments": [
{ "name": "<directory>", "description": "Target directory" }
]
}
]
}
<projectName>/
├── package.json
├── tsconfig.json
├── .gitignore
├── README.md
├── src/
│ ├── index.ts # Entry point with shebang
│ ├── cli.ts # Main CLI setup
│ ├── commands/
│ │ ├── index.ts # Command exports
│ │ └── <command>.ts # Individual commands
│ ├── utils/
│ │ ├── logger.ts # Logging utilities
│ │ └── config.ts # Configuration helpers
│ └── types/
│ └── index.ts # Type definitions
├── bin/
│ └── <projectName> # Compiled binary entry
└── tests/
└── commands/
└── <command>.test.ts
import { Command } from 'commander';
import { version } from '../package.json';
const program = new Command();
program
.name('<projectName>')
.description('<description>')
.version(version, '-v, --version', 'Display version number');
// Register commands
program.addCommand(initCommand);
program.addCommand(buildCommand);
// Global options
program
.option('-d, --debug', 'Enable debug mode')
.option('-q, --quiet', 'Suppress output');
// Error handling
program.exitOverride();
try {
program.parse();
} catch (err) {
// Handle gracefully
}
import { Command } from 'commander';
export const <name>Command = new Command('<name>')
.description('<description>')
.argument('<required>', 'Required argument description')
.argument('[optional]', 'Optional argument description')
.option('-o, --option <value>', 'Option description', 'default')
.action(async (required, optional, options) => {
// Command implementation
});
{
"dependencies": {
"commander": "^12.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0",
"tsx": "^4.0.0",
"vitest": "^1.0.0"
}
}
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.