cargo
Skill15 starsChanged 2 months agoMITView on GitHub
Expert Cargo Rust package manager assistance covering workspaces, dependencies, feature flags, cross-compilation, and release profiles. Use when building, testing, and packaging Rust projects.
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- getcargohq/cargo-skillstheir own version, first seen Nov 9, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
- carapace-sh/carapace-bintheir own version, first seen Oct 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- carapace-sh/carapace-bin★ 2ksame name
- getcargohq/cargo-skills★ 27same name
- jholhewres/devclaw-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 98
Problem: Default Rust release binaries are bloated and larger than necessary for container deployment.
- Very specific: line 116
Use lto = "fat", codegen-units = 1, and strip = true in release profiles to minimize binary size.
- Very specific: line 117
Commit Cargo.lock for all binary application crates to guarantee reproducible builds.
- Very specific: line 118
Run cargo clippy -- -D warnings and cargo audit in all CI pipelines.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cargo
Cargo is Rust's build system and package manager. It is famous for its reliability and developer experience.
When to Use
- Rust Dependency & Build Management: Compiling, building, packaging, and publishing Rust packages and crates.
- Workspace Multi-Crate Architectures: Managing monorepos with shared dependencies and unified lockfiles.
- Continuous Integration & Static Analysis: Running
cargo test,cargo clippy,cargo fmt, andcargo audit. - Release Optimization & Cross-Compilation: Building stripped, LTO-optimized release binaries for production.
Quick Start
cargo new my-project
cd my-project
cargo run# Cargo.toml
[dependencies]
serde = "1.0"Core Concepts
Cargo Workspace Configuration (Cargo.toml)
Managing multiple interdependent crates in a monorepo:
# /Cargo.toml (Workspace Root)
[workspace]
members = [
"crates/api-server",
"crates/core-domain",
"crates/db-migrations",
]
resolver = "2"
[workspace.dependencies]
tokio = { version = "1.40", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
thiserror = "1.0"
[profile.release]
opt-level = 3
lto = "fat" # Link-time optimization
codegen-units = 1 # Maximize optimizations across units
panic = "abort" # Eliminate unwinding code overhead
strip = true # Automatically strip symbols from binaryHigh-Speed Testing, Benchmarking & Lints
Automating quality checks in CI/CD pipelines:
# Format check
cargo fmt --all -- --check
# Clippy linter with strict warning enforcement
cargo clippy --all-targets --all-features -- -D warnings
# Execute all workspace unit and integration tests in parallel
cargo test --workspace --all-features
# Security audit against RustSec advisory database
cargo auditAdding and Managing Dependencies
Adding pinned crates with specific feature sets:
# Add dependency with targeted features
cargo add tokio --features full
cargo add serde --features derive
cargo add axum --features ws
# Update dependencies adhering to SemVer
cargo updateCommon Patterns
Optimized Release Profile with LTO and Symbol Stripping
Problem: Default Rust release binaries are bloated and larger than necessary for container deployment.
Solution:
Configure release profile optimizations in Cargo.toml:
[profile.release]
opt-level = 3 # Maximum optimization
lto = "fat" # Link-time optimization across all crates
codegen-units = 1 # Maximize LTO optimization (slower compile, faster binary)
panic = "abort" # Strip unwind tables
strip = true # Strip all debug symbolsBest Practices
Do:
- Use
lto = "fat",codegen-units = 1, andstrip = truein release profiles to minimize binary size. - Commit
Cargo.lockfor all binary application crates to guarantee reproducible builds. - Run
cargo clippy -- -D warningsandcargo auditin all CI pipelines. - Leverage workspace-level dependencies (
workspace.dependencies) to synchronize versions across crates.
Don't:
- Ignore
Cargo.lockin application repositories (only libraries should consider omitting it). - Enable heavy, unneeded crate features; include only the specific feature flags your application uses.
- Deploy debug build artifacts (
target/debug); always compile production releases withcargo build --release.
Troubleshooting
| Error | Cause | Solution |
error: failed to select a version for the requirement | Incompatible dependency version constraints in Cargo.toml. | Run cargo update or inspect conflicts in Cargo.lock. |
error: could not compile ... (exit status: 101) | Compile error in code or missing native C library dependencies. | Install missing system packages (e.g. libssl-dev or pkg-config). |
linking with cc failed: exit code: 1 | Missing linker or C toolchain on host system. | Install build essentials: sudo apt-get install build-essential. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

