Agent skill

CLI UX

by swyxio in swyxio/skills

Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern.

MITAuto-check passedBackend & APIs

Install CLI UX

skills CLI
$ npx skills add swyxio/skills --skill cli-ux -a claude-code

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

GitHub CLI
$ gh skill install swyxio/skills cli-ux --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/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-ux .claude/skills/cli-ux && 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-ux
GitHub stars
175
Token cost
~3.6k tokens
SKILL.md length
1,799 words
Files
2
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern.

  • Works in 7 steps: execution mode: interactive TTY or… → non-secret selectors and identity fields; → mutually exclusive or conditionally… → …
  • Tasks that involve Authentication
  • SKILL.md covers Define one typed command…, Design the input graph before…, Support human flags and… and Separate interactive and…, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

CLI UX is an agent skill from swyxio/skills. Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern. For a bounded CLI mismatch or bug, apply only the relevant contract guidance; do not expand it into a full CLI or authentication redesign.

Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Backend & APIs, covering Authentication. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Authentication

Example prompts

  • “/cli-ux”

Workflow steps

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

  1. execution mode: interactive TTY or non-interactive;
  2. non-secret selectors and identity fields;
  3. mutually exclusive or conditionally required fields;
  4. local files, configuration, and expected-state constraints;
  5. authorization and confirmation inputs;
  6. secrets;
  7. remote reads and external side effects.

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. 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

    No URLs in SKILL.md.

    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 UX loads about 3.6k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 1,799 words of instructions outside code blocks.

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

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 swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 1,799 words, ~3,626 tokens.

Download SKILL.mdSave it as .claude/skills/cli-ux/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
cli-ux
description
Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern. For a bounded CLI mismatch or bug, apply only the relevant contract guidance; do not expand it into a full CLI or authentication redesign.

CLI UX

Design one CLI with two deliberate modes:

  • optimize interactive use for discoverability, concise defaults, and safe recovery;
  • optimize automated use for predictability, bounded context, explicit contracts, and defense in depth.

Keep the CLI self-contained. Do not require an MCP server or companion agent skill. Make the installed CLI capable of describing and safely exercising its own exact-version contract.

Apply this skill proportionally. The requested CLI outcome and concrete risks created by the changed command define the blocking criteria. The remaining sections are design options and review lenses, not a demand to redesign every CLI surface. Stop when the named contract is corrected and focused process or contract tests prove it; report adjacent improvements as follow-ups.

Define one typed command contract

For a new CLI or a command family whose contract is duplicated across surfaces, prefer modeling each command once in a checked-in, versioned registry. Derive these surfaces from it where practical:

  • parsing and validation;
  • human-readable help and examples;
  • machine-readable schema or describe output;
  • request construction;
  • structured success and error output;
  • tests.

Keep schema introspection deterministic and available offline. Include command names, inputs, types, constraints, defaults, conflicts, environment variables, output schemas, exit codes, side effects, and stability status. Do not let help text, validation, and machine schemas become independent sources of truth.

Design the input graph before prompts

Classify inputs in dependency order:

  1. execution mode: interactive TTY or non-interactive;
  2. non-secret selectors and identity fields;
  3. mutually exclusive or conditionally required fields;
  4. local files, configuration, and expected-state constraints;
  5. authorization and confirmation inputs;
  6. secrets;
  7. remote reads and external side effects.

Resolve and validate each layer before moving to the next. Never collect a secret only to report an earlier non-secret error.

For a login command accepting exactly one of --username or --email:

text
parse flags
-> reject both username and email
-> if neither is present:
   interactive: ask for username or email
   non-interactive: fail with usage and remediation
-> normalize and validate the identity
-> only now prompt for the password
-> authenticate

Hard invariant:

Never display Password: before the command knows which account is being authenticated.

Good:

text
$ sf auth login
Username or email: user@example.com
Password: ********

Do not infer an identity from unrelated machine state unless documented as an explicit precedence rule.

Support human flags and full-fidelity JSON

