cli-developer

A guide to building command-line tools, programs that people operate by typing commands into a terminal.

In plain words
What is it for?
Use it when adding argument parsing, subcommands, interactive prompts, progress indicators, shell completion, or terminal application tests.
Why use it?
It helps keep commands, options, help text, errors, completion scripts, and interruptions consistent across platforms.

Skill for Claude CodeCodex

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/hk-hub/agentskills/cli-developer
Any agent
npx skills add HK-hub/AgentSkills --skill cli-developer
Clone the repo
git clone --depth 1 https://github.com/HK-hub/AgentSkills

Made for: Claude Code, Codex.

Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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 $0.00065 $0.01079
Opus 5 $0.00032 $0.00540
Sonnet 5 $0.00013 $0.00216
Haiku 4.5 $0.00006 $0.00108

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

Security

Grade A, and why

cli-developer 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.

Origin

This is a copy

98% identical to cli-developer — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

cli-developer/SKILL.md · 114 lines

How it starts

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

CLI Developer

Core Workflow

  1. Analyze UX — Identify user workflows, command hierarchy, common tasks. Validate by listing all commands and their expected --help output before writing code.
  2. Design commands — Plan subcommands, flags, arguments, configuration. Confirm flag naming is consistent and no existing signatures are broken.
  3. Implement — Build with the appropriate CLI framework for the language (see Reference Guide below). After wiring up commands, run <cli> --help to verify help text renders correctly and <cli> --version to confirm version output.
  4. Polish — Add completions, help text, error messages, progress indicators. Verify TTY detection for color output and graceful SIGINT handling.
  5. Test — Run cross-platform smoke tests; benchmark startup time (target: <50ms).

Reference Guide

Load detailed guidance based on context:

Topic Reference Load When
Design Patterns references/design-patterns.md Subcommands, flags, config, architecture
Node.js CLIs references/node-cli.md commander, yargs, inquirer, chalk
Python CLIs references/python-cli.md click, typer, argparse, rich
Go CLIs references/go-cli.md cobra, viper, bubbletea
UX Patterns references/ux-patterns.md Progress bars, colors, help text

Quick-Start Example

Node.js (commander)

#!/usr/bin/env node
// npm install commander
const { program } = require('commander');

program
  .name('mytool')
  .description('Example CLI')
  .version('1.0.0');

program
  .command('greet <name>')
  .description('Greet a user')
  .option('-l, --loud', 'uppercase the greeting')
  .action((name, opts) => {
    const msg = `Hello, ${name}!`;
    console.log(opts.loud ? msg.toUpperCase() : msg);
  });

program.parse();

For Python (click/typer) and Go (cobra) quick-start examples, see references/python-cli.md and references/go-cli.md.

Constraints

MUST DO

  • Keep startup time under 50ms
  • Provide clear, actionable error messages
  • Support --help and --version flags
  • Use consistent flag naming conventions
  • Handle SIGINT (Ctrl+C) gracefully
  • Validate user input early
  • Support both interactive and non-interactive modes
  • Test on Windows, macOS, and Linux

Read the full file on GitHub · 114 lines

Files

What ships with it

5 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 · 114 lines · 65 tokens per session scan A dff03b2cfd86

Subscribe to this mod's changes

cli-developer is a skill published in the GitHub repository HK-hub/AgentSkills (6 stars, last pushed 14d ago), licensed MIT. It adds 65 tokens to every session and 1,079 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to cli-developer, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

minimax-h3-reference-video-prompt

Default downstream MiniMax H3 specialist for every image-based request unless the user explicitly declares boundary-only first/last frames with no reusable reference role. Use the official six-section full-reference format for character/person/object consistency, scene/style/action/camera/storyboard/voice/audio…

unknowlei/minimax-h3-opencode-skills · 89 tokens

minimax-h3-keyframe-video-prompt

Narrow downstream MiniMax H3 specialist for pure I2VA, FL2VA, and L2VA boundary-frame prompts. Use only after minimax-h3-creative-director verifies that the user explicitly declared the images as literal first/last frames and that they have no character, identity, person, object, costume, scene, style, voice, action…

unknowlei/minimax-h3-opencode-skills · 108 tokens

minimax-h3-multishot-planner

Non-skippable planning-only MiniMax H3 subskill used by minimax-h3-creative-director before final prompt formatting. Invoke when the user explicitly requests multiple shots, scenes, cuts, montage, or shot-by-shot design, or when a video of at least 10 seconds has no declared single-shot/multishot preference and the…

unknowlei/minimax-h3-opencode-skills · 120 tokens

minimax-h3-text-video-prompt

Downstream MiniMax H3 specialist for professional text-to-video (T2VA) prompts using the official three-field format. Use after minimax-h3-creative-director routes a request with no image, video, or audio reference asset, or when this skill is explicitly invoked for a text-only idea, script, or storyboard requiring an…

unknowlei/minimax-h3-opencode-skills · 83 tokens

spec-brainstorm

Conversational design workshop for substantial work. Interviews the human one question at a time, explores 2-3 approaches with trade-offs, and presents the design section by section for approval before writing only design.md, then stops. Combines requirements discovery with codebase research and architecture design.…

martinffx/atelier · 95 tokens

spec-plan

Write approved implementation plans in one of two modes. Explicit Inline mode creates a conversational plan for bounded work. Spec-backed Plan converts an approved design.md into plan.json. Both modes stop after producing their plan output. Trigger after atelier-orchestrator selects a mode, when the user asks to plan…

martinffx/atelier · 90 tokens