rust-cli-builder
使用 clap 进行参数解析,规划和构建生产就绪的 Rust CLI 工具,包含子命令、配置文件支持、彩色输出和适当的错误处理。在编写任何代码之前,采用访谈驱动的规划来明确命令、输入/输出格式和分发策略。
机器翻译查看英文原文
Plan and build production-ready Rust CLI tools using clap for argument parsing, with subcommands, config file support, colored output, and proper error handling. Uses interview-driven planning to clarify commands, input/output formats, and distribution strategy before writing any code.
适用对象:软件开发与测试。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看英文原文
原文涵盖的主题
- Rust CLI Tool Builder
- When to use
- Phase 1: Explore (Plan Mode)
- If extending an existing project
- If starting from scratch
- Phase 2: Interview (AskUserQuestion)
- Round 1: Tool purpose and commands
- Round 2: Subcommands (if multi-command)
Use this skill when you need to: Scaffold a new Rust CLI tool from scratch with clap Add subcommands to an existing CLI application Implement config file loading (TOML/JSON/YAML) Set up proper error handling with anyhow/thiserror Add colored and formatted terminal output Structure a CLI project for distribution via cargo install or GitHub releases Enter plan mode. Before writing any code, explore the existing project: Find Cargo.toml and check current dependencies (clap version, serde, tokio, etc.) Locate the CLI entry point (src/main.rs or src/cli.rs) Check if clap is using derive macros or builder pattern Identify existing subcommand structure Look for existing error types, config structs, and output formatting Check if there's a src/lib.rs separating library logic from CLI Check the workspace for any existing Rust projects or workspace Cargo.toml Look for a .cargo/config.toml with custom settings Check for rust-toolchain.toml to know the target Rust edition Use AskUserQuestion to clarify requirements. Ask in rounds. Write a concrete implementation plan covering: 1. Project structure — Cargo.toml dependencies, src/ file layout 2. CLI definition — clap derive structs for all comma
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/development/rust-cli-builder/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:44.688Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。