Offer ergonomic flags for common operations. For complex requests, also accept one raw JSON value or file that maps to the typed request model without losing nested or newly added API fields.

Use a shape such as:

text
tool resource create --name demo --region iad
tool resource create --json request.json

Reject ambiguous combinations of raw JSON and request-building flags. Do not deep-merge them or invent hidden precedence. Validate both paths with the same schema and construct the same internal request type.

Do not accept passwords, tokens, or other secrets as ordinary command-line arguments when a safer prompt, stdin, environment, credential file, or credential-store path exists.

Separate interactive and automated contracts

Use deterministic input precedence, normally:

text
explicit flag > documented environment variable > stored non-secret preference > interactive prompt

Never prompt when stdout or stdin is non-interactive, when a machine-readable mode is selected, or when a no-input option is active. Fail before reading secret input if required non-secret inputs are missing.

Use human-readable output on an interactive TTY and stable JSON or NDJSON when output is piped. Provide explicit overrides such as --output human|json|ndjson; preserve compatibility before changing an existing command's default.

For machine-readable output:

  • emit data only on stdout;
  • emit diagnostics on stderr;
  • never include terminal decoration or progress spinners;
  • return documented nonzero exit codes;
  • keep success and error envelopes schema-stable;
  • include actionable remediation without exposing secrets.

Bound output without hiding data

Protect both terminals and agent context windows:

  • use bounded default page sizes;
  • expose opaque continuation cursors;
  • support field selection or projections for large resources;
  • stream multi-page results as NDJSON where appropriate;
  • report truncation and the continuation mechanism explicitly;
  • never silently discard results.

Avoid fetching every page before emitting the first result. Ensure cancellation stops further requests and leaves stdout syntactically valid for the documented format.

Separate human and agent authentication

Share authorization semantics while supporting distinct credential-acquisition paths:

  • allow browser, password, device, or keychain flows for interactive humans as appropriate;
  • allow narrowly scoped tokens, service identities, injected environment variables, credential files, or stdin for automation;
  • never unexpectedly open a browser or prompt during automated execution;
  • report credential source and effective scope without printing the credential;
  • fail closed on expired, revoked, malformed, or insufficiently scoped credentials.

Request the least authority required for the selected command. Do not make a broad human session the implicit automation credential.

Make authentication state obvious and portable

Treat authentication as a stateful workflow, not only a credential-acquisition prompt.

Before asking for an identity or password, perform a read-only current-session check when a stored credential is available. If the session is valid:

  • say who is already authenticated, such as Already logged in as alice.;
  • avoid prompts, network mutations, and needless credential replacement;
  • exit successfully and expose authenticated plus already_authenticated in structured output;
  • provide an explicit escape hatch such as --force or --relogin for intentional replacement;
  • if an explicit identity was supplied and it differs from the current identity, continue through the normal login flow rather than silently switching accounts.

When a host keychain is invisible to a sandbox but the user and sandbox share a filesystem, make shared per-user storage the default for the sandbox-compatible path. Protect the directory and file (0700/0600), never print the bearer, record expiry metadata when available, and ignore expired or malformed entries. Keep host-only keychain storage as an explicit opt-in when it is appropriate.

Document and test a deterministic credential-read waterfall. A useful default is:

text
process-scoped environment token
-> shared user credential file
-> host OS keychain
-> unauthenticated

Resolve the selected base URL before looking up origin-scoped credentials. Report the active source and server-confirmed identity without revealing the secret. Make logout clear every local store in the documented scope, while clearly stating that local deletion does not revoke a remote credential.

Optional opportunity scan

