Agent skill

Building Clis

by ancoleman in ancoleman/ai-design-components

Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap.

MITAuto-check passed

Install Building Clis

skills CLI
$ npx skills add ancoleman/ai-design-components --skill building-clis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ancoleman/ai-design-components building-clis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ancoleman/ai-design-components.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/building-clis .claude/skills/building-clis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
building-clis
GitHub stars
526
Token cost
~3.2k tokens
SKILL.md length
959 words
Files
20 (incl. references)
Skills in repo
75
Repo updated
First seen
Licence
MIT

At a glance

Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap.

  • Works in 6 steps: CLI Arguments/Flags (explicit user input) → Environment Variables (session overrides) → Config File - Local (./config.yaml) → …
  • Creating developer tools
  • SKILL.md covers When to Use This Skill, Framework Selection, Core Patterns and Language-Specific Quick Starts, plus 7 more sections
  • Runs Python, Go and Rust scripts from its folder; calls cargo, pip and kubectl; reaches github.com

What it does

Building Clis is an agent skill from ancoleman/ai-design-components. Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap. Use when creating developer tools, automation scripts, or infrastructure management CLIs with robust argument parsing, interactive features, and multi-platform distribution.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 24 other files, including reference files (for example `examples/python/test_cli.py`, `examples/python/typer_basic.py` and `examples/python/typer_config.py`).

It works with Python and Rust. The repository describes itself as: Comprehensive UI/UX and Backend component design skills for AI-assisted development with Claude. The licence is MIT.

When your agent uses it

  • Creating developer tools
  • Automation scripts
  • Infrastructure management CLIs with robust argument parsing
  • Interactive features

Example prompts

  • “/building-clis”

Requirements

  • Python 3
  • Docker

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. CLI Arguments/Flags (explicit user input)
  2. Environment Variables (session overrides)
  3. Config File - Local (./config.yaml)
  4. Config File - User (~/.config/app/config.yaml)
  5. Config File - System (/etc/app/config.yaml)
  6. Built-in Defaults (hardcoded)

What it can do on your machine

Read from SKILL.md and the folder at commit 76551b7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python, Go and Rust, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • cargo
    • pip
    • kubectl
    • go
    • python
    • git
    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Building Clis loads about 3.2k tokens when it runs, and up to ~22k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 959 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~22k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ancoleman/ai-design-components at commit 76551b7, republished under its MIT licence (© ancoleman). 959 words, ~3,209 tokens.

Download SKILL.mdSave it as .claude/skills/building-clis/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
building-clis
description
Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap. Use when creating developer tools, automation scripts, or infrastructure management CLIs with robust argument parsing, interactive features, and multi-platform distribution.

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 CaseTypeExample
Primary required inputPositional Argumentgit commit -m "message"
Optional configurationOption--config app.yaml
Boolean settingFlag--verbose, --force
Multiple valuesVariadic Argumentfiles...

See references/argument-patterns.md for comprehensive parsing patterns.

Subcommand Organization

Flat Structure (1 Level):

app command1 [args]
app command2 [args]

Use for: Small CLIs with 5-10 operations

Grouped Structure (2 Levels):

app group subcommand [args]

Use for: Medium CLIs with logical groupings (10-30 commands) Example: kubectl get pods, kubectl create deployment

Nested Structure (3+ Levels):

app group subgroup command [args]

Use for: Large CLIs with deep hierarchies (30+ commands) Example: gcloud compute instances create

See references/subcommand-design.md for structuring strategies.

Configuration Management

Standard Precedence (Highest to Lowest):

  1. CLI Arguments/Flags (explicit user input)
  2. Environment Variables (session overrides)
  3. Config File - Local (./config.yaml)
  4. Config File - User (~/.config/app/config.yaml)
  5. Config File - System (/etc/app/config.yaml)
  6. Built-in Defaults (hardcoded)

Best Practices:

  • Document precedence in --help
  • Validate config files before execution
  • Provide --print-config to show effective configuration
  • Use XDG Base Directory (~/.config/app/) for config files

See references/configuration-management.md for implementation patterns across languages.

Output Formatting

Format Selection:

Use CaseFormatWhen
Human consumptionColored text, tablesDefault interactive mode
Machine consumptionJSON, YAML--output json, piping
Logging/debuggingPlain text--verbose, stderr
Progress trackingProgress bars, spinnersLong operations

