rag-rat: Skill for Claude Code

.agents/skills/rust-modern-style/SKILL.md

rust-modern-style is a skill for Claude Code, Codex from cq27-dev/rag-rat. It costs 37 tokens per session (1,772 once invoked), scanned A, original, MIT.

Rust coding and review guidance for the rag-rat repository. It defines current Rust style, module and import conventions, persistence contracts, and narrow API design.

In plain words
What is it for?
Use it when writing or reviewing Rust modules, functions, constants, persistence code, imports, and public APIs in rag-rat.
Why use it?
It keeps Rust changes consistent with the project’s supported language edition and makes code ownership, side effects, and interfaces easier to understand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is cq27-dev/rag-rat's own configuration. It tells Claude Code and Codex how to work on rag-rat itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rag-rat configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cq27-dev/rag-rat. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cq27-dev/rag-rat/main/.agents/skills/rust-modern-style/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cq27-dev/rag-rat

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for rust-modern-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/cq27-dev/rag-rat/rust-modern-style/github.svg)](https://agentmods.dev/skills/cq27-dev/rag-rat/rust-modern-style)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rust-modern-style

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,772 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01772
Opus 5.5 $0.00015 $0.00709
Sonnet 5.5 $0.00007 $0.00354
Haiku 4.5 $0.00004 $0.00177

Measured 2mo ago against content hash 89906fe55b65, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

.agents/skills/rust-modern-style/SKILL.md · 163 lines

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, and is_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::OnceLock or LazyLock over new lazy_static! usage.
  • Use &str and slices at borrowed boundaries instead of &String and &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.rs as a curated index: module declarations and intentional pub/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), then pub(crate), and pub only for a genuine public boundary.
  • Never widen production visibility solely for a test; colocate the test or use a test-only seam.

Read the full file on GitHub · 163 lines

Changes

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.

  1. 2mo ago First seen · 163 lines · 37 tokens per session scan A 89906fe55b65

Subscribe to this mod's changes

rust-modern-style is a skill published in the GitHub repository cq27-dev/rag-rat (26 stars, last pushed 28d ago), licensed MIT. It adds 37 tokens to every session and 1,772 once invoked, about $0.0001 per session on Opus 5.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.

Related

rust-modern-style compared with skills from other repositories

rust-modern-style next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-modern-stylecq27-dev/rag-ratSkill2628d agoMITA37Claude Code, Codex
architecture-auditorg2AI/ORG2Skill2.6k3d agoAGPL-3.0A70Claude Code, Codex
windows-compatsdsrss/code-graph-mcpSkill91yesterdayMITA165Claude Code, Codex
presentationsbrightwave-inc/tidebreakSkill323d agoApache-2.0A44Claude Code, Codex
python-design-patternAI-Riksarkivet/ra-mcpSkill272d agoApache-2.0A51Claude Code
word-documentsbrightwave-inc/tidebreakSkill323d agoApache-2.0A35Claude Code, Codex
frama-c-proofreadersysprog21/frama-c-mcpSkill362d agoMITA82Codex