Skills

CLI Developer

Use when building CLI tools, implementing argument parsing, or adding interactive prompts.

Install

npx skills add Jeffallan/claude-skills --skill cli-developer -g -a claude-code -y
Category
Design
Updated
5d ago
License
MIT
Context cost
Lightabout 1,003 tokens
Runs scripts
No, instructions only

What it does

Use when building CLI tools, implementing argument parsing, or adding interactive prompts. Invoke for parsing flags and subcommands, displaying progress bars and spinners, generating bash/zsh/fish completion scripts, CLI design, shell completions, and cross-platform terminal applications using commander, click, typer, or cobra.

CLI Developer

Core Workflow

  1. Analyze UX, Identify user workflows, command hierarchy, common tasks. Validate by listing all commands and their expected --help output before writing code.
  2. Design commands, Plan subcommands, flags, arguments, configuration. Confirm flag naming is consistent and no existing signatures are broken.
  3. Implement, Build with the appropriate CLI framework for the language (see Reference Guide below). After wiring up commands, run <cli> --help to verify help text renders correctly and <cli> --version to confirm version output.
  4. Polish, Add completions, help text, error messages, progress indicators. Verify TTY detection for color output and graceful SIGINT handling.
  5. Test, Run cross-platform smoke tests; benchmark startup time (target: <50ms).

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Design Patternsreferences/design-patterns.mdSubcommands, flags, config, architecture
Node.js CLIsreferences/node-cli.mdcommander, yargs, inquirer, chalk
Python CLIsreferences/python-cli.mdclick, typer, argparse, rich
Go CLIsreferences/go-cli.mdcobra, viper, bubbletea
UX Patternsreferences/ux-patterns.mdProgress bars, colors, help text

Quick-Start Example

Node.js (commander)

#!/usr/bin/env node
// npm install commander
const { program } = require('commander');

program
  .name('mytool')
  .description('Example CLI')
  .version('1.0.0');

program
  .command('greet <name>')
  .description('Greet a user')
  .option('-l, --loud', 'uppercase the greeting')
  .action((name, opts) => {
    const msg = `Hello, ${name}!`;
    console.log(opts.loud ? msg.toUpperCase() : msg);
  });

program.parse();

For Python (click/typer) and Go (cobra) quick-start examples, see references/python-cli.md and references/go-cli.md.

Constraints

Read the whole SKILL.md on GitHub

More in Design