Best Practices:

  • Default to human-readable output
  • Provide --output flag (json, yaml, table)
  • Use stderr for logs, stdout for data
  • Auto-detect TTY (disable colors if not interactive)
  • Use exit codes: 0 = success, 1 = error, 2 = usage error

See references/output-formatting.md for formatting strategies.

Language-Specific Quick Starts

Python with Typer

Installation:

bash
pip install "typer[all]"  # Includes rich for colored output

Basic Example:

python
import typer
from typing import Annotated

app = typer.Typer()

@app.command()
def greet(
    name: Annotated[str, typer.Argument(help="Name to greet")],
    formal: Annotated[bool, typer.Option(help="Use formal greeting")] = False
):
    """Greet someone with a message."""
    greeting = "Good day" if formal else "Hello"
    typer.echo(f"{greeting}, {name}!")

if __name__ == "__main__":
    app()

Key Features:

  • Type hints for automatic validation
  • Minimal boilerplate with decorators
  • Auto-generated help text
  • Rich integration for colored output

See examples/python/ for complete working examples including subcommands, config management, and interactive features.

Go with Cobra

Installation:

bash
go get -u github.com/spf13/cobra@latest

Basic Example:

go
var rootCmd = &cobra.Command{
    Use:   "greet [name]",
    Args:  cobra.ExactArgs(1),
    Run: func(cmd *cobra.Command, args []string) {
        fmt.Printf("Hello, %s!\n", args[0])
    },
}

rootCmd.Flags().Bool("formal", false, "Use formal greeting")
rootCmd.Execute()

Key Features:

  • POSIX-compliant flags
  • Viper integration for configuration
  • Subcommand architecture
  • Shell completion generation

See examples/go/ for complete working examples including Viper config and multi-level subcommands.

Rust with clap

Installation (Cargo.toml):

toml
[dependencies]
clap = { version = "4.5", features = ["derive"] }

Basic Example (Derive API):

rust
use clap::Parser;

#[derive(Parser)]
#[command(about = "Greet someone")]
struct Cli {
    /// Name to greet
    name: String,

    /// Use formal greeting
    #[arg(long)]
    formal: bool,
}

fn main() {
    let cli = Cli::parse();
    let greeting = if cli.formal { "Good day" } else { "Hello" };
    println!("{}, {}!", greeting, cli.name);
}

Key Features:

  • Compile-time type safety
  • Derive API (declarative) or Builder API (programmatic)
  • Comprehensive validation
  • Performance optimized

See examples/rust/ for complete working examples including subcommands and builder API patterns.

Interactive Features

Progress Indicators

Python (rich):

python
from rich.progress import track
for _ in track(range(100), description="Processing..."):
    time.sleep(0.01)

Go (progressbar):

go
import "github.com/schollz/progressbar/v3"
bar := progressbar.Default(100)
for i := 0; i < 100; i++ {
    bar.Add(1)
}

Rust (indicatif):

rust
use indicatif::ProgressBar;
let bar = ProgressBar::new(100);
for _ in 0..100 {
    bar.inc(1);
}
Prompts and Confirmations

Python:

python
confirm = typer.confirm("Are you sure?")
if not confirm:
    raise typer.Abort()

Go:

go
reader := bufio.NewReader(os.Stdin)
fmt.Print("Are you sure? (y/n): ")
response, _ := reader.ReadString('\n')

Rust:

rust
use dialoguer::Confirm;
if Confirm::new().with_prompt("Are you sure?").interact()? {
    // Proceed
}

Shell Completion

Generating Completions

Python (Typer):

bash
_MYAPP_COMPLETE=bash_source myapp > ~/.myapp-complete.bash
_MYAPP_COMPLETE=zsh_source myapp > ~/.myapp-complete.zsh

Go (Cobra):

go
rootCmd.AddCommand(&cobra.Command{
    Use:   "completion [bash|zsh|fish|powershell]",
    Args:  cobra.ExactArgs(1),
    Run: func(cmd *cobra.Command, args []string) {
        switch args[0] {
        case "bash":
            rootCmd.GenBashCompletion(os.Stdout)
        case "zsh":
            rootCmd.GenZshCompletion(os.Stdout)
        }
    },
})

