/sota-skills:sota-cli-uxfrom SOTA Engineering Skills
Provides state-of-the-art guidance for designing and auditing CLI tools, covering command grammar, output streams, TTY detection, exit codes, signal handling, and distribution. Useful when building or reviewing any command-line tool or TUI.
Ships in SOTA Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert-level rules for building and auditing command-line tools: the grammar of commands/flags/args, config layering, human-vs-machine output, TTY-aware interaction, exit codes, signal handling, lifecycle behavior, and distribution. The core thesis: a CLI has three users — a human at a TTY, a script in CI, and an AI agent driving the tool (a stricter script) — and every design decision must serve all three without flags-gymnastics. Rules are imperative with rationale and good/bad terminal examples; every rules file ends with an audit checklist. Load only the files relevant to the task via the index below.
When designing or implementing a CLI:
--help text
first: subcommand tree, every flag (short + long), args, examples. If the
help is hard to write, the grammar is wrong (rules/01).rules/01 §3).rules/02 §1).NO_COLOR; ship --json with every listing/reading
command from v0.1, because output format is API (rules/02).rules/02 §3, rules/03 §7).--dry-run
on mutating commands, re-runnable/resumable operations, stdin-closed CI
behavior, offline behavior (rules/03).--help (rules/03 §8, rules/04).tool cmd | cat,
tool cmd > out.txt 2> err.txt, tool cmd < /dev/null, echo $?.Coverage: every rules/ file's Audit checklist applies in AUDIT mode. Mark one not applicable only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.
When reviewing an existing CLI:
tool --help, tool <sub> -h, tool --version, tool definitelynotacmdtool list | cat and tool list | head -1 (color codes? broken pipe panic?)tool list > /dev/null — does anything still reach the human? (it should, on stderr)tool mutate < /dev/null — hang waiting for a prompt = CI killerecho $? after success, after a usage error, after a real failure--force and no dry-run; non-zero work reported as exit 0 (or
vice versa) so CI lies; prompt hangs forever with stdin closed; secrets
echoed to terminal/logs/argv; auto-update or telemetry without disclosure.--json on listing commands; SIGINT
leaves corrupt partial state; undocumented/colliding exit codes; config
precedence nondeterministic; breaking flag removal without deprecation.$HOME dotfile
litter instead of XDG; no completions; no -q/-v; >500ms --help.[SEVERITY] <one-line title>
Where: <file:line | command invocation that reproduces it>
Rule: <rules-file §section>
Issue: <what is wrong, with observed evidence (transcript or code)>
Impact: <who breaks: the human at the TTY, the script in CI, an agent driving the tool, or all>
Fix: <specific change; exact flag/stream/exit-code where load-bearing>
Order findings by severity; one finding per root cause; include the reproducing command line whenever the issue was observed by running the tool.
| File | Read this when... |
|---|---|
rules/01-commands-flags-config.md | Designing/auditing the command surface: subcommand grammar (noun-verb consistency), POSIX/GNU flag conventions, short/long forms, -- separator, args vs flags vs stdin, defaults, dangerous-op flags, config precedence chain, env var naming, help text quality, suggest-on-typo. |
rules/02-output-interaction.md | Anything the tool prints or asks: stdout vs stderr contract, --json/--plain, TTY detection, color and NO_COLOR/TERM, exit codes as API, streaming vs buffering, progress indication, prompts and --yes/CI behavior, quiet/verbose levels, error message anatomy, --debug vs stack traces, agent-facing design (--fields, confirmation envelopes, frozen output contracts). |
rules/03-behavior-lifecycle.md | Runtime behavior and tool lifecycle: startup latency, idempotent re-runnable commands, --dry-run, --self-test for tools whose output is a verdict, SIGINT/SIGTERM handling, crash-only resumable design, network-op responsiveness and offline behavior, self-update caution, telemetry consent, XDG base directories, shell completions, semantic versioning of the CLI surface. |
rules/04-distribution-docs.md | Shipping and documenting: single-binary packaging, install channels (brew/curl-script/registry) with checksums + signatures, docs generated from the --help source of truth, man pages, README quickstart, version pinning for CI. |
tool x | next must receive only data. (rules/02 §1)NO_COLOR (set and non-empty) and TERM=dumb; --json on
every command that lists or reads data. (rules/02 §2, §4)exit 0 after printing an error. (rules/02 §3)-f, --flag, --flag=value, -- ends flags). (rules/01 §2)--force/typed confirmation on a
TTY and refuse (don't hang) without one. (rules/01 §3, §5)--yes/--no-input equivalent exists; stdin
closed or non-TTY ⇒ use default or fail fast with the flag to pass — never
block CI. (rules/02 §6)--debug. (rules/02 §7)--dry-run on every mutating command, printing the real plan through
the real code path. (rules/03 §2)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
cli-design, cli-ux, developer-tools, command-line, terminal-output
npx claudepluginhub martinholovsky/sota-skills --plugin sota-skills43 skills in this plugin
/sotaMaster router for the SOTA engineering skills library. Use this skill whenever the user asks to build, design, implement, refactor, harden, optimize, review, or audit an application, service, or codebase and the request spans more than one domain — or when you are unsure which specific sota-* skill applies. Also use when working on a codebase you do not own: reviewing a pull request or diff, responding to code review, evaluating someone else's patch, or preparing an upstream contribution — including mid-session, once you are already reading source, a diff, or CI config. It maps the task (build or audit mode) to the right domain and language skills (Rust, Go, C/C++, JVM, Python, JS/TS, .NET/C#, PHP, Ruby, Swift). Trigger keywords: SOTA, best practices, audit my code, security review, compliance, hardening, prod readiness, code quality, pull request, PR review, review comment, maintainer feedback, patch, diff, upstream, contribute, merge request./sota-api-designState-of-the-art API design and audit guidance (2026) covering REST/HTTP, GraphQL, gRPC, WebSockets/SSE/realtime, webhooks, versioning/evolution, and API security/operations. Use when designing or building any API surface (endpoints, schemas, protos, realtime channels, webhook senders/receivers) AND when auditing/reviewing existing APIs for correctness, evolvability, security, and operational robustness. Not for browser UI, rendering, or client-framework concerns — use sota-web-frameworks or sota-frontend-design. Trigger keywords: API, REST, GraphQL, gRPC, endpoint, websocket, SSE, realtime, WebRTC, webhook, versioning, OpenAPI, pagination, idempotency, rate limit, problem+json, protobuf, deprecation./sota-architectureState-of-the-art software and system architecture rules (2026) for both building and auditing. Use when designing, building, refactoring, or extending system architecture — boundaries, DDD, hexagonal/clean architecture, event-driven design, CQRS, sagas, messaging, caching, sharding, multi-tenancy, resilience, scalability, 12-factor/cloud-native — AND when auditing existing architecture for quality (design review, anti-patterns like distributed monolith or shared database, reliability/scalability assessment). Trigger keywords: architecture, system design, microservices, monolith, serverless, bounded context, DDD, aggregate, hexagonal, clean architecture, event-driven, Kafka, NATS, JetStream, messaging, pub/sub, stream, consumer, queue, saga, outbox, idempotency, CQRS, resilience, circuit breaker, retry, timeout, backpressure, caching, sharding, partitioning, multi-tenant, 12-factor, cloud-native, feature flag, ADR, scalability, anti-pattern, design review, architecture audit./sota-async-concurrencyState-of-the-art rules for writing and auditing asynchronous and concurrent code across runtimes (Python asyncio, JS/Node, Go, Rust, JVM). Use when building anything with async/await, threads, processes, event loops, task groups, channels, or queues — and when auditing existing code for race conditions, deadlocks, leaked tasks, blocked event loops, missing cancellation, or backpressure failures. Not for latency/throughput profiling and optimization — use sota-performance. Trigger keywords: async, await, concurrency, parallelism, threads, race condition, deadlock, event loop, channels, queues, semaphore, mutex, cancellation, timeout, backpressure, task group, goroutine, tokio, asyncio./sota-c-cppState-of-the-art C and C++ engineering rules that Claude applies when writing or auditing C/C++. Covers modern idioms (RAII, value semantics, smart pointers, C++23), memory safety (lifetimes, bounds, sanitizers, hardening flags), undefined behavior, security (SEI CERT C/C++, MISRA, integer/buffer/format-string, injection), concurrency (C/C++ memory model, atomics, data races), build/tooling/CI (CMake, clang-tidy, cppcheck, ASan/UBSan/TSan, vcpkg/Conan, supply chain), and performance. Trigger keywords - C, C++, RAII, smart pointer, unique_ptr, shared_ptr, undefined behavior, UB, buffer overflow, use-after-free, sanitizer, ASan, UBSan, TSan, valgrind, CMake, clang-tidy, cppcheck, MISRA, CERT C, memory safety, std::thread, atomics, std::move. Use for BOTH building C/C++ libraries/systems and reviewing or auditing them. Owns firmware's LANGUAGE layer; does NOT own its SYSTEMS layer — ISRs, DMA coherency, MMIO, RTOS scheduling, priority inversion, WCET, linker scripts — unowned library-wide./sota-cloud-infrastructureState-of-the-art cloud infrastructure architecture (2026). Applies when designing, building, or auditing cloud environments on AWS, GCP, or Azure — account/project structure and landing zones, IAM and workload identity, VPC/network design, DNS/TLS/CDN, compute selection (serverless vs containers vs Kubernetes vs VMs), object storage and backup architecture, cost engineering (FinOps), and disaster recovery. Trigger keywords: cloud, AWS, GCP, Azure, Kubernetes, EKS, GKE, AKS, VPC, subnet, IAM, role, service account, serverless, Lambda, Cloud Run, Fargate, Terraform architecture, DNS, CDN, load balancer, FinOps, cost, rightsizing, disaster recovery, RTO, RPO, multi-region. Use for BOTH greenfield design and auditing existing infrastructure.2 plugins ship this exact skill · first indexed Oct 25, 2026
Other plugins' skills for the same job