Agent skill

CLI Design

by caarlos0 in caarlos0/dotfiles

Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility.

MITAuto-check passedFrontend & Design

Install CLI Design

skills CLI
$ npx skills add caarlos0/dotfiles --skill cli-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install caarlos0/dotfiles cli-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/caarlos0/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cli-design .claude/skills/cli-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cli-design
GitHub stars
220
Token cost
~4.2k tokens
SKILL.md length
2,144 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility.

  • Works in 3 steps: The human workflows: discovery, common… → The automation workflows: unattended… → The public contract: commands, options,…
  • Changing commands
  • SKILL.md covers Define the contract first, Design predictable commands, Make help useful at the point… and Keep the stream contract strict, plus 11 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

CLI Design is an agent skill from caarlos0/dotfiles. Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility. Use when adding or changing commands, flags, help, output, prompts, configuration, or exit behavior.

Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering UX design. The licence is MIT.

When your agent uses it

  • Changing commands
  • Tasks that involve UX design

Example prompts

  • “/cli-design”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. The human workflows: discovery, common use, mistakes, recovery, and advanced
  2. The automation workflows: unattended execution, input, output parsing,
  3. The public contract: commands, options, operands, defaults, streams, exit

What it can do on your machine

Read from SKILL.md and the folder at commit 278c761. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • pubs.opengroup.org
    • gnu.org
    • clig.dev
    • git-scm.com
    • cli.github.com
    • no-color.org
    • specifications.freedesktop.org
    • cheatsheetseries.owasp.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CLI Design loads about 4.2k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 2,144 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from caarlos0/dotfiles at commit 278c761, republished under its MIT licence (© caarlos0). 2,144 words, ~4,230 tokens.

