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 skills add pproenca/dot-skills --skill adversarial-rustgit clone --depth 1 https://github.com/pproenca/dot-skillsWrote 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/pproenca/dot-skills/adversarial-rust)<a href="https://agentmods.dev/skills/pproenca/dot-skills/adversarial-rust"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/adversarial-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.1 | $0.00223 | $0.02734 |
| Opus 5 | $0.00112 | $0.01367 |
| Sonnet 5 | $0.00045 | $0.00547 |
| Haiku 4.5 | $0.00022 | $0.00273 |
Grade A, and why
adversarial-rust 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 7d 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 — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adversarial Rust
An adversarial, architecture-level review-and-refactor pass for Rust. Where a greenfield idiom skill answers "which tool should I reach for now?", this skill takes code that already exists and imported the wrong mental model — objects and interfaces from Java/C#, shared-everything graphs from garbage-collected languages, exceptions, C-style loops and sentinels, detached-promise concurrency — names the paradigm it betrays, and prescribes the refactor that collapses it back to idiomatic Rust.
Every rule is grounded in a single production codebase: the codex-rs workspace (github.com/openai/codex, codex-rs/ at commit f1affbac5e, ~125 crates / ~2,500 Rust files). The Correct side of each rule is what that codebase actually does, the enforcement evidence is its workspace lint config (unwrap_used, redundant_clone, needless_collect, await_holding_lock and ~30 more denied), and the carve-outs are the real exceptions it keeps — so "when NOT to apply" is never hypothetical. There is no rule for things a capable model already gets right.
When to Apply
- Reviewing or refactoring existing Rust for architecture, not just style — "make this actually idiomatic", "why does this feel like Java in Rust"
- Flattening ported ceremony — dependency-injection traits with one implementation,
Deref-simulated inheritance, stateless*Manager/*Servicestructs, getter/setter boilerplate, a builder for every struct - Untangling fought ownership —
.clone()sprinkled until it compiles,Rc<RefCell<T>>object graphs, self-referential struct attempts - Fixing anemic data — boolean/string state machines, parallel
Optionfields, raw primitives carrying domain meaning, god-structs ofOptions escaping the serde boundary - Removing exception-style flow —
unwrapon expected failures, sentinel returns,catch_unwindas try/catch,anyhowon library API surfaces - Collapsing habitual indirection —
Box<dyn Trait>for closed sets, boxed callback parameters, index loops and per-stepcollect()chains - Repairing imported concurrency habits — blocking calls inside
async fn, guards held across.await, async task fan-out for CPU-bound work, fire-and-forgettokio::spawn
What ships with it
28 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.
- AGENTS.md 8.7 KB
- assets/templates/_template.md 1.2 KB
- metadata.json 3.0 KB
- references/_sections.md 5.8 KB
- references/arch-default-literal-over-builder.md 1.8 KB
- references/arch-drop-di-trait-single-impl.md 2.7 KB
- references/arch-free-functions-over-manager-struct.md 2.2 KB
- references/arch-no-deref-inheritance.md 2.4 KB
- references/arch-public-fields-over-getter-ceremony.md 2.2 KB
- references/conc-blocking-pool-over-async-cpu-fanout.md 2.8 KB
- references/conc-narrow-locks-before-await.md 2.8 KB
- references/conc-own-spawned-task-handles.md 3.2 KB
- references/conc-spawn-blocking-over-blocking-async.md 2.7 KB
- references/dyn-enum-over-box-dyn-closed-set.md 2.9 KB
- references/dyn-generics-over-boxed-callbacks.md 2.7 KB
- references/flow-no-catch-unwind-try-catch.md 2.8 KB
- references/flow-option-over-sentinel-values.md 2.5 KB
- references/flow-result-over-unwrap-expected.md 2.6 KB
- references/flow-thiserror-library-anyhow-application.md 2.8 KB
- references/iter-combinator-over-index-loop.md 2.6 KB
- references/iter-stay-lazy-single-collect.md 2.7 KB
- references/own-id-map-over-self-referential.md 2.3 KB
- references/own-no-rc-refcell-object-graph.md 2.2 KB
- references/own-restructure-over-clone.md 2.7 KB
- references/type-enum-over-bool-string-state.md 2.6 KB
- references/type-newtype-parse-dont-validate.md 2.6 KB
- references/type-result-over-parallel-options.md 2.2 KB
- references/type-split-option-god-struct.md 2.8 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.
- 7d ago First seen · 95 lines · 223 tokens per session scan A 2d5af930f3a3
adversarial-rust is a skill published in the GitHub repository pproenca/dot-skills (203 stars, last pushed 22d ago), licensed MIT. It adds 223 tokens to every session and 2,734 once invoked, about $0.0011 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
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…
rust-review
A Rust code-review skill for services, checking for crashes, unsafe SQL construction, exposed credentials, ignored errors, and unfinished code.
rust-skills
Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions, serde, pattern matching, macros…
architectural_review
Review Rust code for advanced architectural patterns — capability mixins, typed commands, concurrency model choice, smart pointer/interior mutability selection, error-handling architecture, and memory layout. Use when the user asks to review system architecture, suggest broad design improvements, or evaluate trait…
hexagonal_review
Review a Rust codebase for hexagonal architecture compliance — dependency direction, port shape, adapter grouping, error boundaries, feature-flag placement, and testability. Use when the user asks to review architecture, audit layering, check ports-and-adapters discipline, or evaluate whether a Rust project's…
m15-anti-pattern
Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production…