Rust (clap):

rust
use clap_complete::{generate, shells::Bash};
generate(Bash, &mut Cli::command(), "myapp", &mut io::stdout())

See references/shell-completion.md for installation instructions.

Show full SKILL.md (379 more words)Show less

Distribution and Packaging

Python (PyPI)

pyproject.toml:

toml
[project]
name = "myapp"
version = "1.0.0"
scripts = { myapp = "myapp.cli:app" }

Publish:

bash
pip install build twine
python -m build
twine upload dist/*
Go (Homebrew)

Formula:

ruby
class Myapp < Formula
  desc "My CLI application"
  url "https://github.com/user/myapp/archive/v1.0.0.tar.gz"

  def install
    system "go", "build", "-o", bin/"myapp"
  end
end
Rust (Cargo)

Publish:

bash
cargo login
cargo publish

Installation:

bash
cargo install myapp

See references/distribution.md for comprehensive packaging strategies including binary releases.

Best Practices

Universal CLI Conventions

Always Provide:

  • --help and -h for usage information
  • --version and -V for version display
  • Clear error messages with actionable suggestions

Argument Handling:

  • Use -- separator for options vs. positional args
  • Support both short (-v) and long (--verbose) forms
  • Validate and sanitize all user inputs

Error Handling:

  • Exit code 0 for success
  • Exit code 1 for general errors
  • Exit code 2 for usage errors
  • Write errors to stderr, data to stdout

Interactivity:

  • Detect TTY (interactive vs. piped input)
  • Provide --yes/--force to skip prompts for automation
  • Show progress for operations longer than 2 seconds
Configuration Best Practices

File Formats:

  • Use YAML, TOML, or JSON consistently
  • Separate files per environment (dev, staging, prod)
  • Validate configuration in CI/CD with --check-config

Secret Management:

  • Never commit secrets to config files
  • Use environment variables or secret managers
  • Document required environment variables

Precedence:

  • CLI args > env vars > config file > defaults
  • Document precedence in help text
  • Provide --print-config to show effective configuration

Integration with Other Skills

testing-strategies:

building-ci-pipelines:

api-patterns:

  • Building API client CLIs
  • Authentication and token management
  • Formatting API responses

secret-management:

  • Secure credential storage
  • Environment variable integration
  • Vault/secrets manager integration

Reference Files

Decision Frameworks:

Implementation Guides:

Code Examples:

Quick Reference

Framework Recommendations:

  • Python: Typer (modern) or Click (mature)
  • Go: Cobra (enterprise) or urfave/cli (simple)
  • Rust: clap v4 (derive or builder)

Common Patterns:

  • Arguments: Primary inputs (max 2-3)
  • Options: Named parameters with values
  • Flags: Boolean switches
  • Subcommands: Group related operations
  • Config: CLI args > env vars > files > defaults

Output Standards:

  • Default: Human-readable (colored, tables)
  • Machine: JSON/YAML via --output flag
  • Errors: stderr, data: stdout
  • Exit: 0 = success, 1 = error, 2 = usage

Distribution:

  • Python: PyPI (pip install)
  • Go: Homebrew, binary releases
  • Rust: Cargo (cargo install), binary releases

© ancoleman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 19 other files (references) in skills/building-clis of ancoleman/ai-design-components.

  • SKILL.md
  • examples/go/cobra_basic.go
  • examples/go/cobra_subcommands.go
  • examples/go/cobra_viper.go
  • examples/python/test_cli.py
  • examples/python/typer_basic.py
  • examples/python/typer_config.py
  • examples/python/typer_progress.py
  • examples/python/typer_subcommands.py
  • examples/rust/clap_builder.rs
  • examples/rust/clap_derive.rs
  • examples/rust/clap_subcommands.rs
  • outputs.yaml
  • references/argument-patterns.md
  • references/configuration-management.md
  • references/distribution.md
  • … and 4 more

Open the folder on GitHubat commit 76551b7

Compare with similar skills

Building Clis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Building Clis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Building Clis this skillancoleman/ai-design-components526—~3.2kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0
Firecrawl Page Scrape Integrationfirecrawl/firecrawl190k1 repos~944Automated safety check: PassISC
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT
Release Skillsnexmoe/eve4213 repos~3.3kAutomated safety check: PassNone

Similar skills

  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Adds Firecrawl's /scrape endpoint to application code to pull markdown, HTML, links, screenshots or structured data from a single known URL.

    190k GitHub starsUsed in 1 repo~944 tokens
    Data & AnalyticsAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Release Skills

    nexmoe/eve

    Universal release workflow. An agent skill from nexmoe/eve.

    421 GitHub starsUsed in 3 repos~3.3k tokens
    DevelopmentAuto-check passed
  • RustPython C-API Expansion

    RustPython/RustPython

    Implements missing CPython C-API functions in RustPython's crates/capi, mapping each header to its module with the pyo3-ffi header split.

    22k GitHub stars~831 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from ancoleman/ai-design-components

All 75 skills in this repo
  • Building AI Chat

    ancoleman/ai-design-components

    Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support.

    526 GitHub stars~3.4k tokensUpdated 10 mo ago
    Auto-check passed
  • Building Forms

    ancoleman/ai-design-components

    Builds form components and data collection interfaces including contact forms, registration flows, checkout processes, surveys, and settings pages.

    526 GitHub stars~3.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Building Tables

    ancoleman/ai-design-components

    Builds tables and data grids for displaying tabular information, from simple HTML tables to complex enterprise data grids.

    526 GitHub stars~1.8k tokensUpdated 10 mo ago
    Auto-check passed
  • Creating Dashboards

    ancoleman/ai-design-components

    Creates comprehensive dashboard and analytics interfaces that combine data visualization, KPI cards, real-time updates, and interactive layouts.

    526 GitHub stars~3.5k tokensUpdated 10 mo ago
    Auto-check passed
  • Designing Layouts

    ancoleman/ai-design-components

    Designs layout systems and responsive interfaces including grid systems, flexbox patterns, sidebar layouts, and responsive breakpoints.

    526 GitHub stars~1.7k tokensUpdated 10 mo ago
    Auto-check passed
  • Displaying Timelines

    ancoleman/ai-design-components

    Displays chronological events and activity through timelines, activity feeds, Gantt charts, and calendar interfaces.

    526 GitHub stars~2.7k tokensUpdated 10 mo ago
    Auto-check passed

Works with

Questions about Building Clis

What does Building Clis do?

Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap. Building Clis is an agent skill from ancoleman/ai-design-components. Build professional command-line interfaces in Python, Go, and Rust using modern frameworks like Typer, Cobra, and clap.

When should I use Building Clis?

Building Clis fits situations like: creating developer tools; automation scripts; infrastructure management CLIs with robust argument parsing; interactive features.

How do I install Building Clis in Claude Code?

Run `npx skills add ancoleman/ai-design-components --skill building-clis -a claude-code`. Or copy the skill folder (skills/building-clis in ancoleman/ai-design-components) into .claude/skills/building-clis in your project. Claude Code loads it when a task matches its description.

How do I install Building Clis in Codex?

Run `npx skills add ancoleman/ai-design-components --skill building-clis -a codex`. Or copy the skill folder (skills/building-clis in ancoleman/ai-design-components) into .agents/skills/building-clis in your project. Codex loads it when a task matches its description.

Can I use Building Clis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ancoleman/ai-design-components --skill building-clis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/building-clis, .gemini/skills/building-clis, .github/skills/building-clis and .opencode/skills/building-clis in your project.

What does Building Clis need to run?

Going by SKILL.md and its folder, Building Clis needs Python, Go and Rust for the scripts in its folder and the command-line tools its instructions call (cargo, pip, kubectl, go, python and git). Our summary lists: Python 3; Docker.

Does Building Clis access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Building Clis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Building Clis use?

Building Clis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Building Clis use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 18k tokens, read only when the agent opens those files.

What are the alternatives to Building Clis?

Skills that share tags, products or a category with Building Clis: Update V8 Version (openinterpreter/openinterpreter, 69k stars), Firecrawl Page Scrape Integration (firecrawl/firecrawl, 190k stars), Fory Release (apache/fory, 4.6k stars) and Apple Container Test Runner (RustPython/RustPython, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Building Clis?

ancoleman (a GitHub user) maintains it in ancoleman/ai-design-components, which has 526 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on December 11, 2025.

Source: ancoleman/ai-design-components on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.