For a CLI design or broad review, select the questions that can materially affect the requested outcome. A one-line help mismatch, parser bug, or focused output fix does not require this scan or adjacent auth, pagination, recovery, portability, and accessibility work.

  • Already complete: Can the command detect that the requested state already exists and say so instead of duplicating work?
  • Intent and defaults: Are common safe actions concise, and are risky or scope-expanding choices explicit?
  • Preflight: Can local validation, auth checks, target resolution, and confirmations happen before secrets or network mutations?
  • Recovery: Does failure name the phase, explain whether retry is safe, and give one exact next command?
  • Idempotency: Can interrupted or repeated commands resume or safely no-op using an idempotency key or expected-state fence?
  • State visibility: Can users inspect current config, credential source, selected target, effective defaults, and progress without leaking secrets?
  • Output fit: Does a human get a concise explanation while an agent gets stable JSON/NDJSON, documented fields, and useful exit codes?
  • Environment portability: Does the command behave predictably across TTYs, CI, containers, sandboxes, operating systems, and missing optional integrations?
  • Discoverability: Do help, examples, aliases, shell completion, and typo suggestions expose the canonical safe path?
  • Destructive actions: Are previews, confirmations, dry runs, backups, and undo/revoke paths available in proportion to the risk?
  • Performance: Is progress visible for slow work, are results bounded, and are cancellation and resume semantics clear?
  • Accessibility: Does output remain legible without color, terminal control sequences, mouse interaction, or a particular shell?

Treat findings outside the requested contract as follow-up opportunities. Implement one only when necessary for correctness or to mitigate a concrete risk created by the current change. Test at the process boundary when the change affects prompts, stdout/stderr, exit codes, or credential resolution.

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

Use risk-triggered mutation controls

Before a destructive, costly, privilege-changing, or externally consequential mutation, validate the locally knowable facts that can prevent the named harm:

  • syntax, types, conflicts, and required inputs;
  • local files and configuration;
  • authentication identity and required scope;
  • confirmation and non-interactive safety options;
  • expected resource version or state;
  • whether the requested operation is already complete.

Provide --dry-run when previewing the resolved target and effect materially reduces mutation risk. Make it share parsing, normalization, local validation, request construction, authorization planning, and output-shaping paths without performing the mutation. Clearly distinguish locally proven checks from server-dependent checks that were skipped. A harmless idempotent update does not need a ceremonial dry run merely because it uses the network.

Use idempotency keys for retryable creates and expected-state or version fencing for destructive or concurrency-sensitive operations. Make retry safety explicit. Do not use universal interactive confirmations as a substitute for idempotency and preconditions.

Defend against agent-shaped input mistakes

When a changed command accepts generated or otherwise untrusted identifiers and path-like values, validate them before transport. Select adversarial cases that match the accepted grammar and sink, such as:

  • .., absolute paths, and separator confusion;
  • control characters, newlines, NULs, and terminal escapes;
  • leading hyphens and option injection;
  • embedded ?, #, /, and backslashes in identifiers;
  • raw %, invalid escapes, and double encoding;
  • Unicode normalization and confusable characters;
  • oversized strings, arrays, and request bodies.

Reject invalid input locally with the field name, constraint, and safe retry shape. Do not silently strip or reinterpret suspicious characters. Encode individual path segments exactly once at the HTTP boundary; never interpolate unchecked identifiers into URLs or filesystem paths.

Treat remote text as untrusted data

Assume resource names, descriptions, logs, errors, and fetched documents may contain prompt-injection text or terminal control sequences.

  • keep data structurally separate from CLI guidance;
  • escape or remove unsafe terminal control characters in human output;
  • preserve raw values only in a documented structured field when required;
  • offer bounded fields rather than dumping entire remote documents by default;
  • support pluggable content scanning for high-risk applications without making an external sanitizer mandatory.

Never convert remote content into instructions or suggested commands without clearly labeling and validating it.

Make errors local and actionable

Validate each input immediately after collection. State:

  • what is wrong;
  • which values or shapes are accepted;
  • whether inputs conflict;
  • the exact safe retry form.

Prefer:

text
Error: choose one identity: --username NAME or --email ADDRESS.
Retry: sf auth login --email you@example.com

Avoid exposing secret values, dumping parser internals, or blaming the user for a prompt sequence chosen by the CLI.

