name: new-command description: Scaffold a new Lumen CLI command following the Commander.js register pattern. TRIGGER when user asks to create, add, or implement a new CLI command or subcommand.
Scaffold New Lumen CLI Command
Lumen is CLI-first. Every feature starts as a CLI command. Follow all rules in CLAUDE.md.
Before Scaffolding
- Check
src/cli.tsfor already-registered commands - Check if a stub exists in
src/commands/ - Decide: does this command need LLM? If no, it must work fully offline
Steps
- Create or edit
src/commands/<name>.tsusingtemplates/command.ts.md - Register in
src/cli.ts:import { registerX } from './commands/x.js'; registerX(program); - Run
npx tsc --noEmitto verify - Test:
LUMEN_DIR=$(mktemp -d) npx tsx src/cli.ts <command> <args>
Command-Specific Rules
- Every command needs
.description()for--help - Async actions must wrap in try/catch — Commander does not handle rejections
- Use
audit()for operations that change state (add, compile, delete) - Use
loadConfig()for settings,getDb()for database — both auto-initialize
Related skills
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
Claude CodeCursoradvanced
890
234
3,180
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
claudeCursorWindsurfbeginner
259
72
1,081
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.
claudeCursorWindsurfintermediate
156
44
941