cli-development

cli-development is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 34 tokens per session (1,003 once invoked), scanned A, original, MIT.

A guide to building command-line tools: programs operated by typing commands in a terminal. It covers arguments, output streams, exit codes, configuration, progress display, and piping commands together.

In plain words
What is it for?
Use it to design commands and subcommands, support human and JSON output, choose configuration precedence, handle interactive terminals, and make destructive actions safer.
Why use it?
It helps tools behave predictably for both people and automated scripts. Correct output and exit codes prevent confusing failures in shell pipelines and continuous integration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design commands and subcommands, support human and JSON output, choose configuration precedence, handle interactive terminals, and make destructive actions safer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/cli-development
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 nimadorostkar/Claude-Skills-collection --skill cli-development
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/cli-development/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/cli-development)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/cli-development"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/cli-development/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 cli-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/cli-development"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/cli-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,003 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00034 $0.01003
Opus 5 $0.00017 $0.00502
Sonnet 5 $0.00007 $0.00201
Haiku 4.5 $0.00003 $0.00100

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

Security

Grade A, and why

cli-development 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 10d 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.

skills/development/cli-development/SKILL.md · 103 lines

How it starts

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

CLI Development

Purpose

Build command-line tools that behave the way the shell expects: composable, scriptable, quiet by default, and honest about failure.

When to Use

  • Building a developer tool, deployment script, or internal utility with a CLI.
  • Designing the argument surface of an existing tool.
  • Making a tool safe to use inside pipelines and CI.

Capabilities

  • Argument and subcommand design.
  • Correct use of stdout, stderr, and exit codes.
  • Configuration precedence: flags, environment, config file, defaults.
  • Human output versus machine output (--json, TTY detection).
  • Progress, colour, and interactivity that degrade correctly when piped.

Inputs

  • The tasks the tool must perform and who runs it (humans, CI, both).
  • Whether it will be composed with other tools.
  • Whether it performs destructive operations.

Outputs

  • A command surface that is predictable and discoverable.
  • Machine-readable output behind a flag.
  • Exit codes that scripts can branch on.
  • Help text that answers the question without a web search.

Workflow

  1. Design the verbs — Subcommands are verbs on nouns: tool deploy service, not tool --deploy --service. Group related operations.
  2. Separate the streams — Results go to stdout. Everything else — progress, warnings, logs — goes to stderr. This is what makes tool list | grep x work.
  3. Define the exit codes — 0 for success, 1 for a general failure, 2 for a usage error. Document any others.
  4. Set the configuration precedence — Command-line flag beats environment variable beats config file beats default. Never surprise the user by reversing this.
  5. Detect the TTY — Colour, spinners, and prompts only when stdout is a terminal. When piped, output is plain and non-interactive.
  6. Make destruction opt-in — Anything irreversible requires confirmation, or --yes when non-interactive. --dry-run on anything with side effects.

Best Practices

  • Be quiet on success. A tool that prints five lines of celebration on every run is unusable in a loop.
  • Provide --json for anything a script might parse. Parsing human output is a bug generator for everyone downstream.
  • Honour NO_COLOR and --no-color. Honour CI by disabling interactivity.
  • Long flags are self-documenting; short flags are for the ones typed constantly. Do not invent a short flag for every option.
  • Read from stdin when the input argument is -. It costs three lines and makes the tool composable.
  • Error messages state what failed, why, and what to do about it. "Error: invalid input" is not one of those.

Read the full file on GitHub · 103 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. 10d ago First seen · 103 lines · 34 tokens per session scan A 867dd381c5b2

Subscribe to this mod's changes

cli-development is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 22d ago), licensed MIT. It adds 34 tokens to every session and 1,003 once invoked, about $0.0002 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-08-30.

Related

Other skills, from other repositories