Skip to content
Documentation
Skill

/new-command

Scaffold a new CLI command for Cortex TMS following the existing codebase patterns.

From plugin
cortex-tms
1816 skills
Install
$ npx -y skills add cortex-tms/cortex-tms --skill new-command --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/new-command

Context preview

The summary Claude sees to decide when to auto-load this skill.

Scaffold a new CLI command for Cortex TMS following the existing codebase patterns.

SKILL.md

new-command.SKILL.md
name: new-command
description: Scaffold a new CLI command for Cortex TMS following the existing codebase patterns.
disable-model-invocation: true

New Command

Scaffold a new CLI command for Cortex TMS.

Before Writing Code

1. **Read existing patterns** — look at src/commands/archive.ts and src/commands/status.ts as reference implementations 2. **Read types** — check src/types/cli.ts for existing interfaces 3. **Read tests** — check src/__tests__/archive.test.ts for the test pattern 4. **Propose the command** — describe what it does, its subcommands/options, and which files will be created/modified. Follow Propose/Justify/Recommend. Wait for approval.

Implementation Checklist

After the user approves the plan:

  • [ ] Create `src/commands/<name>.ts` — export `createXCommand()` and `xCommand`
  • [ ] Add types to `src/types/cli.ts` if needed
  • [ ] Register in `src/cli.ts` — import and `program.addCommand()`
  • [ ] Create `src/__tests__/<name>.test.ts` — follow existing test patterns
  • [ ] Add section to `README.md` under CLI Commands
  • [ ] Update `NEXT-TASKS.md` — check off the task

Rules

  • Match the exact patterns in existing commands (Commander.js, chalk, ora)
  • Follow existing test patterns (vitest, createTempDir, runCommand)
  • If the user asks a question, STOP and answer before continuing
  • Show git diff before committing. Wait for approval.

Arguments

$ARGUMENTS — the name and purpose of the new command

Read more
Ships withcortex-tms

The Universal AI-Optimized Project Boilerplate. A Tiered Memory System (TMS) designed to maximize AI agent performance. Includes an interactive CLI tool and a high-signal documentation standard.

Get the whole plugin
Stats
181
Stars
7
Forks
Active
Maintenance
MDX
Language
MIT
License
1d ago
Last commit
7mo ago
Created

Repo: cortex-tms/cortex-tms