Implements Rust CLI tools with structured argument parsing, command dispatch, stdin/stdout/stderr handling, exit codes, error messages, tests, and Cargo validation.
Ships in rust-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Implement Rust command-line behavior with a clear boundary between user input, command execution, domain logic, and output.
The practical goal is a CLI that is easy to test, has descriptive operator-facing messages, and validates with the repository's Cargo commands.
Use repo-local Rust files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Rust and Cargo docsets, and then official Rust and Cargo documentation when Dash/local coverage is missing or stale:
std::process::ExitCodestd::env::argsFor third-party argument parsers, error crates, config crates, terminal styling, or snapshot tools, prefer the repository's existing dependencies first. Add a new crate only when it removes real implementation complexity and comes from a fetchable registry or repository.
Cargo.tomlsrc/main.rssrc/bin/src/lib.rstests/ or near command codeUse the standard library for small internal tools when argument parsing is simple.
Use the repo's existing parser or error-handling crate when one is already established. If adding a new dependency, explain:
Do not add a CLI framework only because one is popular.
Prefer fast tests around parsing and command execution functions:
#[test]
fn parses_verbose_flag() {
let command = parse_args(["tool", "--verbose", "input.txt"]).unwrap();
assert!(command.verbose);
}
Use process-level integration tests only for behavior that truly depends on the executable boundary, such as stdout, stderr, current directory, environment, or exit status.
Keep error-message tests focused on stable user-facing text.
Choose the narrowest command that proves the change:
cargo test -p package-name
cargo clippy -p package-name --all-targets --all-features
cargo fmt --check
Use workspace-wide commands when the CLI change crosses package boundaries.
Return:
Command surface: subcommands, flags, inputs, outputs, and exit behavior changed.Implementation boundary: what lives in parsing, execution, domain logic, and output code.Dependencies: reused, added, or intentionally avoided dependencies.Tests: unit, integration, or process-level coverage added or recommended.Validation: exact Cargo commands run or skipped with the concrete reason.Next skill: usually rust:testing-workflow, rust:tooling-style-workflow, or rust:package-workflow.std::process::exit deep inside reusable functions.failed without naming the operation and likely cause.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/rust-skills:build-cli-projectfrom rust-skills
npx claudepluginhub gaelic-ghost/socket --plugin rust-skills8 skills in this plugin
/bootstrap-cargo-projectBootstrap or guide a reproducible Rust Cargo project with explicit package or workspace shape, cargo new or cargo init usage, edition and MSRV checks, rust-toolchain handling, test layout, and initial validation commands. Use after the Rust project shape is settled or when adding a new Cargo package to an existing repository./build-library-crateImplement reusable Rust library crates after the project shape is chosen, including public API design, module visibility, error types, feature flags, documentation examples, unit tests, integration tests, doctests, and Cargo validation. Use for Rust library implementation, API refactors, crate-boundary cleanup, or package-facing behavior./choose-project-shapeChoose the right Rust project shape before implementation, including crate type, Cargo package or workspace layout, edition and MSRV checks, validation commands, package boundaries, and documentation updates. Use when a user wants to start, restructure, or extend a Rust project and the binary, library, workspace, CLI, service, proc macro, FFI, embedded, no_std, or maintenance shape is not already settled./ci-workflowDesign, inspect, and align Rust CI workflows with local Cargo validation, including cargo fmt, cargo clippy, cargo test, cargo build, cargo doc, cargo package, workspace package selection, feature matrices, MSRV checks, rustup toolchain setup, Clippy warnings-as-errors policy, caches, artifacts, and GitHub Actions-style automation./package-workflowPrepare and validate Rust Cargo package surfaces, including Cargo.toml metadata, rust-version and MSRV policy, license/readme/repository fields, include and exclude rules, path dependency restrictions, Cargo.lock policy, cargo package dry runs, and publish versus no-publish decisions. Use for publishable crates, package metadata cleanup, crates.io readiness, or release-adjacent Rust package checks./testing-workflowPlan, run, and triage Rust tests with Cargo, including unit tests, integration tests, documentation tests, examples compiled by cargo test, targeted reruns, feature matrices, workspace package selection, and failure explanation. Use when adding tests, running Rust validation, or diagnosing cargo test failures.Other plugins' skills for the same job