build-cli

build-cli is a skill for Claude Code from urmzd/dotfiles. It costs 138 tokens per session (4,387 once invoked), scanned B, original, Apache-2.0.

A design and review guide for command-line tools, including help text, human and machine output, terminal detection, signals, and exit codes.

In plain words
What is it for?
Use it when building, reviewing, or releasing a CLI. It covers JSON output, standard output versus error output, color handling, prompts, CI behavior, and installation scripts.
Why use it?
It prevents command-line programs from behaving unpredictably for people, scripts, pipes, and automated environments.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it when building, reviewing, or releasing a CLI. It covers JSON output, standard output versus error output, color handling, prompts, CI behavior, and installation scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/urmzd/dotfiles/build-cli
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.

Any agent
npx skills add urmzd/dotfiles --skill build-cli
Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles

Made for: Claude Code.

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 build-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/urmzd/dotfiles/build-cli/github.svg)](https://agentmods.dev/skills/urmzd/dotfiles/build-cli)
Your own site
<a href="https://agentmods.dev/skills/urmzd/dotfiles/build-cli"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/build-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for build-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/urmzd/dotfiles/build-cli"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/build-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,387 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00138 $0.04387
Opus 5.5 $0.00055 $0.01755
Sonnet 5.5 $0.00028 $0.00877
Haiku 4.5 $0.00014 $0.00439

Measured 8d ago against content hash a2d37441f0f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

build-cli scanned grade B with 3 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 8d 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.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- One-liner: `curl -fsSL https://raw.githubusercontent.com/<owner>/<repo>/main/install.sh | bash`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- One-liner: `curl -fsSL https://raw.githubusercontent.com/<owner>/<repo>/main/install.sh | bash`

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { execSync } = await import('child_process');
dot_agents/skills/build-cli/SKILL.md · 504 lines

How it starts

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

CLI Patterns

Design Philosophy

A junior developer should understand any CLI tool's behavior from --help alone. Prefer obvious defaults. Machine output (JSON) enables composability. All human-facing output goes to stderr.

Output Modes

Decision Tree

Scenario Output Mode Flag
Data/device API (zigbee-rest) Always JSON on stdout None needed
Dual human + machine consumers (e.g. release tools, agent orchestrators) --format json|human Default: human
CLI with optional machine output (llmem) --json flag + TTY auto-detect Default: human if TTY, JSON if piped
Human-only tool (e.g. demo recorders, interactive wizards) Styled stderr only No JSON mode

TTY Auto-Detection

Standard behavior when no explicit format flag is given:

stdout.is_terminal() → human output (styled, colored)
!stdout.is_terminal() → JSON output (machine-readable)

Override flags:

  • --json force JSON regardless of TTY
  • --no-color / NO_COLOR=1 env. Strip ANSI escape codes
  • CI=true env. Treat as non-TTY (no spinners, no prompts, no color)

JSON Conventions

  • Rust: serde_json::to_string_pretty() to stdout
  • Go: json.MarshalIndent(v, "", " ") to stdout
  • Python: json.dumps(v, indent=2) to stdout
  • Errors in JSON mode: {"error": "message"} to stdout (not stderr), exit 1

Stdout vs Stderr

Stream Content
stdout Machine-readable data: JSON, generated content, completions
stderr All human-facing UI: headers, spinners, checkmarks, errors, progress

This enables piping: tool command | jq '.field' and tool command 2>/dev/null.

Interactivity

Prompts

  Prompt text? [y/N] _

Bold prompt, [y/N] suffix. Rules:

  • Return false / skip in non-TTY (CI-safe)
  • --yes / -y flag: auto-confirm all prompts
  • Never block on stdin without checking stdin.is_terminal()

Dry-Run

Prefix all hypothetical actions with [dry-run] to stderr:

Read the full file on GitHub · 504 lines

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. 8d ago Changed · +3 lines · +27 tokens per session a2d37441f0f9
  2. 3mo ago First seen · 501 lines · 111 tokens per session scan B 7bbbc58bf83f

Subscribe to this mod's changes

build-cli is a skill published in the GitHub repository urmzd/dotfiles (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 138 tokens to every session and 4,387 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 3 findings (downloads and executes remote code, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

build-cli compared with skills from other repositories

build-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
build-cliurmzd/dotfilesSkill64d agoApache-2.0B138Claude Code
metaceptionmagic3007/dotfilesSkill115d agoMITA332Claude Code
astropymagic3007/dotfilesSkill115d agoMITA56Claude Code, Codex
benchling-integrationmagic3007/dotfilesSkill115d agoMITA50Claude Code
mcp-notion-usage-guidemagic3007/dotfilesSkill115d agoMITA174Claude Code, Codex
esmmagic3007/dotfilesSkill115d agoMITA96Claude Code, Codex
ralph-loopmagic3007/dotfilesSkill115d agoMITA63Claude Code, Codex