click-cli

A set of guidelines for designing Python command-line programs with the Click library, which helps build commands and options for terminal use.

In plain words
What is it for?
Use it when creating or restructuring Click commands, subcommands, arguments, options, and modular Python project layouts.
Why use it?
It helps keep command-line tools organized and avoids common Click design mistakes as they grow.

Skill for Claude CodeCodex

Part of the py-pit plugin — 16 skills, 1 hook shipped together

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/robhowley/py-pit-skills/click-cli
Any agent
npx skills add robhowley/py-pit-skills --skill click-cli
Clone the repo
git clone --depth 1 https://github.com/robhowley/py-pit-skills

Made for: Claude Code, Codex.

Or install py-pit, the plugin that ships this one along with the rest of its 16 skills, 1 hook.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.01139
Opus 5 $0.00020 $0.00570
Sonnet 5 $0.00008 $0.00228
Haiku 4.5 $0.00004 $0.00114

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

Security

Grade A, and why

click-cli 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 3d 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/click-cli/SKILL.md · 205 lines

How it starts

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

click-cli

Use this skill when designing or implementing Python command-line interfaces with Click.

This skill should add value above baseline Click knowledge by enforcing:

  • good CLI architecture
  • clear command hierarchy
  • consistent argument and option design
  • idiomatic Click usage
  • avoidance of common Click anti-patterns

Apply this skill when the user:

  • asks to create or design a Click CLI
  • wants a Python CLI built with Click
  • needs help structuring commands or subcommands
  • wants idiomatic Click code rather than generic CLI code
  • asks for help improving a Click-based command-line tool

Do not apply when:

  • the task is unrelated to Python CLIs
  • the user explicitly wants another CLI framework
  • the question is purely about general application design rather than CLI behavior

Invocation heuristics

Prefer this skill when the user:

  • mentions click
  • asks for command groups, subcommands, options, or arguments
  • wants a CLI architecture recommendation
  • is starting a new Python CLI project
  • wants help fixing non-idiomatic Click code

Do not prefer this skill when:

  • the user explicitly wants argparse, typer, cement, or another framework
  • the task is general Python coding with no CLI component

Mission

Produce production-quality Click CLIs that are:

  1. idiomatic
  2. modular
  3. easy to extend
  4. clear to use from the command line
  5. consistent in help text and option design

Do not merely explain Click syntax unless the user explicitly asks for explanation.

Core Click mental model

Click is best used to build CLIs around:

  • a root command
  • optional command groups
  • small, composable subcommands
  • explicit arguments and options
  • predictable help output

Prefer clear command hierarchy over monolithic single-file command handlers.

The 5 Click invariants

Always follow these rules.

1. Model the CLI before writing code

Define:

  • root command
  • subcommands
  • arguments
  • options
  • shared context if needed

Do not jump straight into decorators without first clarifying the command structure in the answer.

Read the full file on GitHub · 205 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. 3d ago First seen · 205 lines · 41 tokens per session scan A 0af2c62fbd84

Subscribe to this mod's changes

click-cli is a skill published in the GitHub repository robhowley/py-pit-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 41 tokens to every session and 1,139 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-31.

Related

Other skills, from other repositories

FastAPI Customer Support Tech Enablement

Comprehensive FastAPI skill for building modern Python web APIs with focus on customer support systems, ticket management, real-time chat, and backend operations.

manutej/luxor-claude-marketplace · 36 tokens

SQLAlchemy ORM Expert

Comprehensive SQLAlchemy skill for customer support tech enablement, covering ORM patterns, session management, query optimization, async operations, and PostgreSQL integration.

manutej/luxor-claude-marketplace · 34 tokens

fastapi-endpoint

Plan and build production-ready FastAPI endpoints with async SQLAlchemy, Pydantic v2 models, dependency injection for auth, and pytest tests. Uses interview-driven planning to clarify data models, authentication method, pagination strategy, and caching before writing any code.

alirezaebrahimi5/ai-senior-engineer-template · 56 tokens

datamodel-code-generator

Use this skill when the user wants Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI, JSON Schema, GraphQL, JSON/YAML/CSV sample data, MCP tool schemas, Protocol Buffers, XML Schema, Apache Avro, or existing Python model objects.…

koxudaxi/datamodel-code-generator · 147 tokens

api-contrib

Contributing to the Kokoro-FastAPI Python API: module layout, endpoint gating pattern, test expectations. Use when adding or changing endpoints, services, or inference code.

remsky/Kokoro-FastAPI · 39 tokens

python-patterns

Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.

MODSetter/SurfSense · 30 tokens