Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/majiayu000/spellbooknpx agentmods add skills/majiayu000/spellbook/rust-projectWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/majiayu000/spellbook/rust-project)<a href="https://agentmods.dev/skills/majiayu000/spellbook/rust-project"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/rust-project.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.03015 |
| Opus 5 | $0.00022 | $0.01507 |
| Sonnet 5 | $0.00009 | $0.00603 |
| Haiku 4.5 | $0.00004 | $0.00301 |
Grade A, and why
rust-project scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Project Architecture
Core Principles
- Ownership-first — Embrace borrow checker, no unnecessary clones
- Zero-cost abstractions — Newtype, iterators, async/await
- Workspace for scale — Use Cargo workspace for multi-crate projects
- Error precision — thiserror for libs, anyhow for apps
- Async with Tokio — Tokio runtime + tracing for observability
- No backwards compatibility — Delete, don't deprecate. Change directly
- LiteLLM for LLM APIs — Use LiteLLM proxy for all LLM integrations
No Backwards Compatibility
Delete unused code. Change directly. No compatibility layers.
// ❌ BAD: Deprecated attribute kept around
#[deprecated(since = "0.2.0", note = "Use new_function instead")]
pub fn old_function() { ... }
// ❌ BAD: Type alias for renamed types
pub type OldName = NewName; // "for backwards compatibility"
// ❌ BAD: Unused parameters
fn process(_legacy: &str, data: &Data) { ... }
// ❌ BAD: Feature flags for old behavior
#[cfg(feature = "legacy")]
fn old_impl() { ... }
// ✅ GOOD: Just delete and update all usages
pub fn new_function() { ... }
// Then: Find & replace all old_function → new_function
// ✅ GOOD: Remove unused parameters entirely
fn process(data: &Data) { ... }
LiteLLM for LLM APIs
Use LiteLLM proxy. Don't call provider APIs directly.
// src/llm.rs
use async_openai::{Client, config::OpenAIConfig};
pub fn create_client(base_url: &str, api_key: &str) -> Client<OpenAIConfig> {
let config = OpenAIConfig::new()
.with_api_base(base_url) // LiteLLM proxy URL
.with_api_key(api_key);
Client::with_config(config)
}
// Usage: connect to LiteLLM, use any model
let client = create_client("http://localhost:4000", &api_key);
let request = CreateChatCompletionRequestArgs::default()
.model("gpt-4o") // or "claude-3-opus", "gemini-pro", etc.
.messages(vec![...])
.build()?;
Quick Start
1. Initialize Project
# Simple project
cargo new myapp
cd myapp
# Workspace project
mkdir myapp && cd myapp
cargo init --name app
What ships with it
27 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- reference/architecture.md 10 KB
- reference/extended.md 1.5 KB
- reference/patterns.md 14 KB
- reference/tech-stack.md 10 KB
- templates/cli/Cargo.toml 391 B
- templates/cli/src/commands/mod.rs 1.3 KB
- templates/cli/src/commands/process.rs 1.5 KB
- templates/cli/src/error.rs 311 B
- templates/cli/src/main.rs 874 B
- templates/web-service/.env.example 243 B
- templates/web-service/Cargo.toml 854 B
- templates/web-service/config/default.toml 227 B
- templates/web-service/Makefile 1.4 KB
- templates/web-service/migrations/001_init.sql 325 B
- templates/web-service/src/config.rs 1.1 KB
- templates/web-service/src/db.rs 363 B
- templates/web-service/src/error.rs 2.3 KB
- templates/web-service/src/handlers/health.rs 136 B
- templates/web-service/src/handlers/mod.rs 30 B
- templates/web-service/src/handlers/user.rs 1.1 KB
- templates/web-service/src/lib.rs 367 B
- templates/web-service/src/main.rs 1002 B
- templates/web-service/src/models/mod.rs 28 B
- templates/web-service/src/models/user.rs 529 B
- templates/web-service/src/router.rs 788 B
- templates/web-service/src/services/mod.rs 14 B
- templates/web-service/src/services/user.rs 2.1 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 490 lines · 43 tokens per session scan A a5347847f398
rust-project is a skill published in the GitHub repository majiayu000/spellbook (272 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 3,015 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
Rust Patterns
Use this skill when writing Rust crates/services and you want reliable patterns for error handling, module structure, ownership boundaries, and maintainable APIs.
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
content-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
python-release
Handle Python SDK release, build, bump, packaging metadata, PyPI client pin, uv.lock, nox/build workflow, and publish verification changes. Use for Python release process work or dependency pin bumps; do not use for ordinary Python feature implementation.
Agent Browser Automation
Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.
pneuma-session
Rewrite the active Pneuma session's UI title + one-line summary so the launcher and ProjectPanel rows reflect what the session is actually about. Use this skill whenever the user asks to "整理 / 概括 / refresh / re-title / summarize this session", whenever the conversation has produced substantive work and the default…