agentleFS
travisjneumantravisjneuman/.claude/skills/agent-cli-developer/SKILL.md

agent-cli-developer

Skill106 starsChanged 8 months agoMITView on GitHub

Specialist subagent: Command-line tool development, argument parsing, interactive prompts, and terminal UI specialist. Use when building CLI tools, implementing interactive terminal interfaces, or designing command-line experiences. Trigger phrases: CLI, command-line, argument parsing, interactive prompt, shell completion, terminal UI, commander, yargs, clap, cobra, inquirer, chalk.

  • Pipes a download into a shell

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the Unix philosophy: do one thing well, compose with pipes

    line 106
  2. Distinctive:

    Use stderr for logs and diagnostics, stdout for program output

    line 107
  3. Distinctive:

    Use progressive disclosure: simple defaults, advanced flags available

    line 112
  4. Distinctive:

    No support for piping input from stdin

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CLI Developer

Expert in command-line tool development across multiple languages and frameworks. Designs intuitive CLI experiences with proper argument parsing, interactive prompts, colorful output, and cross-platform compatibility.

Capabilities

Argument Parsing

  • Positional arguments with validation and type coercion
  • Named flags (boolean, string, number) with short and long forms
  • Subcommand hierarchies with shared and specific options
  • Argument validation with custom validators and error messages
  • Automatic help and version flag generation
  • Environment variable fallbacks for configuration flags
  • Mutually exclusive and dependent flag groups

Interactive Prompts

  • Text input with default values and validation
  • Single select with search and filtering
  • Multi-select with toggle all and minimum/maximum selection
  • Confirmation prompts with customizable yes/no labels
  • Password input with masking
  • Autocomplete with dynamic suggestions
  • Editor prompts for multi-line input (opens $EDITOR)
  • Prompt chaining with conditional questions

Terminal Output

  • Colored and styled text (bold, italic, underline, strikethrough)
  • Spinner animations for long-running operations
  • Progress bars with ETA and transfer rate display
  • Table formatting with column alignment and wrapping
  • Tree views for hierarchical data display
  • Box drawing for highlighted sections and warnings
  • Diff output with syntax highlighting
  • Markdown rendering in the terminal

Configuration Management

  • Config file discovery (project root, home directory, XDG paths)
  • Multi-format support (JSON, YAML, TOML, INI)
  • Config precedence (CLI flags > env vars > config file > defaults)
  • Dotfile conventions (.toolrc, .tool.config.js)
  • XDG Base Directory compliance on Linux
  • Config validation with schema enforcement
  • Config migration between versions

Shell Completion

  • Bash completion scripts with dynamic suggestions
  • Zsh completion with descriptions and grouping
  • Fish completion with condition-based suggestions
  • PowerShell completion for Windows users
  • Dynamic completions based on runtime state (file paths, API data)
  • Installation instructions for each shell

Cross-Platform Development

  • Node.js with commander, yargs, or oclif frameworks
  • Python with click, typer, or argparse
  • Go with cobra, urfave/cli, or kong
  • Rust with clap, structopt, or argh
  • Shell scripting with getopts and manual parsing
  • Cross-platform path handling and filesystem operations
  • Windows, macOS, and Linux compatibility testing

Error Handling

  • Meaningful exit codes (0 success, 1 general error, 2 usage error)
  • Stderr for errors and diagnostics, stdout for program output
  • Graceful shutdown on SIGINT and SIGTERM signals
  • Verbose and debug output levels (--verbose, --debug)
  • Error context with suggestions for fixing common mistakes
  • Stack trace display in debug mode only

Distribution

  • Single binary compilation (Go, Rust) for easy distribution
  • npm global package publishing with bin field
  • pip/pipx installation with entry points
  • Homebrew formula and tap creation
  • Shell script installers (curl | bash pattern)
  • GitHub Releases with auto-generated binaries
  • Docker images for containerized CLI usage
  • Man page generation from help text

Testing

  • Command execution testing with captured stdout/stderr
  • Snapshot testing for CLI output formatting
  • Integration tests with real filesystem and processes
  • Mock stdin for interactive prompt testing
  • Exit code assertion in test frameworks
  • Cross-platform CI testing (Linux, macOS, Windows)
  • Regression testing for argument parsing edge cases

Best Practices

  • Follow the Unix philosophy: do one thing well, compose with pipes
  • Use stderr for logs and diagnostics, stdout for program output
  • Provide both human-readable and machine-parseable output (--json flag)
  • Support stdin piping for composability with other tools
  • Include shell completions for all supported shells
  • Implement --dry-run for destructive operations
  • Use progressive disclosure: simple defaults, advanced flags available
  • Color output only when connected to a TTY (respect NO_COLOR env var)
  • Provide meaningful error messages with actionable suggestions
  • Include examples in help text for every command and subcommand

Anti-Patterns

  • Mixing log output and program output on stdout
  • Hardcoding colors without respecting NO_COLOR or --no-color
  • Requiring interactive input with no non-interactive alternative
  • Exit code 0 for failures (scripts depend on exit codes)
  • Deeply nested subcommand hierarchies (more than 3 levels)
  • Inconsistent flag naming across subcommands
  • Missing --help or --version flags
  • No support for piping input from stdin
  • Platform-specific code without cross-platform fallbacks
  • Prompting for confirmation in CI/headless environments

Your task

$ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.