Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/xobotyi/cc-foundry/rustnpx skills add xobotyi/cc-foundry --skill rustgit clone --depth 1 https://github.com/xobotyi/cc-foundryWrote 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/xobotyi/cc-foundry/rust)<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/rust"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/rust.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 | $0.00072 | $0.03888 |
| Opus 5 | $0.00036 | $0.01944 |
| Sonnet 5 | $0.00014 | $0.00778 |
| Haiku 4.5 | $0.00007 | $0.00389 |
Grade B, and why
rust scanned grade B with 1 finding 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 yesterday.
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.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
- Cite the specific violation (file:line and the rule), then show the corrected code inline. Do not lecture in the How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust
Lean on the type system and the borrow checker. They are the design surface, not an obstacle. When the compiler rejects
code, the ownership model is wrong — restructure who owns and who borrows rather than reaching for .clone(), Rc, or
unsafe to silence it. Make illegal states unrepresentable: encode invariants in types so the wrong code fails to
compile instead of failing at runtime. A fight with the borrow checker is a design review the compiler is giving you for
free.
Route to Reference
Read the reference before doing focused work in its area; SKILL.md alone is sufficient for routine code.
- Idioms and ownership patterns —
${CLAUDE_SKILL_DIR}/references/idioms.mdborrowing/ownership restructuring,impl Traitvs generics vsdyn, iterator adapters,match/if let/let else, newtype and builder patterns,From/Into/TryFrom, theas_/to_/into_cost cheat-table - Error handling —
${CLAUDE_SKILL_DIR}/references/errors.mdResult/Option/?,thiserrorenum templates,anyhow.context(), the panic/unwrap/expectpolicy, error-type design (Display/Error/Send/Sync) - Anti-patterns —
${CLAUDE_SKILL_DIR}/references/anti-patterns.mdAI-produced anti-patterns mapped to the Clippy lints that catch them, with the idiomatic fix for each - API design —
${CLAUDE_SKILL_DIR}/references/api-guidelines.mdthe Rust API GuidelinesC-*checklist, RFC 430 naming,#[non_exhaustive],#[must_use], common-trait derives, sealed traits, builders - Parallelism —
${CLAUDE_SKILL_DIR}/references/parallelism.mdthreads, scoped threads, rayon,Send/Sync, channels, shared state (Arc/Mutex) — the CPU-bound multicore path - Async —
${CLAUDE_SKILL_DIR}/references/async.mdtheFuture/executor model, Tokio, the compiler-invisible footgun checklist (blocking in async, holding!Sendacross.await), "do you even need async?" - Project structure —
${CLAUDE_SKILL_DIR}/references/structure.mdmod.rs-free layout, cargo workspaces, the[lints]/[workspace.lints]table, profiles, features, MSRV - Toolchain —
${CLAUDE_SKILL_DIR}/references/toolchain.mdthe fmt/clippy/nextest/deny verification gates, rust-analyzer configuration, recommended compiler and Clippy lint sets - Edition 2024 —
${CLAUDE_SKILL_DIR}/references/edition-2024.mdRust 2024 edition specifics and migration viacargo fix --edition - Documentation —
${CLAUDE_SKILL_DIR}/references/documentation.mdrustdoc conventions, doctests,missing_docs, intra-doc links, semver-checks
What ships with it
11 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.
- .dev/reference-inventory.json 3.4 KB
- references/anti-patterns.md 27 KB
- references/api-guidelines.md 28 KB
- references/async.md 17 KB
- references/documentation.md 24 KB
- references/edition-2024.md 17 KB
- references/errors.md 19 KB
- references/idioms.md 21 KB
- references/parallelism.md 20 KB
- references/structure.md 18 KB
- references/toolchain.md 15 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.
- yesterday First seen · 226 lines · 72 tokens per session scan B d1efcbdf4f3c
rust is a skill published in the GitHub repository xobotyi/cc-foundry (20 stars, last pushed 2d ago), licensed MIT. It adds 72 tokens to every session and 3,888 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
lint-js
Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
rust-code-quality
Run a focused Rust quality review when the user requests one, when reviewing a Rust PR/commit, or when another selected review workflow delegates Rust-specific checks. Do not auto-load for every implementation edit.
switchyard-rust-review
Review Switchyard Rust changes for correctness and maintainability. Use for pull requests or diffs touching crates, PyO3 bindings, async runtime behavior, streaming, protocol types, translation, algorithms, or LLM clients.
rust-pro
Master modern Rust (2024 edition) with async patterns, advanced type system features, and production-ready systems programming. Expert in the current Rust ecosystem including Tokio, axum, and modern crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.