/ecc:rust-buildfrom ecc
Fixes Rust build errors, borrow checker issues, and dependency problems incrementally. Runs diagnostics, parses errors, fixes one at a time, and verifies each fix.
Ships in ecc. Installing the plugin adds it to Claude Code.
This command invokes the rust-build-resolver agent to incrementally fix Rust build errors with minimal changes.
cargo check, cargo clippy, cargo fmt --checkcargo check after each changeUse /rust-build when:
cargo build or cargo check fails with errorscargo clippy reports warnings# Primary build check
cargo check 2>&1
# Lints and suggestions
cargo clippy -- -D warnings 2>&1
# Formatting check
cargo fmt --check 2>&1
# Dependency issues
cargo tree --duplicates
# Security audit (if available)
if command -v cargo-audit >/dev/null; then cargo audit; else echo "cargo-audit not installed"; fi
User: /rust-build
Agent:
# Rust Build Resolution
## Initial Diagnostics
```bash
$ cargo check
error[E0502]: cannot borrow `map` as mutable because it is also borrowed as immutable
--> src/service/cache.rs:25:5
error[E0308]: mismatched types
--> src/handler/api.rs:42:12
error[E0425]: cannot find value `db` in this scope
--> src/handler/api.rs:58:9
```
Errors found: 3
## Fix 1: Borrow Checker Error
File: src/service/cache.rs:25
Error: E0502 — cannot borrow `map` as mutable because also borrowed as immutable
Cause: Immutable borrow still active during mutable insert
```rust
// Changed: restructured to end immutable borrow before mutable access
if !map.contains_key("key") {
map.insert("key".into(), default);
}
```
```bash
$ cargo check
# 2 errors remaining
```
## Fix 2: Type Mismatch
File: src/handler/api.rs:42
Error: E0308 — mismatched types: expected `usize`, found `&str`
```rust
// Changed
let count = params.get("count");
// To
let count: usize = params.get("count")
.and_then(|s| s.parse().ok())
.unwrap_or(0);
```
```bash
$ cargo check
# 1 error remaining
```
## Fix 3: Unresolved Name
File: src/handler/api.rs:58
Error: E0425 — cannot find value `db` in this scope
Cause: Missing import
```rust
// Added
use crate::db;
```
```bash
$ cargo check
# Build successful!
```
## Final Verification
```bash
$ cargo clippy -- -D warnings
# No warnings
$ cargo test
running 6 tests
test service::cache::tests::test_insert ... ok
test service::cache::tests::test_get ... ok
test handler::api::tests::test_parse_count ... ok
test handler::api::tests::test_missing_count ... ok
test handler::api::tests::test_db_import ... ok
test handler::api::tests::test_response ... ok
test result: ok. 6 passed; 0 failed; 0 ignored
```
## Summary
| Metric | Count |
|--------|-------|
| Build errors fixed | 3 |
| Clippy warnings fixed | 0 |
| Files modified | 2 |
| Remaining issues | 0 |
Build Status: SUCCESS
| Error | Typical Fix |
|---|---|
cannot borrow as mutable | Restructure to end immutable borrow first; clone only if justified |
does not live long enough | Use owned type or add lifetime annotation |
cannot move out of | Restructure to take ownership; clone only as last resort |
mismatched types | Add .into(), as, or explicit conversion |
trait X not implemented | Add #[derive(Trait)] or implement manually |
unresolved import | Add to Cargo.toml or fix use path |
cannot find value | Add import or fix path |
cargo fmt complianceThe agent will stop and report if:
/rust-test - Run tests after build succeeds/rust-review - Review code qualityverification-loop skill - Full verification loopagents/rust-build-resolver.mdskills/rust-patterns/What the command file sets; muted values are Claude Code's defaults
rust-error-fixing, borrow-checker, incremental-fix, cargo, lints, build-resolution
7-day visitors to each command page
npx claudepluginhub semaes111/everything_claude_code --plugin ecc75 commands in this plugin
/asideAside CommandAnswer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering./auto-updateAuto UpdatePull the latest ECC repo changes and reinstall the current managed targets./build-fixBuild and FixDetect the project build system and incrementally fix build/type errors with minimal safe changes./cost-reportCost ReportGenerate a local Claude Code cost report from a cost-tracker SQLite database.52 plugins ship this exact command · first indexed Apr 30, 2026
Showing 6 of 52 plugins, one per repository first
Other plugins' commands for the same job