Skip to main content

rust-impl-clap-cli

Use when the user builds a CLI with clap 4.x, uses derive Parser API or builder API, defines subcommands, custom value parsers, env-var fallback, or shell completions. Prevents picking builder when derive suffices, missing `--features = ["derive"]`, omitting `value_parser` for non-string types, and confusing `Args` group with `Subcommand`. Covers: derive Parser API (`#[derive(Parser, Args, Subcommand, ValueEnum)]`), builder API (when derive is insufficient), nested Subcommand enums, `value_parser` (custom + range), env var fallback `env = "VAR"`, defaults `default_value` / `default_value_t`, required vs optional args, multiple values, shell completions via `clap_complete`, `Args` for shared argument groups. Keywords: clap, "#[derive(Parser)]", Parser, Subcommand, Args, ValueEnum, "clap derive", "clap builder", "value_parser", env, "default_value", "default_value_t", "shell completion", "clap_complete", "command line", CLI, argparse, "parse_from", "Parser::parse", subcommand, "nested command", required, "long

跳到安装

来源信息

仓库
Impertio-Studio/Rust-Claude-Skill-Package
最近来源活动
2026年5月19日 21:17
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。