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.
npx agentmods add skills/saski/arnesto/modern-cli-designnpx skills add saski/arnesto --skill modern-cli-designgit clone --depth 1 https://github.com/saski/arnestoWrote 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.
[](https://agentmods.dev/skills/saski/arnesto/modern-cli-design)<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>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.
| Model | Per session | Once 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 |
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.
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. Enablesmycli 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.--jsonimplies non-interactive regardless of TTY.--format ndjson: newline-delimited JSON for streaming. Each line is one parseable object. Include atypefield 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}}
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.
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.
- 2d ago First seen · 278 lines · 51 tokens per session scan A affe9a31f803
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.
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.
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.
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).
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.
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.
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.