Expert advice on designing and building robust command-line interfaces.

Install

mkdir -p .claude/skills/cli-re-cinq && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16443" && unzip -o skill.zip -d .claude/skills/cli-re-cinq && rm skill.zip

Installs to .claude/skills/cli-re-cinq

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Expert command-line interface development including argument parsing, subcommands, interactive prompts, and CLI best practices
126 charsno explicit “when” trigger
Beginner

Key capabilities

  • Create command-line tools
  • Implement argument parsing and validation
  • Build interactive CLI applications
  • Design CLI help systems
  • Support cross-platform CLI development
  • Manage CLI testing and distribution

How it works

The skill provides expertise on CLI concepts, libraries, and patterns, offering code examples for argument parsing and interactive elements in various programming languages.

Inputs & outputs

You give it
User needs for CLI development, such as argument parsing or interactive prompts
You get back
Guidance, code examples, and best practices for CLI implementation

When to use cli

  • Designing a new CLI tool
  • Implementing complex argument parsing
  • Building interactive prompts
  • Distributing CLI utilities

About this skill

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Outline

You are a Command Line Interface (CLI) expert specializing in argument parsing, subcommands, interactive prompts, and CLI best practices. Use this skill when the user needs help with:

  • Creating command-line tools and utilities
  • Implementing argument parsing and validation
  • Building interactive CLI applications
  • Designing CLI help systems and documentation
  • CLI testing and distribution
  • Cross-platform CLI development

CLI Libraries (Quick Reference)

LanguagePrimary LibraryNotes
GoCobra + ViperDe facto standard for Go CLIs
PythonClickComposable, decorator-based
RustclapDerive-based, feature-rich
Node.jsCommander.jsMature, widely used

Core CLI Concepts

Argument Parsing

  • Positional arguments: Required arguments in specific positions
  • Optional flags: Parameters with -s / --long syntax
  • Subcommands: Nested command structures (app sub cmd)
  • Environment variables: viper.AutomaticEnv() / click.option(envvar=...)
  • Config files: Persistent configuration layered below flags

Interactive Elements

  • Prompts, confirmations, selection menus, progress bars, spinners

Key Patterns

Go — Cobra + Viper (minimal skeleton)

var rootCmd = &cobra.Command{Use: "myapp", Short: "Does awesome things"}
var verbose bool

func init() {
    cobra.OnInitialize(initConfig)
    rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "verbose output")
    rootCmd.PersistentFlags().StringP("output", "o", "json", "output format (json|yaml|text)")
    rootCmd.AddCommand(configCmd)
}

func initConfig() {
    viper.AddConfigPath(os.UserHomeDir())
    viper.SetConfigName(".myapp")
    viper.AutomaticEnv()
    viper.ReadInConfig()
}

func main() {
    if err := rootCmd.Execute(); err != nil { os.Exit(1) }
}

Python — Click (group + command)

@click.group()
@click.option('--verbose', '-v', is_flag=True)
@click.pass_context
def cli(ctx, verbose):
    ctx.ensure_object(dict)
    ctx.obj['verbose'] = verbose

@cli.command()
@click.argument('filename', type=click.Path(exists=True))
@click.option('--format', '-f', type=click.Choice(['json', 'yaml', 'text']), default='text')
@click.pass_context
def process(ctx, filename, format):
    if ctx.obj['verbose']:
        click.echo(f"Processing: {filename}")
    # ... process and output

Rust — clap derive

#[derive(Parser)]
#[command(author, version, about)]
struct Cli {
    #[arg(short, long, default_value = "config.yaml")]
    config: String,
    #[arg(short, long, action = clap::ArgAction::Count)]
    verbose: u8,
    #[command(subcommand)]
    command: Commands,
}

Interactive Prompts (Click)

if not click.confirm('Deploy to production. Continue?'):
    click.echo('Cancelled.')
    return

with click.progressbar(items, label='Processing') as bar:
    for item in bar:
        process(item)

Testing

// Go: capture output, set args, execute
buf := new(bytes.Buffer)
rootCmd.SetOut(buf)
rootCmd.SetArgs([]string{"--help"})
err := rootCmd.Execute()
# Python: Click test runner
runner = CliRunner()
result = runner.invoke(cli.process, [str(test_file)])
assert result.exit_code == 0

Best Practices

  1. Command design: Use verb-noun names, follow Unix conventions (-s/--long), always provide --help
  2. Output: Support JSON/YAML/text; respect NO_COLOR; use progress indicators for long ops
  3. UX: Confirm destructive ops; provide clear errors with suggestions; support --verbose/--quiet
  4. Distribution: Single-binary where possible; provide shell completion scripts

Complete Reference

For exhaustive patterns, examples, and advanced usage see:

references/full-reference.md

When not to use it

  • When the user does not need help with CLI development

Limitations

  • The skill does not execute CLI commands directly
  • The skill does not automatically generate full CLI applications

How it compares

This skill centralizes CLI development knowledge and provides concrete code patterns, which is more structured than searching for individual solutions or examples.

Compared to similar skills

cli side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
cli (this skill)04moNo flagsBeginner
webapp-testing3534moReviewIntermediate
resolve-conflicts818moReviewIntermediate
telegram-bot-builder1066moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

webapp-testing

anthropics

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

353585

resolve-conflicts

antinomyhq

Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.

81334

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

dev-browser

SawyerHood

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

53176

openspec-onboard

studyzy

Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.

10207

codex-cli-bridge

alirezarezvani

Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools

9180

Search skills

Search the agent skills registry