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/cq27-dev/rag-rat/rust-modern-stylenpx skills add cq27-dev/rag-rat --skill rust-modern-stylegit clone --depth 1 https://github.com/cq27-dev/rag-ratWrote 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/cq27-dev/rag-rat/rust-modern-style)<a href="https://agentmods.dev/skills/cq27-dev/rag-rat/rust-modern-style"><img src="https://agentmods.dev/badge/skills/cq27-dev/rag-rat/rust-modern-style.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.00037 | $0.01772 |
| Opus 5 | $0.00018 | $0.00886 |
| Sonnet 5 | $0.00007 | $0.00354 |
| Haiku 4.5 | $0.00004 | $0.00177 |
Grade A, and why
rust-modern-style 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 6d 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 — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Modern Style
Use this skill when writing or reviewing Rust in the rag-rat repository. It complements async-specific guidance; this skill owns the workspace's general Rust, module, persistence, and API conventions.
Baseline
- Target the Rust 2024 edition and the current workspace
rust-version; do not add compatibility shims for older compilers that the workspace does not support. - Prefer current stable idioms when they make control flow clearer:
let-else, inline format args,matches!,is_some_and, andis_none_or. - Modern does not mean clever. Prefer explicit
match,if let, and early returns over iterator or combinator chains that hide domain states or side effects. - Prefer
std::sync::OnceLockorLazyLockover newlazy_static!usage. - Use
&strand slices at borrowed boundaries instead of&Stringand&Vec<T>.
Imports
Types, traits, enums, and structs may be imported directly. In a mixed or large import group, bring
the module in with {self, ..} and qualify free functions, constants, and macros at the call site.
This preserves origin information where the code is read.
// Avoid: callables and constants lose their module identity.
use crate::index::graph_index::{
KeyVersionStamp, LOGICAL_KEY_VERSION, rebuild_logical_symbols,
};
// Prefer: types are direct; operations and constants retain their origin.
use crate::index::graph_index::{self, KeyVersionStamp};
graph_index::rebuild_logical_symbols(...);
let version = graph_index::LOGICAL_KEY_VERSION;
A small, single-purpose import of one function is fine. Apply this rule when an import list mixes
roles or makes bare call sites ambiguous, not mechanically to every use.
Modules And Visibility
- Treat
mod.rsas a curated index: module declarations and intentionalpub/pub(crate)re-exports. Put implementation in cohesive sibling files. - Split by domain job, not arbitrary line count. Keep helpers private and adjacent to the flow they support.
- Sibling modules should import through
super::, not back through their parent's public re-export. - Start private and widen only for a real production caller: private, then
pub(super), thenpub(crate), andpubonly for a genuine public boundary. - Never widen production visibility solely for a test; colocate the test or use a test-only seam.
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.
- 6d ago First seen · 163 lines · 37 tokens per session scan A 89906fe55b65
rust-modern-style is a skill published in the GitHub repository cq27-dev/rag-rat (19 stars, last pushed 7d ago), licensed MIT. It adds 37 tokens to every session and 1,772 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-08-30.
Other skills, from other repositories
os-rust-backend
Use when working on a Rust backend that follows the Open Software Network house style — the seven-crate Cargo workspace split (domain / services / persistence / providers / config / api / app) shared by os-accounts and os-platform (fellow). Trigger on: scaffolding a new service in this org ("like os-accounts"…
rust-code-style
Write idiomatic, well-structured Rust for Wassette — single-responsibility design, anyhow error handling, Arc/Mutex for shared state, and the required formatting and linting with cargo +nightly fmt, cargo clippy, and cargo machete. Use when adding or refactoring Rust code in this repository.
update-keyboard-shortcuts
Audits and synchronizes keyboard shortcuts across docs/keyboardshortcuts.md, crates/regenerator2000-tui/src/ui/dialogkeyboardshortcut.rs, crates/regenerator2000-tui/src/ui/menu.rs, and the view files (viewdisassembly.rs, viewhexdump.rs, viewcharset.rs, viewbitmap.rs, viewblocks.rs, viewsprites.rs).
windows-compat
Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that…
architecture-audit
Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…
coding
Skill "coding" from ricardoquesada/regenerator2000, covering 6502 disassembler expert skills, core context, technical requirements, 1. 6502 logic and 2. rust performance & safety.