modern-cli-design

modern-cli-design is a skill for Claude Code, Codex from saski/arnesto. It costs 51 tokens per session (3,258 once invoked), scanned A, original, Unlicense.

A set of principles for building command-line tools in Go that work well for both people and scripts. It covers how commands present data, messages, errors, and results.

In plain words
What is it for?
Use it when designing, building, or reviewing Go command-line tools, including their output formats, command structure, error handling, and exit codes.
Why use it?
It prevents progress messages or unclear errors from breaking command pipelines and makes tool behaviour easier to automate and understand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/saski/arnesto/modern-cli-design
Any agent
npx skills add saski/arnesto --skill modern-cli-design
Clone the repo
git clone --depth 1 https://github.com/saski/arnesto

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modern-cli-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/saski/arnesto/modern-cli-design.svg)](https://agentmods.dev/skills/saski/arnesto/modern-cli-design)
Your own site
<a href="https://agentmods.dev/skills/saski/arnesto/modern-cli-design"><img src="https://agentmods.dev/badge/skills/saski/arnesto/modern-cli-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,258 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.03258
Opus 5 $0.00026 $0.01629
Sonnet 5 $0.00010 $0.00652
Haiku 4.5 $0.00005 $0.00326

Measured 2d ago against content hash affe9a31f803, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

modern-cli-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/modern-cli-design/SKILL.md · 278 lines

How it starts

The opening of the file, as written. The whole thing — 278 lines — stays where its author put it; the contents beside it link to each section on GitHub.

STARTER_CHARACTER = 🔧⚡

Modern CLI Design

Specialized concerns (long-running operations, credentials, testing) live in references/ — see the loading guidance at the end of this file.


Core principle: stdout is for data, stderr is for everything else

stdout carries the product the user asked for — results, JSON, records. stderr carries everything else — progress, spinners, warnings, errors, debug, prompts.

A single spinner character on stdout breaks every downstream pipe. mycli list | jq . must never see a progress indicator on stdout.

Buffering matters. stdout is line-buffered on a TTY and block-buffered when piped (~2x faster than stderr due to fewer write syscalls). stderr is unbuffered — every write is a syscall, but error messages appear immediately even on crash.

Check TTY on stdout and stderr independently. A user running mycli run 2>/dev/tty | jq . has stdout piped and stderr on a terminal — spinners on stderr are correct in that case.

In Go, write data with os.Stdout.Write / fmt.Fprintln(os.Stdout, ...) and diagnostics with fmt.Fprintln(os.Stderr, ...). Use github.com/mattn/go-isatty to detect TTY per file descriptor.


Format flag hierarchy

Four output modes with different contracts:

  • Default (human): colors, tables, formatted text, progress on stderr. Not a contract — may change between versions.
  • --plain: one record per line, no colors, flat rows with no borders. Stable across minor versions. Enables mycli list --plain | grep error | wc -l.
  • --json: structured JSON on stdout. stdout contains ONLY valid JSON — zero spinners, zero colors, zero progress. Schema is versioned. --json implies non-interactive regardless of TTY.
  • --format ndjson: newline-delimited JSON for streaming. Each line is one parseable object. Include a type field per record to multiplex events. Final line may be a summary record.

JSON envelope is consistent across every command:

{"ok": true, "data": {...}}
{"ok": false, "error": {"code": "...", "message": "...", "fix": "...", "transient": false}}

Read the full file on GitHub · 278 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 278 lines · 51 tokens per session scan A affe9a31f803

Subscribe to this mod's changes

modern-cli-design is a skill published in the GitHub repository saski/arnesto (5 stars, last pushed 10d ago), licensed Unlicense. It adds 51 tokens to every session and 3,258 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

pi-sync

Daily upstream-sync job for the pi Go port — fetch upstream pi, triage every change since the recorded pin, port what's in scope, verify idiomatic + parity via independent reviews, update the ledger, and push. Use for "sync with upstream", "porting job", or as the scheduled daily run.

sky-valley/pi · 66 tokens

pi-go-review

Review ported Go code for idiomatic quality — that the port maximizes Go rather than transliterating TypeScript. Use after porting upstream pi changes, or standalone on any diff in this repo.

sky-valley/pi · 45 tokens

go-conventions

Use when writing, reviewing, or refactoring Go code — naming conventions, receiver naming, error wrapping, interface design, goroutine safety, and common pitfalls (goroutine leaks, defer-in-loop, nil map writes).

andr-ca/agentharness · 48 tokens

go-code-reduce

Find and, when authorized, apply maintainable Go code reductions. Use when a user asks to reduce Go lines, boilerplate, duplication, or obsolete idioms without changing behavior; not for general implementation or style review.

yarlson/yarstack · 49 tokens

neneko-code-taste

Use when implementing or reviewing Go changes that should match tRPC-Agent-Go's code taste: minimal compatible diffs, consumer-oriented APIs, explicit ownership, and contract-level tests. Do not use for generic Go formatting-only requests.

XnLemon/Neneko-skill · 51 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

mturac/everything-openai-codex · 37 tokens