/rust-skills:rust-cargo-buildfrom rust-skills
Configures, operates, and automates Cargo for Rust packages and workspaces. Covers manifests, targets, commands, dependency resolution, features, profiles, build scripts, cross-compilation, registries, packaging, publishing, and CI reproducibility.
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.
Read when SKILL.md points to them.
Use Cargo as a versioned package manager, build orchestrator, and automation interface. Base decisions on the project's actual Cargo version, MSRV, workspace root, targets, and release model. Use the official Cargo Book as the authority; keep this skill focused on task selection, execution, and validation.
Run the smallest relevant subset:
rustc --version --verbose
cargo --version
cargo locate-project --workspace
cargo metadata --no-deps --format-version 1
Determine:
edition, rust-version, resolver, and lockfile policy;Read only the reference needed for the current task:
| Task | Reference |
|---|---|
| Find the authoritative Cargo Guide, Reference, command, or changelog page | Official Documentation Map |
| Select a Cargo command and understand its side effects | Cargo Command Map |
| Start, build, run, test, document, or add CI to a package | Cargo Guide Workflow |
| Configure package metadata and lib/bin/example/test/bench targets | Manifest and Targets |
| Configure dependency sources, features, overrides, or resolvers | Dependencies, Features, and Resolvers |
| Configure members and inherited workspace fields | Workspaces |
Configure .cargo/config.toml, environment variables, aliases, network, or target settings | Configuration and Environment |
| Tune dev/release/custom profiles | Profiles |
Generate code, compile native dependencies, or emit Cargo instructions from build.rs | Build Scripts |
| Diagnose rebuilds, duplicate compilation, cache layout, timings, or future incompatibilities | Build Cache and Diagnostics |
| Configure a linker, runner, or non-host target | Cross-compilation |
| Configure registries, source replacement, vendoring, credentials, or authentication | Registries and Authentication |
| Inspect package contents, publish, manage owners, or yank a version | Packaging and Publishing |
| Build scripts and tooling around stable Cargo JSON or package IDs | Metadata and Automation |
Evaluate cargo-features, -Z, or other nightly-only behavior | Unstable Cargo Features |
cargo metadata, cargo tree, and the effective configuration rather than inferring from one manifest.package.rust-version and test that toolchain.Cargo.lock; the current Cargo Guide recommends version control by default.--locked when a committed lockfile must not change.--frozen only when both lockfile mutation and network access must be prohibited.cargo tree -e features.cfg(feature = "...") in target dependency tables.[patch], source replacement, and vendoring only for their documented purposes; do not treat them as interchangeable..cargo/config.toml discovery from the command's working directory.OUT_DIR.cargo::rerun-if-changed and cargo::rerun-if-env-changed instructions.links metadata as public integration contracts.check, incremental development, tests, CI, release linking, runtime, or binary size.cargo build --timings, cargo tree -d, and future-incompatibility reports over speculative cache deletion.cargo package --list and package verification before publishing.cargo-features, -Z, or [unstable] configuration as stable.Adapt the matrix instead of running unsupported combinations blindly:
cargo metadata --format-version 1
cargo fmt --all --check
cargo check --workspace --all-targets --all-features
cargo test --workspace --all-targets --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo package --list
Append --locked to supported Cargo commands when the repository commits or requires a lockfile. If the workspace intentionally excludes some features or targets, define an explicit matrix and record why.
rust-dependenciesrust-workspacerust-testingrust-documentationrust-style-clippyrust-performancerust-semverrust-embeddedCargo command mechanics may remain here even when the higher-level decision belongs to another skill.
This skill does not collect, store, or transmit user data. Treat registry tokens, Git credentials, environment variables, generated artifacts, and package contents as potentially sensitive.
agents/openai.yaml (opens in a new tab)examples/examples.md (opens in a new tab)examples/golden-features/Cargo.toml (opens in a new tab)examples/golden-features/src/lib.rs (opens in a new tab)references/build-cache-diagnostics.md (opens in a new tab)references/build-scripts.md (opens in a new tab)references/cargo-command-map.md (opens in a new tab)references/cargo-guide-workflow.md (opens in a new tab)references/configuration-environment.md (opens in a new tab)references/cross-compilation.md (opens in a new tab)references/dependencies-features-resolver.md (opens in a new tab)references/manifest-targets.md (opens in a new tab)references/metadata-automation.md (opens in a new tab)references/official-doc-map.md (opens in a new tab)references/profiles.md (opens in a new tab)references/publishing.md (opens in a new tab)references/registries-authentication.md (opens in a new tab)references/unstable-features.md (opens in a new tab)references/workspaces.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (full-stack-skills/rust-skills) — no native marketplace selected
npx claudepluginhub p/full-stack-skills-rust-skills29 skills in this plugin
/rust-api-designDesign Rust library APIs that follow the Rust API Guidelines — naming (C-CASE, C-CONV, C-GETTER), interop traits (C-COMMON-TRAITS, C-CONVERT, C-ITER, C-SERDE), predictability (C-INTUITIVE, C-CONST), flexibility (C-GENERIC, C-NEWTYPE, C-EXT), type safety (C-BOOL, C-NONZERO, C-WRAPPER, C-STR), dependability (C-PANIC, C-UNWRAP), debuggability (C-DEBUG), and future-proofing (C-SEALED, C-STRUCT-FIELD, C-NON-EXHAUSTIVE). Use when users design a public crate API, choose between generics/concrete/newtype, decide trait bounds, hide implementation, avoid breakage, or ask "what is idiomatic Rust API design"; hand semver and publish workflow to rust-semver, lint config to rust-style-clippy, and in-crate layout to rust-module-layout./rust-by-exampleShow Rust patterns through short compilable examples — type conversions (From/Into/TryFrom/as/Deref), flow control (if let/while let/match/loop), functions and closures (Fn/FnMut/FnOnce, captures), modules (mod/use/pub/super/self), generics and traits (bounds/associated types/trait objects), error handling (?/Result/thiserror/anyhow), attributes (derive/cfg/inline/allow), unsafe (raw pointers/unions/ABI), procedural macros (derive/attribute/function-like), and inline asm. Use when users ask "how do I write X in Rust", need a concrete pattern with copy-pasteable code, or are migrating from Java/Python/Go/C++ and want the Rust equivalent; hand architecture decisions to rust-api-design/rust-workspace, std API selection to rust-stdlib, and async runtime to rust-concurrency.Other plugins' skills for the same job