build-rust
Skill15 starsChanged 5 months agoMITView on GitHub
Compile, test, and verify Rust projects following 2026 best practices. Use when asked to build, compile, or check a Rust project, when CI/CD pipeline needs build steps, or when investigating build failures. Triggers: "build rust", "compile project", "cargo build", "check rust".
- Installs packages
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- anti-ai-slopSkill
- architecture-diagramSkill
- atomic-commitSkill
- codacySkill
- crates-io-name-checkSkill
- dora-reportSkill
- goap-agentSkill
- harnessSkill
- issue-triageSkill
- lint-rustSkill
- metrics-reporterSkill
- privacy-firstSkill
- release-rustSkill
- reviewing-pull-requestsSkill
- secret-lintSkill
- self-fix-loopSkill
- skill-creatorSkill
- skill-evaluatorSkill
- stacked-prsSkill
- task-decompositionSkill
- test-rustSkill
- tokio-performanceSkill
- triz-analysisSkill
- triz-solverSkill
- verify-actionsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When asked to build, compile, or check a Rust project
- Distinctive: line 26
When CI/CD pipeline needs to run build steps
- Distinctive: line 27
When investigating build failures or warnings
- Very specific: line 100
Fix: Ensure target/ is on the Linux filesystem, not Windows mount.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Skill: build-rust
Purpose
Compile, test, and verify Rust projects following 2026 best practices.
Trigger Conditions
- When asked to build, compile, or check a Rust project
- When CI/CD pipeline needs to run build steps
- When investigating build failures or warnings
Prerequisites
- Rust toolchain installed (see
rust-toolchain.toml) cargoavailable in PATH- WSL2 environment (optional but recommended on Windows)
Steps
1. Check (fast feedback)
cargo check --all-targets --all-features 2>&12. Build (debug)
cargo build --all-targets 2>&13. Build (release)
cargo build --release 2>&14. Lint with Clippy
cargo clippy --workspace --all-targets --all-features -- \
-D warnings \
-W clippy::pedantic \
-W clippy::nursery \
-A clippy::module_name_repetitions5. Format check
cargo fmt --all -- --check6. Run tests (with nextest)
cargo nextest run --all-features7. Doc tests
cargo test --workspace --doc --all-features8. Report metrics
Call metrics-reporter skill.
Success Criteria
cargo checkexits 0 with no errorscargo clippyexits 0 with-D warningscargo fmt --checkexits 0- All tests pass
- No
unsafeblocks without// SAFETY:comments
Common Issues
Slow incremental builds in WSL2
Symptom: Build takes >30s even for small changes
Fix: Ensure target/ is on the Linux filesystem, not Windows mount.
See .cargo/config.toml for WSL2 disk optimization.
VS Code reloads during build
Symptom: VS Code refreshes while cargo build runs
Fix: Set files.watcherExclude for **/target/** in .vscode/settings.json
Linker errors on WSL2
Symptom: error: linker 'cc' not found
Fix: sudo apt-get install build-essential
Rationalizations
| Rationalization | Reality |
| "cargo build passes, so the code is correct." | Build success doesn't mean tests pass or lints are clean. Run the full pipeline. |
| "I'll skip clippy pedantic lints to save time." | Pedantic lints catch real issues. Run them in CI at minimum. |
| "Just use cargo test, nextest isn't installed." | Install nextest for parallel test execution — it's significantly faster. |
Red Flags
- Skipping
--all-featuresin clippy/test commands (hides feature-gated bugs) - Using
cargo buildwithout--all-targets(misses test/bench compilation errors) - Running
cargo fmtwithout--checkin CI (format drift goes unnoticed)
Related Skills
test-rust- Running the test suitelint-rust- Deep lint analysisrelease-rust- Creating releasesmetrics-reporter- Mandatory task completion reporting
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.

