acpx-faq
Run coding agents (codex, claude, agy/Antigravity) through the acpx ACP CLI - the headless lane outside a herdr pane (no HERDR_ENV). Use before launching or…
Day-1 guide to building well in Rust - ownership, errors as values, String vs &str, Box/Rc/Arc, anyhow vs thiserror, and a crate shortlist (tokio, serde, axum, sqlx). Use when starting a Rust project, fighting the borrow checker, or picking crates.
$ npx -y skills add tenequm/skills --skill rust-dev --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/rust-devContext preview
The summary Claude sees to decide when to auto-load this skill.
Day-1 guide to building well in Rust - ownership, errors as values, String vs &str, Box/Rc/Arc, anyhow vs thiserror, and a crate shortlist (tokio, serde, axum, sqlx). Use when starting a Rust project, fighting the borrow checker, or picking crates.
name: rust-dev
description: Day-1 guide to building well in Rust - ownership, errors as values, String vs &str, Box/Rc/Arc, anyhow vs thiserror, and a crate shortlist (tokio, serde, axum, sqlx). Use when starting a Rust project, fighting the borrow checker, or picking crates.
metadata:
version: "0.6.0"
categories: "development"
topics: "rust, ownership, cargo, crates, tokio"
upstream: "rust@1.98.1, axum@0.8.9, reqwest@0.13.5, sqlx@0.9.0, jiff@0.2.35, kache@0.18.0, dist@0.32.0, release-plz-action@0.5.135"
openclaw:
homepage: https://github.com/tenequm/skills/tree/main/skills/rust-dev
emoji: "🦀"A practical foundation for writing Rust apps well from the first commit. Not a textbook. Focuses on the differences from other languages, the day-1 decisions that shape everything else, and the small set of crates that cover most real apps.
# 1. Install the toolchain (rustup is the toolchain manager) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # 2. Confirm components (rustfmt and clippy ship with stable, rust-src enables IDE features) rustup component add rustfmt clippy rust-src # 3. Create a project cargo new my-app # binary (src/main.rs) cargo new --lib my-lib # library (src/lib.rs) # 4. The dev loop (memorize these four) cargo check # fast type-check, no codegen cargo run # build and run (binary) cargo test # build and run tests (incl. doctests) cargo clippy # lint (run before pushing) cargo fmt # format # 5. Manage dependencies without editing Cargo.toml by hand cargo add tokio --features full cargo remove tokio cargo update # recompute Cargo.lock within existing semver ranges
`cargo update` only moves within the version ranges already in `Cargo.toml`. Crossing a major version (`1.x` to `2.0`) needs a `Cargo.toml` edit or `cargo add <crate>@2`.
**rust-analyzer is mandatory.** It is the language server every editor uses (VS Code, Zed, Neovim, Helix, RustRover uses its own engine but is comparable). In VS Code, install the `rust-analyzer` extension and set `rust-analyzer.check.command` to `"clippy"` so you get lint feedback on save.
**Want a file watcher later?** `cargo install --locked bacon`, then run `bacon` in your project. Not needed on day 1.
Rust trades two things you take for granted in most languages (a garbage collector and exceptions) for compile-time guarantees about memory, data races, and error handling. The shape of the language follows from that trade.
Think of values like physical objects. A book, a file, a network connection. At any moment, **one variable owns it**. You can:
When the owner goes out of scope, the value is dropped (memory freed, file closed, lock released). No GC, no manual `free`. This is RAII, enforced by the compiler.
At any moment, a piece of data has **either**:
never both. This single rule is what eliminates data races and most use-after-free bugs. The borrow checker enforces it. When it complains, it is telling you your data ownership story is unclear, not that the language is being difficult.
There is no `try`/`catch`. Functions that can fail return `Result<T, E>`. Functions that can return nothing useful return `Option<T>`. The compiler forces you to handle both. The `?` operator propagates errors up the call stack with one character:
fn read_config() -> Result<Config, anyhow::Error> {
let text = std::fs::read_to_string("config.toml")?; // ? = early-return on Err
let config = toml::from_str(&text)?;
Ok(config)
}There is no `null`. `Option<T>` is `None` or `Some(value)`. The compiler will not let you forget the `None` case.
A `trait` defines behavior. Types `impl` traits. So far so familiar. The differences:
The most common newcomer mistake is treating compiler errors as obstacles to silence. They are not. Almost every borrow-check error reveals a real issue with **who owns what**. When you get stuck, the question is rarely "how do I make this compile" and almost always "what is the actual ownership relationship I want here?" Read the error. The compiler is unusually informative.
Before writing a function, ask: does it need to **own**, **read**, or **modify** the input?
``
Claude Code skills for founders, developers, and web3 builders. This repository publishes reusable skill folders under skills//, ships stable bundle downloads through GitHub Releases, and publishes changed skills to ClawHub.
Repo: tenequm/skills
Run coding agents (codex, claude, agy/Antigravity) through the acpx ACP CLI - the headless lane outside a herdr pane (no HERDR_ENV). Use before launching or…
Build Chrome extensions with the WXT framework and TypeScript, React, Vue, or Svelte. Use when creating browser extensions or cross-browser add-ons. Triggers…
Decision validation and thinking frameworks for founders. Use to pressure-test a decision, validate next steps, or sanity-check an approach - "should I", "help…