Install any skill in seconds. Free to start, no credit card required.
Get Started Free →caliber-ai-org/adding-a-command
Creates a new CLI command following the Commander.js pattern in src/commands/. Handles command registration in src/cli.ts, telemetry tracking via tracked() wrapper, and option parsing.
Passed 21 of 22 test cases with the skill, and 4 of 22 without it.
and 29 more in the full report
17 fixed4 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 17 test cases the skill fixed. Same model, same prompt, with and without the skill.
In our existing `src/bin.ts` entry point file, we catch global uncaught errors thrown by CLI commands. How should the global error handler check for graceful exit errors versus system errors and set `process.exitCode`?
| Checked | Without skill | With skill |
|---|---|---|
| Checks if `error.message === '__exit__'` to suppress printing the stack trace. | Missed | Passed |
| Sets `process.exitCode = 1` for error conditions. | Passed | Passed |
The instructions your model reads when the skill loads.
export async function myCommand(options?: OptionType). Never use default exports..command() chain in src/cli.ts, wrapped with tracked() for telemetry.throw new Error('__exit__') to exit gracefully without printing the error message. Use chalk for user-facing messages.Create the command file at src/commands/{commandName}.ts with named async export.
export async function {commandName}Command(options?: { optionName?: optionType }) { ... }Handle errors consistently: Wrap error-prone operations in try/catch. Distinguish between user errors and system errors:
console.error(chalk.red('message')); throw new Error('__exit__');throw new Error('Detailed error message'); — this will print and exit with code 1..fail() before throwing.Import and register in src/cli.ts in the correct location:
import { {commandName}Command } from './commands/{commandName}.js';sources)..command('{kebab-name}').description('...').option(...).action(tracked('{kebab-name}', {commandName}Command))sources add): sources.command('add').description(...).action(tracked('sources:add', sourcesAddCommand))tracked('{command-name}', handler) for automatic telemetry.Define options (if needed):
.option() chains before .action(): .option('--flag', 'Description') or .option('--opt <value>', 'Description').option('--opt <value>', 'Description', parseFunction).action(tracked('name', (opts) => command(opts)))Verify before proceeding:
test cases passed, vs 4 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.