Test contracts, not only handlers

Choose the smallest boundary that proves the changed contract. Add unit, transcript or PTY, schema, or end-to-end tests only as appropriate to that change.

For interaction changes, exercise the relevant TTY and non-TTY process paths, prompt order, secret redaction, and structured-output behavior. For machine contract changes, prove agreement among the touched parser, help, schema, request, output, and exit-code surfaces. Add pagination, dry-run, retry, adversarial-input, or terminal-safety cases only when the changed command uses those features or exposes those sinks.

Selective review lens

Use only the items relevant to the requested command or review. An item becomes blocking only when the current change would otherwise be incorrect, unsafe, or unusable; unexplored items are not failed gates.

  • Are the touched parsing, help, validation, introspection, and output surfaces consistent?
  • Do interactive and automated paths preserve their documented prompt, stdout/stderr, and exit contracts?
  • Are secret handling, target resolution, preflight, retry, and dry-run controls proportional to the changed command's risk?
  • Are large or untrusted inputs bounded and rendered safely where the command accepts them?
  • Does the focused test exercise the real process boundary when in-process tests cannot prove the behavior?

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

Files

SKILL.md and 1 other file in cli-ux of swyxio/skills.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 038ef34

Compare with similar skills

CLI UX 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 UX compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CLI UX this skillswyxio/skills175—~3.6kAutomated safety check: PassMIT
Fortify Developmentcoollabsio/coolify63k4 repos~1.9kAutomated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Better Auth Best Practiceslatitude-dev/latitude-llm4.7k7 repos~1.6kAutomated safety check: PassMIT
Supabasecurvenote/curvenote1695 repos~2.2kAutomated safety check: PassCustom licence
Gitnexus Exploringaws-samples/sample-kolya-br-proxy10611 repos~749Automated safety check: PassMIT-0

Similar skills

  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Better Auth Best Practices

    latitude-dev/latitude-llm

    Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables.

    4.7k GitHub starsUsed in 7 repos~1.6k tokens
    Backend & APIsAuto-check passed
  • Supabase

    curvenote/curvenote

    A skill your agent uses when doing ANY task involving Supabase.

    169 GitHub starsUsed in 5 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Gitnexus Exploring

    aws-samples/sample-kolya-br-proxy

    Official

    A skill your agent uses when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase.

    106 GitHub starsUsed in 11 repos~749 tokens
    Backend & APIsAuto-check passed
  • Agentic Wallet

    coinbase/agentic-wallet-skills

    Crypto wallet operations via the awal CLI — sign in, check balances, send USDC/ETH/POL/SOL, trade tokens, fund the wallet, and use the x402 payment protocol to discover paid services, pay for API…

    127 GitHub starsUsed in 3 repos~1k tokens
    Backend & APIsAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    175 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    175 GitHub stars~4.3k tokensUpdated 3 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    175 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    175 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    175 GitHub stars~1.8k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about CLI UX

What does CLI UX do?

Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern. CLI UX is an agent skill from swyxio/skills. Design, implement, or review a command-line interface when its user-facing command contract, interaction behavior, automation output, credentials, or mutation safety is the primary concern.

When should I use CLI UX?

CLI UX fits situations like: tasks that involve Authentication.

How do I install CLI UX in Claude Code?

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

How do I install CLI UX in Codex?

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

Can I use CLI UX 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 swyxio/skills --skill cli-ux -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-ux, .gemini/skills/cli-ux, .github/skills/cli-ux and .opencode/skills/cli-ux in your project.

What does CLI UX need to run?

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

Does CLI UX access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is CLI UX 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 UX use?

CLI UX 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 UX use?

About 3.6k tokens (SKILL.md is roughly 15k 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 UX?

Skills that share tags, products or a category with CLI UX: Fortify Development (coollabsio/coolify, 63k stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars), Better Auth Best Practices (latitude-dev/latitude-llm, 4.7k stars) and Supabase (curvenote/curvenote, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CLI UX?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 175 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

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