rust
Use before you write or change Rust code, add a crate or a dependency to a Cargo workspace, write or move a Rust test, define or map an error type, or add a…
Skill by futex-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/futex-ai-rust
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rust
What's inside
- Skill name
rust- Description
- Use before you write or change Rust code, add a crate or a dependency to a Cargo workspace, write or move a Rust test, define or map an error type, or add a trait, a mock, or diagnostics, when you reach for unwrap, expect, panic, anyhow, or println in library code, when a Rust file passes 200 lines, and when cargo fmt, clippy, or a Rust lint reports a problem.
- License
- MIT
- Instructions
- 76 lines in SKILL.md · view on GitHub
Files (5)
- SKILL.md
- architecture.md · references/
- errors.md · references/
- files-and-modules.md · references/
- testing.md · references/
SKILL.md (first lines)
# Rust
These rules apply to every Rust edit. The references hold the full contract
with examples and take precedence when the two differ in detail:
- [references/architecture.md](references/architecture.md): crates, traits
and `dyn` dispatch, generics, typing, mocking, diagnostics, panics, unsafe.
- [references/errors.md](references/errors.md): the `thiserror` error
contract.
- [references/testing.md](references/testing.md): test layout and snapshots.
- [references/files-and-modules.md](references/files-and-modules.md): file
size, imports, visibility, modules, doc comments, drops.
## Workspace and tooling
- Use a workspace with multiple crates to split the code into concrete
units. Every crate has its own `README.md`; see the `documentation` skill.
- Run `cargo fmt --all -- --check` after Rust changes. If it fails, run
`cargo fmt --all` and re-run the check. Run `cargo clippy` after any
change.
- Add external dependencies with `cargo add` without a version. Add
workspace internal crates manually with `dependency = { workspace = true }`.
- Prefer `clap` for CLI parsing and `diesel` for database access.
## Architecture
- Model all non-pure behaviour behind traits and consume it through
`dyn Trait`, with `Arc<dyn Trait + Send + Sync>` for shared runtime
dependencies. Prefer `dyn` dispatch over parametric generics. Only small
pure free functions and pure value types are exempt.
- Use `unimock` to mock trait boundaries in unit tests, including same-crate
traits with one implementation. Unit tests must not use real disk IO,
databases, Docker, subprocesses, clocks, or network calls.
- Use `tracing` for diagnostics in libraries, servers, and workers; never
`println!`, `eprintln!`, or `dbg!` there. Direct terminal output is only
for CLI results, prompts, raw data output, REPL messages, build-script
directives, tests, examples, and developer task output.
- Prefer enums and structs over raw strings and `serde_json::Value`. Fully
type domain, service, and interface code.
- Types that cross to a TypeScript or JavaScript frontend are generated
from the Rust types. See the `shared-types` skill.
## Files and modules
- Every module has a module-level doc comment and every public item has a
doc comment. Avoid inline comments.
- Rust files have a 300-line hard cap. Target 200 lines, split into
modules, and never use `include!` to get around it.
- Order imports std, external crates, `crate::`, then `self::` and
`super::`. Declare them at the top of the file, never rename with `as`,
and prefer imports over inline `crate::` paths.
- Use the narrowest visibility that works. Keep `lib.rs`, `mod.rs`, and
`bin.rs` as thin module roots. Use `#[path]` only for test modules. Use
`#[expect(dead_code, reason = "...")]` rather than a silent `allow`.
- Do not call `drop` unless absolutely necessary; end a borrow with a scope.
## Tests
- Keep tests out of production files. Put them in a `_tests_` directory
beside the source and declare them with
`#[cfg(test)] #[path = "_tests_/<name>_tests.rs"] mod <name>_tests;`.
- Use file-based `insta` snapshots only.
## Errors and panics
- Never use `panic!()`, `unwrap()`, or `expect()` in production code. Test
code may use them.
- Avoid `unsafe` except for FFI. Keep it minimal, isolate it, and add a
safety comment.
- Define errors as `thiserror` enums per crate or module with `[crate/mod]`
message prefixes, typed variants that callers branch on, and
`Internal(#[from] InternalError)` as the fallback. Propagate with `?`.
Never use `anyhow`, `eyre`, `#[error(transparent)]`, `Other(String)`,
string matching on errors, or `map_err` in production code.From futex-ai/skills, MIT.
More from futex-ai/skills
- 0.592score
writing-skills
futex-ai
Use when you create or edit a skill, write or change a skill description, or when an agent skipped a rule, did not load a skill, or loaded the wrong one.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
deterministic-tests
futex-ai
Use when a test fails and then passes on a rerun, when a test is flaky or timing-dependent, when a test would assert elapsed time, a timeout, or performance…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
git-commit
futex-ai
Use before you commit and directly after, when you write a commit message or a pull request title and description, when you squash, when the diff against…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
implementation-review
futex-ai
Use after you push a branch and the work needs a review, before you run a review or apply its findings, when a plan's review TODO is reached, when the user…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
shared-types
futex-ai
Use when a Rust backend and a TypeScript or JavaScript frontend exchange data, before you add or change a request, response, query, event, message, or error…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
git-merge
futex-ai
Use before you merge or rebase a branch, when origin/main has moved ahead of your branch, when you resolve merge conflicts, directly after you commit a merge…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
mockups
futex-ai
Use before you create or change a mockup under docs/mockups, a screen component, a user flow, or a Mokly entry, component, or configuration, when a plan has a…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
product-ui
futex-ai
Use before you implement or change a screen, a component, a view, or a mockup, when you write or edit user-facing text such as a status, helper, label, or…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
decisions-and-findings
futex-ai
Use before you send a message that asks the user for a decision, presents review findings or review items, or gives a final report, when the user asks for…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
documentation
futex-ai
Use before you edit a README.md, a crate README, anything under docs/, an architecture doc, or a protocol doc, when a behaviour change could leave a doc…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
typescript
futex-ai
Use before you write or change TypeScript or JavaScript, add an npm dependency, set up a new package, or write a frontend file, a Node script, or a test file…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
databases
futex-ai
Use before you add, edit, or name a database migration or a seed migration, when you touch a schema, Diesel code, a migration lock, or a crate named…
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 19, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/futex-ai/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from futex-ai
- 0.592score
writing-skills
futex-ai
Use when you create or edit a skill, write or change a skill description, or when an agent skipped a rule, did not load a skill, or loaded the wrong one.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
deterministic-tests
futex-ai
Use when a test fails and then passes on a rerun, when a test is flaky or timing-dependent, when a test would assert elapsed time, a timeout, or performance…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
git-commit
futex-ai
Use before you commit and directly after, when you write a commit message or a pull request title and description, when you squash, when the diff against…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
shared-types
futex-ai
Use when a Rust backend and a TypeScript or JavaScript frontend exchange data, before you add or change a request, response, query, event, message, or error…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
implementation-review
futex-ai
Use after you push a branch and the work needs a review, before you run a review or apply its findings, when a plan's review TODO is reached, when the user…
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
git-merge
futex-ai
Use before you merge or rebase a branch, when origin/main has moved ahead of your branch, when you resolve merge conflicts, directly after you commit a merge…
SkillAFreshness: A★ 1Claude Code +9
Cite this page
rust skill. Agent Mart. https://agentmart.dev/skills/futex-ai-rust (last updated 2026-10-24)