Skip to content
Back to skills

New Command

ASecurity

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.

  • 11 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 20, 2026
ai-agentstypescriptdatabase

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add Sardor-M/lumen --skill new-command --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of New Command?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for New Command
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sardor-m-new-command/badge)](https://www.skillsdirectory.com/skills/sardor-m-new-command)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

1. Check `src/cli.ts` for already-registered commands
2. Check if a stub exists in `src/commands/`
3. Decide: does this command need LLM? If no, it must work fully offline

## Steps

1. Create or edit `src/commands/<name>.ts` using `templates/command.ts.md`
2. Register in `src/cli.ts`:
    ```typescript
    import { registerX } from './commands/x.js';
    registerX(program);
    ```
3. Run `npx tsc --noEmit` to verify
4. 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

Files in this skill

  • skill.md1.1 KB
  • templates/command.ts.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.