clap-rust

Installation
SKILL.md

Clap Rust

Use these conventions for Rust CLIs built with clap-rs/clap.

Source Baseline

  • Prefer released docs from docs.rs/clap, crates.io, and the matching GitHub release over older snippets.
  • Current docs.rs baseline checked for this skill: clap 4.6.1.
  • Clap builds polished command-line parsers declaratively with derive or procedurally with the builder API.
  • Prefer derive for static application CLIs. Use builder API when arguments are generated dynamically, when augmenting another parser, or when the CLI shape cannot be represented cleanly with derive.

Cargo

Use derive for most application CLIs:

[dependencies]
clap = { version = "4.6", features = ["derive", "env", "wrap_help"] }
Installs
2
First Seen
Jul 4, 2026
clap-rust — marcioaltoe/skills