cli-scaffold

A command that creates a new Rust command-line application with its files, libraries, configuration handling, logging, errors, and tests set up.

In plain words
What is it for?
Use it to start a simple CLI, a CLI with subcommands, or one designed to support plugins.
Why use it?
It removes the repetitive setup needed before writing a command-line tool and gives the project a consistent starting structure.

Command

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 commands/geoffjay/claude-plugins/cli-scaffold
Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,673 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.00021 $0.01673
Opus 5 $0.00010 $0.00837
Sonnet 5 $0.00004 $0.00335
Haiku 4.5 $0.00002 $0.00167

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

Security

Grade A, and why

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

plugins/rust-cli-developer/commands/cli-scaffold.md · 272 lines

How it starts

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

CLI Scaffold Command

Scaffold a new Rust CLI application with best practices, proper structure, and all necessary dependencies configured.

Arguments

  • $1 - Project name (required)
  • $2 - Project type: "simple", "subcommands", or "plugin" (optional, default: "simple")

Usage

# Create a simple single-command CLI
/cli-scaffold my-cli simple

# Create a CLI with subcommands
/cli-scaffold my-cli subcommands

# Create a CLI with plugin architecture
/cli-scaffold my-cli plugin

What Gets Created

The scaffold creates a complete Rust CLI project with:

Dependencies

  • clap (v4+) with derive feature for argument parsing
  • anyhow for error handling in application code
  • thiserror for library error types
  • miette for beautiful error messages with diagnostics
  • tracing + tracing-subscriber for structured logging
  • config for configuration management
  • directories for XDG directory support
  • serde for configuration serialization

Project Structure

my-cli/
├── Cargo.toml
├── src/
│   ├── main.rs          # Entry point
│   ├── lib.rs           # Library interface
│   ├── cli.rs           # CLI definitions
│   ├── commands/        # Command implementations
│   │   └── mod.rs
│   ├── config.rs        # Configuration management
│   ├── error.rs         # Error types
│   └── logging.rs       # Logging setup
├── tests/
│   └── integration.rs   # Integration tests
├── config/
│   └── default.toml     # Default configuration
└── README.md

Features

  1. Clean architecture - Library-first design, thin CLI wrapper
  2. Error handling - miette for beautiful diagnostics, structured errors
  3. Logging - Tracing with verbosity levels (-v, -vv, -vvv)
  4. Configuration - TOML config with precedence (defaults < file < env < CLI)
  5. Testing - Integration tests with assert_cmd pre-configured
  6. Shell completions - Built-in completion generation
  7. Cross-platform - Works on Windows, macOS, Linux

Read the full file on GitHub · 272 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. 2d ago First seen · 272 lines · 21 tokens per session scan A ac090d7659e9

Subscribe to this mod's changes

cli-scaffold is a command published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 10mo ago), licensed MIT. It adds 21 tokens to every session and 1,673 once invoked, about $0.0001 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.