building-clis

building-clis is a skill for Claude Code from ancoleman/ai-design-components. It costs 55 tokens per session (3,120 once invoked), scanned A, original, MIT.

Guidance for building command-line programs in Python, Go, and Rust. A command-line program is a tool operated by typing commands and options in a terminal.

In plain words
What is it for?
It helps create automation tools, infrastructure utilities, API clients, shell completions, and packaged command-line programs.
Why use it?
It helps choose suitable frameworks and design argument parsing, configuration, interactive behavior, and distribution for developer tools.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the developer-productivity-skills plugin — 7 skills shipped together

Good fit It helps create automation tools, infrastructure utilities, API clients, shell completions, and packaged command-line programs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ancoleman/ai-design-components/building-clis
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 ancoleman/ai-design-components --skill building-clis
Clone the repo
git clone --depth 1 https://github.com/ancoleman/ai-design-components

Made for: Claude Code.

Or install developer-productivity-skills, the plugin that ships this one along with the rest of its 7 skills.

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 building-clis

README.md
[![agentmods](https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-clis/github.svg)](https://agentmods.dev/skills/ancoleman/ai-design-components/building-clis)
Your own site
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/building-clis"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-clis/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 building-clis

Your own site · 80×15
<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/building-clis"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/building-clis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,120 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.
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.00055 $0.03120
Opus 5 $0.00028 $0.01560
Sonnet 5 $0.00011 $0.00624
Haiku 4.5 $0.00006 $0.00312

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

Security

Grade A, and why

building-clis 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 9d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (examples/python/test_cli.py, examples/python/typer_basic.py, examples/python/typer_config.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/building-clis/SKILL.md · 477 lines

How it starts

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

Building CLIs

Build professional command-line interfaces across Python, Go, and Rust using modern frameworks with robust argument parsing, configuration management, and shell integration.

When to Use This Skill

Use this skill when:

  • Building developer tooling or automation CLIs
  • Creating infrastructure management tools (deployment, monitoring)
  • Implementing API client command-line tools
  • Adding CLI capabilities to existing projects
  • Packaging utilities for distribution (PyPI, Homebrew, binary releases)

Common triggers: "create a CLI tool", "build a command-line interface", "add CLI arguments", "parse command-line options", "generate shell completions"

Framework Selection

Quick Decision Guide

Python Projects:

  • Typer (recommended): Modern type-safe CLIs with minimal boilerplate
  • Click: Mature, flexible CLIs for complex command hierarchies

Go Projects:

  • Cobra (recommended): Industry standard for enterprise tools (Kubernetes, Docker, GitHub CLI)
  • urfave/cli: Lightweight alternative for simple CLIs

Rust Projects:

  • clap v4 (recommended): Type-safe with derive API or builder API for runtime flexibility

For detailed framework comparison and selection criteria, see references/framework-selection.md.

Core Patterns

Arguments vs. Options vs. Flags

Positional Arguments:

  • Primary input, identified by position
  • Use for required inputs (max 2-3 arguments)
  • Example: convert input.jpg output.png

Options:

  • Named parameters with values
  • Use for configuration and optional inputs
  • Example: --output file.txt, --config app.yaml

Flags:

  • Boolean options (presence = true)
  • Use for switches and toggles
  • Example: --verbose, --dry-run, --force

Decision Matrix:

Use Case Type Example
Primary required input Positional Argument git commit -m "message"
Optional configuration Option --config app.yaml
Boolean setting Flag --verbose, --force
Multiple values Variadic Argument files...

Read the full file on GitHub · 477 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. 9d ago First seen · 477 lines · 55 tokens per session scan A df202d2b8ea2

Subscribe to this mod's changes

building-clis is a skill published in the GitHub repository ancoleman/ai-design-components (519 stars, last pushed 9mo ago), licensed MIT. It adds 55 tokens to every session and 3,120 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-08-30.

Related

Other skills, from other repositories

polars

High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.

K-Dense-AI/scientific-agent-skills · 47 tokens

port-from-python

Port Python into Rust — construct mapping, the semantic traps (integer width, floor division, str versus bytes, exceptions to Result), and the seam, which is a process boundary for a standalone replacement and PyO3 when Python keeps calling the code. Use when porting, rewriting, or migrating Python, CPython, Django…

rewrite-rs/skills · 117 tokens

python

Apply when writing Python code. Type hints, error handling, mutable defaults, async patterns, and packaging conventions.

sordi-ai/skill-everything · 24 tokens

pydub-automation

Automate repetitive audio tasks with Python using PyDub for batch processing, format conversion, normalization, and content assembly. Use when: Processing large numbers of audio files consistently; Converting between audio formats at scale; Normalizing loudness across a batch of files; Assembling intros/outros…

guia-matthieu/clawfu-skills · 75 tokens

fastapi

Apply when building FastAPI endpoints, Pydantic models, or async APIs. Covers routing, dependency injection, error handling, testing, and OpenAPI hygiene.

sordi-ai/skill-everything · 35 tokens

rust-strict

Rust security, strictness, and vulnerability prevention rules. Use when writing, reviewing, or auditing Rust code. Complements rust-skills (179 general rules) with security-focused rules: unsafe audit, unwrap/expect bans, error handling hierarchy, secret handling, concurrency safety, input validation for Tauri…

0xMassi/claude-skills · 78 tokens