agentsclimarketplace

Cli design

Skill magarcia/skills/skills/cli-design

Agent skills for taking work from idea to merged PR

Install
npx -y skills add magarcia/skills --skill cli-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 13 days oldThe repository was created 13 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Guide for building delightful, human-first command-line tools with proper command structure, output formatting, error handling, configuration, and extensibility. Use when creating CLI tools, adding subcommands, designing CLI output, handling errors in CLIs, or reviewing CLI code for UX issues.

SKILL.md

6.3 KB, as published. Nobody here has run it

CLI Design

Build command-line tools that feel solid, communicate clearly, and compose well with the Unix ecosystem.

When to use

  • Creating a new CLI tool or adding subcommands
  • Designing output format (human, JSON, LLM)
  • Implementing error handling and exit codes
  • Adding authentication, configuration, or plugin systems
  • Reviewing CLI code for usability issues

Core philosophy

  1. Human-first, machine-compatible -- design for humans, then ensure machines can consume output
  2. Conversation, not interrogation -- each invocation is a turn in a dialogue; suggest corrections, show next steps
  3. Consistency over novelty -- follow conventions (--help, -v, --output json, exit codes)
  4. Say just enough -- concise by default, verbose via flags
  5. Robustness as a feeling -- fast startup, clear feedback, no hanging, no cryptic stack traces

Rule index

Rules are organized by domain and impact. See the linked reference for full details with examples.

#DomainRuleImpactReference
1CommandUse tool <noun> <verb> [flags] for multi-resource CLIsCRITICALcommand-structure
2CommandKeep subcommand nesting to 2 levels maxHIGHcommand-structure
3CommandPrefer flags over positional args (self-documenting, order-independent)HIGHcommand-structure
4CommandEvery flag has a long form; common ones also get a short formMEDIUMcommand-structure
5CommandSupport global flags: --help, --version, --verbose, --output, --no-color, --quietCRITICALcommand-structure
6OutputDetect TTY -- adapt output to terminal vs pipeCRITICALoutput-design
7Outputstdout for data, stderr for messages/progress/errorsCRITICALoutput-design
8OutputSupport --output json with stable schemaCRITICALoutput-design
9OutputSupport --output llm for agent-friendly consumptionHIGHoutput-design
10OutputUse color for scannability, not decoration; respect NO_COLORMEDIUMoutput-design
11OutputShow spinners/progress for long operations on stderrHIGHoutput-design
12HelpShow concise summary when run with no args; full help on --helpCRITICALhelp-system
13HelpLead with examples in help textHIGHhelp-system
14HelpSuggest corrections on typos and next steps after actionsHIGHhelp-system
15HelpProvide shell completion for bash, zsh, fish, powershellMEDIUMhelp-system
16ErrorsEvery error answers: what happened, why, and what to doCRITICALerror-handling
17ErrorsUse namespaced error codes (AUTH-003, NET-001)HIGHerror-handling
18ErrorsDefine clear exit code mapping (0=success, 1=general, 2=usage, etc.)HIGHerror-handling
19ErrorsNever show raw stack traces; log to debug fileHIGHerror-handling
20InteractivePrompt for missing args only when stdin is TTY; fail with --no-inputHIGHinteractivity
21InteractiveConfirm destructive actions; support --yes to bypassCRITICALinteractivity
22ConfigFollow XDG Base Directory (~/.config/mycli/) on all platformsHIGHconfiguration
23ConfigPrecedence: flags > env vars > project config > user config > defaultsHIGHconfiguration
24AuthSupport tokens through environment, stored credentials, and interactive login; never command-line flagsHIGHauthentication
25ExtendUse mycli-<name> executable pattern for pluginsMEDIUMextensibility
26PerfTarget <100ms cold start; defer work until neededHIGHperformance
27PerfPrint something within 100ms; responsiveness > raw speedHIGHperformance
28DistShip single static binary when possibleHIGHdistribution
29DistSupport --version with version, commit hash, build dateMEDIUMdistribution
30TestIntegration-test full CLI invocations (stdout, stderr, exit codes)HIGHtesting
31RobustHandle SIGINT (exit 130), SIGTERM (exit 143), SIGPIPE (exit silently)HIGHtesting
32RobustValidate input early, bail before state changesHIGHerror-handling
33RobustDesign for crash-only: avoid cleanup requirements on exitMEDIUMtesting
34SecurityNever accept secrets via flags (visible in ps, shell history)CRITICALconfiguration
35FutureKeep changes additive; deprecate before removingHIGHdistribution

Workflow

When building or reviewing a CLI tool:

  1. Read the relevant reference files for the domains you're working on
  2. Apply rules by impact -- CRITICAL first, then HIGH, then MEDIUM
  3. Use the checklist before shipping

Additional references

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.