API Design
axone-protocol/contracts
Best practices for designing CosmWasm smart contract APIs. An agent skill from axone-protocol/contracts.
A skill your agent uses when writing, modifying, or reviewing Rust code.
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install majiayu000/spellbook rust-best-practices --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rust-best-practices .claude/skills/rust-best-practices && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .claude/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practicesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install majiayu000/spellbook rust-best-practices --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/rust-best-practices .agents/skills/rust-best-practices && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .agents/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install majiayu000/spellbook rust-best-practices --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/rust-best-practices .cursor/skills/rust-best-practices && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .cursor/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/majiayu000/spellbook.git --path skills/rust-best-practices--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install majiayu000/spellbook rust-best-practices --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/rust-best-practices .gemini/skills/rust-best-practices && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .gemini/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install majiayu000/spellbook rust-best-practicesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/rust-best-practices .github/skills/rust-best-practices && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .github/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/spellbook --skill rust-best-practices -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install majiayu000/spellbook rust-best-practices --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/rust-best-practices .opencode/skills/rust-best-practices && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/majiayu000/spellbook/tree/main/skills/rust-best-practices into .opencode/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rust-best-practicesA skill your agent uses when writing, modifying, or reviewing Rust code.
Rust Best Practices is an agent skill from majiayu000/spellbook. Use when writing, modifying, or reviewing Rust code. ALWAYS invoke before Rust edits; covers Microsoft Pragmatic Rust guidance for error handling, API design, performance, and idiomatic patterns.
Its SKILL.md is about 960 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/advanced.md`).
It sits in Backend & APIs, covering API design. It works with Rust. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
microsoft.github.iorust-lang.github.iodoc.rust-lang.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rust Best Practices loads about 955 tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 118 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 118 words, ~955 tokens.
.claude/skills/rust-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Based on Microsoft Pragmatic Rust Guidelines and Rust community standards.
thiserror for Librariesuse thiserror::Error;
#[derive(Error, Debug)]
pub enum MyError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Parse error at line {line}: {message}")]
Parse { line: usize, message: String },
#[error("Not found: {0}")]
NotFound(String),
}anyhow for Applicationsuse anyhow::{Context, Result};
fn main() -> Result<()> {
let config = load_config()
.context("Failed to load configuration")?;
run_app(config)?;
Ok(())
}// ❌ BAD
pub fn get_item(index: usize) -> &Item {
&self.items[index] // Panics on out-of-bounds
}
// ✅ GOOD
pub fn get_item(&self, index: usize) -> Option<&Item> {
self.items.get(index)
}
// ✅ GOOD - when you need Result
pub fn get_item(&self, index: usize) -> Result<&Item, Error> {
self.items.get(index).ok_or(Error::NotFound(index))
}pub struct Client {
url: String,
timeout: Duration,
retries: u32,
}
impl Client {
pub fn builder(url: impl Into<String>) -> ClientBuilder {
ClientBuilder {
url: url.into(),
timeout: Duration::from_secs(30),
retries: 3,
}
}
}
pub struct ClientBuilder {
url: String,
timeout: Duration,
retries: u32,
}
impl ClientBuilder {
pub fn timeout(mut self, timeout: Duration) -> Self {
self.timeout = timeout;
self
}
pub fn retries(mut self, retries: u32) -> Self {
self.retries = retries;
self
}
pub fn build(self) -> Client {
Client {
url: self.url,
timeout: self.timeout,
retries: self.retries,
}
}
}// ❌ BAD - primitive obsession
fn create_user(name: String, email: String, age: u32) -> User { ... }
// ✅ GOOD - newtype wrappers
pub struct Username(String);
pub struct Email(String);
pub struct Age(u32);
impl Email {
pub fn new(email: impl Into<String>) -> Result<Self, ValidationError> {
let email = email.into();
if email.contains('@') {
Ok(Self(email))
} else {
Err(ValidationError::InvalidEmail)
}
}
}
fn create_user(name: Username, email: Email, age: Age) -> User { ... }impl Trait for Flexibility// ❌ BAD - overly specific
pub fn process(items: Vec<String>) { ... }
// ✅ GOOD - accept any iterable
pub fn process(items: impl IntoIterator<Item = impl AsRef<str>>) {
for item in items {
println!("{}", item.as_ref());
}
}© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/rust-best-practices of majiayu000/spellbook.
Open the folder on GitHubat commit ed52af7
Rust Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rust Best Practices this skillmajiayu000/spellbook | 287 | — | ~955 | Automated safety check: Pass | MIT | |
| API Designaxone-protocol/contracts | 123 | — | ~1.1k | Automated safety check: Pass | BSD-3-Clause | |
| Rust ConventionsGoldziher/ai-rulez | 159 | — | ~746 | Automated safety check: Pass | MIT | |
| Rust Trait API Designhashgraph-online/awesome-codex-plugins | 1.3k | — | ~929 | Automated safety check: Pass | MIT | |
| Rust SkillsJMBeresford/retrom | 2.1k | 1 repos | ~9.5k | Automated safety check: Pass | MIT | |
| Rust Skillsnoh-rs/nohrs | 156 | — | ~5.3k | Automated safety check: Pass | MIT |
axone-protocol/contracts
Best practices for designing CosmWasm smart contract APIs. An agent skill from axone-protocol/contracts.
Goldziher/ai-rulez
Rust code conventions covering edition 2024, cargo fmt/clippy, Result-based error handling, unsafe discipline, async with tokio, API-guideline naming, trait implementations, benchmarking, and…
hashgraph-online/awesome-codex-plugins
Design and review Rust trait APIs, generic bounds, dispatch models, and conversion contracts for clear public interfaces.
JMBeresford/retrom
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
noh-rs/nohrs
Comprehensive Rust coding guidelines with 179 rules across 14 categories.
static-web-server/static-web-server
Review or self-check a change to the Static Web Server (SWS) project before it is called done — correctness, invariants, API design, concurrency, maintainability, and an SWS-specific review checklist.
majiayu000/spellbook
Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.
majiayu000/spellbook
Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.
majiayu000/spellbook
Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.
majiayu000/spellbook
Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.
majiayu000/spellbook
Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.
majiayu000/spellbook
Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.
Works with
Categories
A skill your agent uses when writing, modifying, or reviewing Rust code. Rust Best Practices is an agent skill from majiayu000/spellbook. Use when writing, modifying, or reviewing Rust code.
Rust Best Practices fits situations like: reviewing Rust code; tasks that involve API design.
Run `npx skills add majiayu000/spellbook --skill rust-best-practices -a claude-code`. Or copy the skill folder (skills/rust-best-practices in majiayu000/spellbook) into .claude/skills/rust-best-practices in your project. Claude Code loads it when a task matches its description.
Run `npx skills add majiayu000/spellbook --skill rust-best-practices -a codex`. Or copy the skill folder (skills/rust-best-practices in majiayu000/spellbook) into .agents/skills/rust-best-practices in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill rust-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-best-practices, .gemini/skills/rust-best-practices, .github/skills/rust-best-practices and .opencode/skills/rust-best-practices in your project.
SKILL.md names no scripts, command-line tools or credentials: Rust Best Practices is instructions for the agent only.
SKILL.md names 3 domains. As links in the text: microsoft.github.io, rust-lang.github.io and doc.rust-lang.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rust Best Practices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 955 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 833 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Rust Best Practices: API Design (axone-protocol/contracts, 123 stars), Rust Conventions (Goldziher/ai-rulez, 159 stars), Rust Trait API Design (hashgraph-online/awesome-codex-plugins, 1.3k stars) and Rust Skills (JMBeresford/retrom, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.
Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.