Download SKILL.mdSave it as .claude/skills/cli-design/SKILL.md (or your agent's skills folder).
name
cli-design
description
Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility. Use when adding or changing commands, flags, help, output, prompts, configuration, or exit behavior.
user_invocable
true

CLI Design

Treat a CLI as both a human interface and a stable automation API. Follow repository instructions and existing command conventions before introducing a new grammar, output format, exit status, or configuration mechanism.

Define the contract first

Before implementation, identify separately:

  1. The human workflows: discovery, common use, mistakes, recovery, and advanced use.
  2. The automation workflows: unattended execution, input, output parsing, failure handling, and composition with other tools.
  3. The public contract: commands, options, operands, defaults, streams, exit statuses, prompts, environment variables, configuration, and structured output.

Write representative invocations before choosing a parser or framework:

text
tool [global-options] <command> [command-options] [operands]

Use noun/verb subcommands when they fit the domain, but preserve an established project grammar. Prefer a shallow, regular hierarchy over many special cases.

Design predictable commands

  • Give commands and long options lowercase, descriptive, spellable names.
  • Use commands for actions and options for parameters or behavior modifiers.
  • Keep the same concept named and spelled consistently across commands.
  • Reserve short options for frequent operations and provide a descriptive long equivalent. Do not assign every option a short form.
  • Prefer explicit options over ambiguous positional arguments. Use positional operands when their meaning and order are obvious.
  • Support -- before operands so names beginning with - remain addressable.
  • Where file operands make sense, consider - as stdin or stdout and document the exact behavior.
  • Decide whether options may appear after operands, whether short options may be grouped, and how optional values parse. Document and test the decision.
  • Do not accept arbitrary command abbreviations. Suggest likely corrections, but never silently execute a guessed command.
  • Treat aliases as compatibility interfaces. Add one only when it is worth supporting for the lifetime of the CLI.
  • Avoid implicit catch-all behavior that turns a typo into another valid, potentially destructive operation.

Familiar options such as --help, --version, --quiet, --verbose, --output, --json, --color, --no-input, and --dry-run should retain their conventional meaning.

Make help useful at the point of failure

  • Provide -h and --help at every command level unless an established compatibility contract prevents it.
  • Help must exit successfully without performing normal work, loading remote data, or requiring valid credentials or configuration.
  • Order help for scanning: purpose, usage, common examples, common options, remaining options or commands, then further documentation.
  • Lead with realistic examples, including piped or unattended use where relevant.
  • Show defaults, accepted values, units, repetition rules, conflicts, and whether an option can be supplied through configuration or environment.
  • For invalid input, explain the specific problem and show only the relevant usage or hint. Do not print the entire manual after every typo.
  • Distinguish parse errors from operational failures.
  • For large CLIs, keep default help concise and provide a full-help or reference tier.
  • Generate help, shell completion, and reference documentation from the same command model where practical so they cannot drift.

Completion must tolerate incomplete input and must be fast, non-interactive, side-effect-free, and safe when configuration, credentials, or the network are unavailable. Avoid remote completion unless it is explicitly bounded and has a local fallback.

Keep the stream contract strict

  • Write requested result data to stdout.
  • Write diagnostics, warnings, prompts, progress, and debug information to stderr.
  • Do not write headings, notices, progress, or ANSI control sequences into machine-readable stdout.
  • Assert stdout, stderr, and exit status independently in tests.
  • Keep --quiet limited to nonessential messaging. It must not change result semantics, suppress required errors, or turn failure into success.
  • Send verbose or debug diagnostics to stderr and redact secrets.

Human-readable tables and prose may evolve for usability. Do not require scripts to parse them. When automation is expected, provide an explicit stable format such as:

  • JSON for one bounded result;
  • JSON Lines for streamed records or events;
  • plain delimited fields where JSON is excessive;
  • templates or field selection for user-controlled rendering;
  • NUL-delimited output when values may contain whitespace or newlines.

Document machine-output fields, types, nullability, encoding, framing, ordering, and compatibility policy. If ordering is not guaranteed, say so. Human and machine renderers should consume the same application result rather than implementing behavior separately.

Define exit behavior deliberately

Return zero only for documented success. Use a small, stable, documented set of nonzero statuses rather than exposing arbitrary internal errors.

Decide explicitly how the command reports:

  • invalid usage;
  • operational failure;
  • authentication or authorization failure;
  • missing resources;
  • empty or no-match results;
  • cancellation or interruption;
  • partial success;
  • accepted or pending asynchronous work.

Do not let partial success look like full success. Report completed and failed items separately and choose an exit status that allows automation to detect the failure.

Follow established shell conventions where applicable, but do not invent portable meaning for every numeric status. Document the statuses that callers are expected to branch on.

Handle broken pipes as normal pipeline termination when the platform and command semantics permit it. Do not replace useful output with a stack trace because a downstream command stopped reading.

Write actionable errors

Expected user-facing failures should answer:

  1. What failed?
  2. Why did it fail?
  3. What can the user do next?

Use domain language rather than parser, transport, or stack internals. Include the relevant resource, option, configuration source, or rejected value without revealing secrets.

  • Put the primary error first and actionable hints afterward.
  • Name the exact replacement option or command when suggesting a fix.
  • Show concise contextual usage for usage errors.
  • Preserve the underlying cause for debugging without dumping a stack trace by default.
  • Group repeated failures when one explanation applies to many items.
  • Never catch an error merely to return success-shaped output or an empty result.

Represent errors structurally inside the application, with a stable category or code, user message, optional hints, underlying cause, and exit status. Render them only at the process boundary.

Keep TTY behavior presentational

Detect stdin, stdout, and stderr independently. They may point to different kinds of destinations.

TTY state may control:

  • color and styling;
  • paging;
  • wrapping and headings;
  • buffering;
  • progress animation;
  • whether prompting is possible.

TTY state must not silently change the selected resources, operation, result schema, or other command semantics.

  • Disable cursor motion, animation, and paging when their output stream is not a terminal unless explicitly forced.
  • Never prompt unless both input and prompt output are usable terminals.
  • Keep redirected and CI output linear and stable.
  • Support NO_COLOR, TERM=dumb, and an explicit color mode such as --color=auto|always|never.
  • Never encode meaning with color alone. Pair it with text, symbols, or structure.
  • Sanitize untrusted terminal control sequences before displaying external data.
  • Restore terminal state after cancellation and failure.

Use a pager only for long human-readable output, only when appropriate for the output destination, and provide a way to disable it. Do not page structured output.

Make interactivity optional

Every prompt must have a complete unattended equivalent through an option, operand, stdin, configuration, or environment variable.

  • Provide --no-input or an equivalent control when commands might prompt.
  • In non-interactive mode, fail immediately and name the missing input and its replacement option.
  • Display prompt defaults explicitly. Destructive choices should default to the safe answer.
  • Do not infer consent merely because stdin is closed or output is redirected.
  • Keep prompt wording, accepted answers, and cancellation behavior consistent.
  • Treat Ctrl-C as cancellation: stop starting new work, restore terminal state, and return the documented cancellation status.

Do not make a full-screen or interactive selector the only route to an operation. Share application logic between interactive and non-interactive adapters. Use tui-design when the task specifically involves a full-screen terminal interface.

Show full SKILL.md (931 more words)Show less

Scale safety to consequences

For risky operations, show the target, scope, count, and consequences before execution or confirmation.

  • Do not confirm low-risk actions that the user explicitly requested.
  • Use a yes/no confirmation for moderate risk.
  • Require a typed resource name or similarly strong confirmation for broad, destructive, externally visible, or hard-to-reverse operations.
  • Prefer reliable undo over confirmation when undo is genuinely available.
  • Provide --dry-run for bulk, remote, destructive, or otherwise hard-to-reverse operations.
  • Make dry-run follow real selection, validation, and planning paths; only the final side effect should differ.
  • Keep --force narrow. It may bypass a named confirmation or conflict, but must not bypass validation, authentication, or authorization.
  • Make retries and idempotency deliberate for remote mutations. Do not repeat an operation automatically unless duplicate execution is safe or detectable.

Never accept secrets through ordinary argv when a safer channel is available; process arguments may be visible to other processes, logs, and shell history. Prefer hidden prompts, stdin, restricted files, file descriptors, credential stores, or secret managers.

Invoke subprocesses with argument vectors. Never build a shell command by interpolating untrusted values, and use -- before untrusted operands when the target command supports it.

Make configuration explainable

Define and test one precedence order. A strong default, from lowest to highest, is:

text
built-in defaults
< system configuration
< user configuration
< project or workspace configuration
< environment variables
< command-line options

Adapt the order when the product has an established contract, but document it.

  • Preserve the source of each effective value for diagnostics.
  • Report malformed configuration with the file, field, and source location.
  • Do not silently ignore an invalid higher-precedence value and fall back to a lower one.
  • Define whether maps, lists, and repeated values merge or replace.
  • Provide a way to inspect effective configuration and provenance when the system is complex.
  • Separate configuration, data, state, cache, and runtime files.
  • Follow platform conventions; use XDG base directories on Unix-like systems where appropriate.
  • Load expensive or failure-prone configuration lazily so --help, --version, and static completion remain reliable.

Environment variable names and configuration paths are public interfaces. Changing them requires the same compatibility care as changing an option.

Keep the CLI adapter thin

Separate command mechanics from application behavior:

  1. Parse syntax and perform primitive validation.
  2. Convert parser values into framework-independent request types.
  3. Invoke application logic through narrow dependencies.
  4. Produce a framework-independent result or structured error.
  5. Render the selected human or machine format.
  6. Decide the final exit status at the top-level process boundary.

Keep networking, filesystem access, prompts, clocks, and process execution out of parser callbacks. Do not terminate the process from reusable application code.

Use one composition root. Inject only dependencies needed by the operation. This keeps domain behavior reusable by commands, tests, background work, and interactive interfaces.

Preserve compatibility deliberately

Before changing an existing CLI, inspect all public surfaces:

  • command and subcommand names;
  • options, aliases, defaults, and positional order;
  • parsing rules;
  • prompts and unattended behavior;
  • stdout, stderr, color, progress, and paging;
  • exit statuses;
  • environment variables and configuration paths;
  • machine-readable fields, types, ordering, and framing;
  • shell completion and generated documentation.

Prefer additive changes. A usability improvement is still a breaking change if scripts depend on the old behavior.

For deprecations:

  • keep the old interface working during the stated migration window;
  • emit one concise warning on stderr;
  • name the replacement and, where useful, show the equivalent invocation;
  • document the removal release or policy;
  • keep completion behavior intentional;
  • add a compatibility test for both the deprecated and replacement forms.

Version structured output when consumers cannot safely absorb an incompatible schema change. Do not use a product version bump as a substitute for a migration path when compatibility can reasonably be preserved.

Verify the real contract

Use the lowest test layer that proves each behavior, plus focused full-process tests for the command boundary.

Test at least the relevant cases:

  • root and subcommand help, with exit zero and no side effects;
  • unknown command, unknown option, missing value, extra operand, and --;
  • operands beginning with -;
  • stdout, stderr, and exit status captured separately;
  • TTY, redirected, piped, CI, TERM=dumb, and NO_COLOR behavior;
  • prompted and option-driven paths, --no-input, closed stdin, and Ctrl-C;
  • dry-run and destructive confirmation;
  • every documented exit class, including empty and partial results;
  • parseable structured output with the documented fields and types;
  • absence of progress, prompts, and ANSI sequences in machine output;
  • configuration precedence, invalid values, and source diagnostics;
  • completion for incomplete input without prompts or side effects;
  • deprecated syntax and its replacement;
  • broken-pipe and cancellation cleanup.

Normalize paths, timestamps, terminal width, and colors in tests only when they are not part of the contract. Use writing-tests for determinism and process testing guidance, and change-impact-auditor when changing defaults, configuration, protocols, or shared output models.

Review failures

Flag these as defects unless the project documents a deliberate exception:

  • scripts must parse decorative human tables or prose;
  • result data and diagnostics share the same stream;
  • JSON or plain output contains progress, prompts, or ANSI sequences;
  • an error or partial operation exits as full success;
  • a command prompts without a non-interactive path;
  • redirected output changes operation semantics rather than presentation;
  • secrets appear in argv, logs, diagnostics, or generated commands;
  • untrusted text is interpolated into shell commands;
  • configuration precedence or merge behavior is undefined;
  • malformed configuration silently falls back;
  • completion performs mutations, prompts, or unbounded network work;
  • structured-output schemas change without compatibility consideration;
  • aliases, defaults, exit codes, or parsing behavior break without migration;
  • a guessed command is executed after a typo.

References

These principles are based on established standards and mature CLI practice:

© caarlos0, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cli-design of caarlos0/dotfiles.

Open the folder on GitHubat commit 278c761

Compare with similar skills

CLI Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CLI Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI Design this skillcaarlos0/dotfiles220—~4.2kAutomated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Interface Design for Dashboards and Appsholaboss-ai/holaOS11k3 repos~6kAutomated safety check: PassMIT
Animategrowupanand/ConvoForm1016 repos~1.9kAutomated safety check: PassApache-2.0
Migrate Content Iadocker/docs4.7k—~5.1kAutomated safety check: PassApache-2.0
UX WalkthroughXiaoMi/hiui877—~1.3kAutomated safety check: PassMIT

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Pushes an agent past generic defaults when designing dashboards, admin panels, SaaS apps and tools, with attention to structure, type, navigation and how data is shown.

    11k GitHub starsUsed in 3 repos~6k tokens
    Frontend & DesignAuto-check passed
  • Animate

    growupanand/ConvoForm

    Review a feature and enhance it with purposeful animations, micro-interactions, and motion effects that improve usability and delight.

    101 GitHub starsUsed in 6 repos~1.9k tokens
    Frontend & DesignAuto-check passed
  • Official

    Handle Hugo docs information-architecture moves: discover old vs new URLs, add front matter aliases (Phase 1), update in-repo links (Phase 2), interactive List 2 resolution and fragment validation…

    4.7k GitHub stars~5.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • UX Walkthrough

    XiaoMi/hiui

    体验走查 skill。适用于代码库、URL、截图三种输入,输出结构化体验问题报告,并同步生成本地 docx 报告。触发词:体验走查、UX review、交互走查、界面审查、体验问题。

    877 GitHub stars~1.3k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Color Audit

    rome-os/rome

    Audit a design system's color palette against measurable color-science disciplines — WCAG/APCA contrast of declared token pairs, perceptual (OKLCH) ramp uniformity, color-blindness safety of…

    717 GitHub stars~2.7k tokensUpdated today
    Frontend & DesignAuto-check passed

More from caarlos0/dotfiles

All 20 skills in this repo
  • Dependabot Merge

    caarlos0/dotfiles

    Review and merge open dependency pull requests from Dependabot, Renovate and similar bots across the goreleaser organization and the caarlos0 user.

    220 GitHub stars~5k tokensUpdated yesterday
    Auto-check passed
  • Gh CLI

    caarlos0/dotfiles

    Use GitHub CLI efficiently for pull requests, CI checks, workflow runs, logs, and merge status.

    220 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Tui Design

    caarlos0/dotfiles

    Design terminal user interfaces and interactive CLIs that stay usable, accessible, and scriptable.

    220 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Dashboard

    caarlos0/dotfiles

    Design and review dashboards that are informative, honest, accessible, and visually polished, independent of any tool.

    220 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Gh Doc Author

    caarlos0/dotfiles

    Author and revise clear GitHub internal documentation, including design docs, proposals, decision records, runbooks, status updates, and handoffs.

    220 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Go Performance

    caarlos0/dotfiles

    Profile and optimize Go CPU, allocations, GC, concurrency, and I/O with benchmarks and pprof.

    220 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about CLI Design

What does CLI Design do?

Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility. CLI Design is an agent skill from caarlos0/dotfiles. Design and review command-line interfaces for usability, automation, safety, accessibility, and long-term compatibility.

When should I use CLI Design?

CLI Design fits situations like: changing commands; tasks that involve UX design.

How do I install CLI Design in Claude Code?

Run `npx skills add caarlos0/dotfiles --skill cli-design -a claude-code`. Or copy the skill folder (skills/cli-design in caarlos0/dotfiles) into .claude/skills/cli-design in your project. Claude Code loads it when a task matches its description.

How do I install CLI Design in Codex?

Run `npx skills add caarlos0/dotfiles --skill cli-design -a codex`. Or copy the skill folder (skills/cli-design in caarlos0/dotfiles) into .agents/skills/cli-design in your project. Codex loads it when a task matches its description.

Can I use CLI Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add caarlos0/dotfiles --skill cli-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cli-design, .gemini/skills/cli-design, .github/skills/cli-design and .opencode/skills/cli-design in your project.

What does CLI Design need to run?

SKILL.md names no scripts, command-line tools or credentials: CLI Design is instructions for the agent only.

Does CLI Design access the network?

SKILL.md names 8 domains. As links in the text: pubs.opengroup.org, gnu.org, clig.dev, git-scm.com, cli.github.com, no-color.org, specifications.freedesktop.org and cheatsheetseries.owasp.org. This is read from the text; nothing was executed.

Is CLI Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does CLI Design use?

CLI Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CLI Design use?

About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CLI Design?

Skills that share tags, products or a category with CLI Design: Impeccable (bestofjs/bestofjs, 3.1k stars), Interface Design for Dashboards and Apps (holaboss-ai/holaOS, 11k stars), Animate (growupanand/ConvoForm, 101 stars) and Migrate Content Ia (docker/docs, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI Design?

caarlos0 (a GitHub user) maintains it in caarlos0/dotfiles, which has 220 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 7, 2026.

Source: caarlos0/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.