coding-guidelines · actionbook — Claude Code skill: Rust style rules
A skill with 50 Rust coding rules: naming, strings, errors, memory, async. Useful during review or when the agent writes a new module.
npx skills add actionbook/rust-skills --skill coding-guidelines -a claude-codeWhat coding-guidelines does
The skill answers questions about Rust style and nudges the agent toward idiomatic code. Inside are rule tables for naming, data types, strings, error handling, memory, concurrency, async and macros. A separate table maps deprecated items to replacements: lazy_static! to std::sync::OnceLock, once_cell::Lazy to std::sync::LazyLock, try!() to the ? operator.
The rules are the non-obvious, Rust-specific ones. No get_ prefix on function names. Cheap borrows get as_, expensive ones to_, ownership transfer into_. Statics take a prefix like G_CONFIG, consts take none. There is a short cheat sheet too: snake_case for functions and variables, CamelCase for types, SCREAMING_CASE for constants, rustfmt for formatting, #![warn(clippy::all)] for lints.
You do not invoke it by hand — it loads as knowledge and fires when you ask about Rust style or review. Installing it into a project in another language makes little sense, since the rules are tied to Rust and will not come up elsewhere.
What it helps with
- pick a name for a converter:
as_,to_orinto_ - swap
lazy_static!andonce_cellfor std types - decide when
expect()beatsunwrap() - run a Rust review against a fixed rule list
- drop
Mutexfor primitives in favour of atomics
Example prompts for the agent
- check this module against coding-guidelines and tell me what breaks Rust style
- what should I name a function that takes ownership of a string?
- replace the deprecated crates in this file with current std equivalents
How to install coding-guidelines
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill coding-guidelines -a claude-code2Manually: put the files in place
~/.claude/skills/coding-guidelines/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/coding-guidelines/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill coding-guidelines -a codex2Manually: put the files in place
.agents/skills/coding-guidelines/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill coding-guidelines -a cursor2Manually: put the files in place
.cursor/skills/coding-guidelines/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills coding-guidelines2Manually: put the files in place
.github/skills/coding-guidelines/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill coding-guidelines -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/coding-guidelinesManually: put the files in place
.devin/skills/coding-guidelines/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill coding-guidelines -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about coding-guidelines
How do I install coding-guidelines in Claude?
Run npx skills add actionbook/rust-skills --skill coding-guidelines -a claude-code. The skill lands in ~/.claude/skills/coding-guidelines/SKILL.md.
What does coding-guidelines do?
It gives the agent 50 Rust style rules: naming, strings, error handling, memory, concurrency, async, macros. Plus a table of replacements for deprecated crates and macros.
Do I invoke the skill manually?
No, it has user-invocable: false. It loads as knowledge and triggers when you ask about Rust style or review.
Similar skills
All skills for Programming languages →coding-guidelines by other authors comes first.