What problem does it solve? Rust developers repeatedly re-explain clap conventions to AI agents, leading to inconsistent CLI code with manual string parsing, wrong flag actions, and missing tests. This Skill encodes idiomatic clap 4.x patterns so generated CLIs follow derive-first structure, typed value parsers, and proper test coverage. ## Core Features & Use Cases - Derive-first CLI patterns: Conventions for Parser, Args, Subcommand, and ValueEnum with doc-comment help text, flatten for shared flags, and typed defaults. - Typed parsing and validation: Guidance on value_parser ranges, NonEmptyStringValueParser, PathBuf/SocketAddr field types, and when to validate at parse time versus after. - Flags, env, and subcommands: Rules for ArgAction SetTrue/SetFalse/Count/Append, env variable integration with the env feature, and required versus optional subcommands. - Testing and bootstrap script: debug_assert and try_parse_from test patterns plus a helper script that prints starter snippets for derive, builder, subcommand, value-enum, and test scenarios. - Use Case: Ask your agent to scaffold a new Rust CLI with subcommands and env-based configuration, and it produces clap 4.6 derive code with typed parsers and shape-validation tests. ## Quick Start Ask your AI agent to create a Rust CLI with clap derive that has a serve subcommand, a port flag validated to range 1-65535, and a debug_assert test.