Cargo workflows
SkillDev toolsUse when managing Cargo workspaces, feature flags, build scripts, CI caching, dependency auditing, or Cargo.lock with Rust.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Cargo workflows skill
What this skill tells your AI
The instructions your AI receives, as published by outlinedriven/outline-driven-development in .devin/skills/cargo-workflows/SKILL.md and read by ahel’s review.
Contract
| Field | Bound contract |
|---|---|
| Trigger | The user manages a Cargo workspace, sets feature flags, writes a build.rs script, configures CI caching, runs cargo nextest, audits dependencies, or updates Cargo.lock. |
| Authority | Reversible local: writes only local Cargo.toml, build.rs, Cargo.lock, CI workflow files, and report files the user names; rollback is git checkout -- or git reset for tracked files and rm for new reports. No remote mutation. |
| Side effect | Local Cargo.toml, workspace, build.rs, CI, and lock files may change; guidance and command output go to chat. |
| Done | The requested Cargo workflow builds or runs cleanly, or the failing command and its cause are reported. |
Inputs
- The project path (required): the workspace root or member crate.
- The task (required): workspace setup, feature flags, build script, CI caching,
cargo nextest, dependency audit, orCargo.lockmanagement. - Rust version (optional): defaults to 1.98.1 with edition 2024.
- Target crate or feature names (optional): used for scoped builds, tests, and updates.
- CI platform (optional): GitHub Actions, GitLab CI, or local runner.
Procedure
- Identify the project and toolchain. Run
rustc --versionandcargo --version. Locate the workspace root by finding theCargo.tomlthat contains[workspace]or the root package. Done when: the toolchain version and the workspace root are known. - Workspace setup. If the task is workspace setup, create or edit the root
Cargo.tomlwith[workspace],members,resolver = "2",[workspace.dependencies], and[workspace.package]. In memberCargo.toml, inherit withversion.workspace = trueandedition.workspace = true. For pattern details, seereferences/workspace-patterns.md. Done when:cargo check --workspacesucceeds. - Feature flags. If the task is feature flags, configure
[features]in the memberCargo.toml. Keep features additive, usedep:optional_depsyntax for optional dependencies, and setresolver = "2". Verify withcargo check --no-default-featuresandcargo check --all-features. Done when: the requested feature combinations build cleanly. - Build scripts (
build.rs). If the task is build scripts, add or editbuild.rsat the crate root. Emitcargo:rerun-if-changed=...,cargo:rustc-link-lib,cargo:rustc-link-search,cargo:rustc-cfg,cargo:rustc-env, andcargo:warningdirectives. Done when:cargo buildreruns the script only when inputs change and the crate links or generates correctly. - Incremental builds and CI caching. If the task is CI caching, configure
Swatinem/rust-cache@v2oractions/cache@v3to cache~/.cargo/registryandtarget/. Set[profile.release] incremental = falsewhen release builds must stay deterministic. Done when: CI logs show cache hits and build times are stable. cargo nextest. If the task is test execution, installcargo-nextest 0.9.143and runcargo nextest run. Addnextest.tomlwith profiles for CI and local runs. Done when: tests pass under the chosen profile.- Dependency auditing. If the task is dependency auditing, run
cargo auditfromcargo-audit 0.22.2,cargo deny checkfromcargo-deny 0.20.2, orcargo machete. Configuredeny.tomlfor licenses, duplicate versions, and banned crates. Done when: the tool reports no blocking findings or names each finding. Cargo.lockmanagement. If the task is lock management, keepCargo.lockin version control for applications and binaries; omit it for libraries. Usecargo generate-lockfile,cargo update, andcargo update -p <crate> --precise <version>. Done when: the lock file matches the intended dependency versions.- Common commands. If the task is a one-off command, run the matching
cargo build,cargo test,cargo tree,cargo expand, orcargo packageinvocation for the requested crate and features. Done when: the command output confirms the requested state.
Failure and recovery
| Failure class | Behavior |
|---|---|
| Workspace does not build | Check members paths, resolver, and missing Cargo.toml; fix and rerun cargo check --workspace. |
| Feature unification leaks | Confirm resolver = "2"; split dev and prod feature edges; use cargo tree -e features. |
| Build script reruns too often | Add cargo:rerun-if-changed for every input file and environment variable. |
| CI cache misses | Verify cache keys include Cargo.lock and restore both target/ and ~/.cargo. |
| Audit blocks the build | Address the advisory, add a rationale to deny.toml, or switch to an allowed license. |
| Lock update changes unexpected crates | Use cargo update --dry-run and cargo update -p <crate> to scope the change. |
Output
- A configured
Cargo.toml, workspace,build.rs, or CI file matching the task. - A
Cargo.lockwhen needed, with deterministic dependency versions. - A
nextest.tomlordeny.tomlconfiguration when requested. - A chat report naming the commands run and any remaining advisories or cache metrics.
Signals
- GitHub stars
- 52
- Forks
- 9
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
cargo-workflows- Source
- github.com/outlinedriven/outline-driven-development