rust-intel

rust-intel is a skill for Claude Code from PHPCraftdream/rust-intel. It costs 123 tokens per session (38,661 once invoked), scanned C, original, Apache-2.0.

A set of strict guidelines for writing Rust code that compiles and passes tests but may still fail in production. Rust is a programming language, and the guidance covers issues such as unsafe code, concurrency, asynchronous work, and compatibility between library versions.

In plain words
What is it for?
Use it before writing or reviewing Rust in an existing project, especially when checking production behavior, unsafe code, concurrency, or public library changes.
Why use it?
A successful build and test run does not catch every performance, safety, data-corruption, or library-compatibility problem. These rules focus on those less visible failures.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions subagents; positional $N argument.

Part of the rust-intel plugin — 2 skills shipped together

Good fit Use it before writing or reviewing Rust in an existing project, especially when checking production behavior, unsafe code, concurrency, or public library changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/phpcraftdream/rust-intel/skill
Install

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.

Any agent
npx skills add PHPCraftdream/rust-intel --skill skill
Clone the repo
git clone --depth 1 https://github.com/PHPCraftdream/rust-intel

Made for: Claude Code.

Or install rust-intel, the plugin that ships this one along with the rest of its 2 skills.

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-intel

README.md
[![agentmods](https://agentmods.dev/badge/skills/phpcraftdream/rust-intel/skill/github.svg)](https://agentmods.dev/skills/phpcraftdream/rust-intel/skill)
Your own site
<a href="https://agentmods.dev/skills/phpcraftdream/rust-intel/skill"><img src="https://agentmods.dev/badge/skills/phpcraftdream/rust-intel/skill/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-intel

Your own site · 80×15
<a href="https://agentmods.dev/skills/phpcraftdream/rust-intel/skill"><img src="https://agentmods.dev/badge/skills/phpcraftdream/rust-intel/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 38,661 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00123 $0.38661
Opus 5.5 $0.00049 $0.15464
Sonnet 5.5 $0.00025 $0.07732
Haiku 4.5 $0.00012 $0.03866

Measured 22d ago against content hash ef46e78ca2f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

rust-intel scanned grade C with 2 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 22d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (audit-project.workflow.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

| "fetch this URL", "webhook", "callback URL", "link preview", "image proxy", "download from a user-supplied link", "validate this URL" | §C2 SSRF (outbound request to an attacker-influenced destination) | the private/lo

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| "download in build.rs", "fetch protoc/schema at build time", "fetch the model/binary during build", "curl in the build script" | §A1 network in `build.rs` | unpinned bytes entering the build outside the lockfile — no `
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skill/SKILL.md · 587 lines

How it starts

The opening of the file, as written. The whole thing — 587 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rust Intel — Defense Against LLM Failure Modes

Scope, stated up front. This spec assumes your code already compiles. It assumes cargo test is green. That is not enough. The categories below cover the failure modes that survive rustc, clippy, and the test suite, and only manifest as production incidents, semver breakage, performance collapse under load, or silent data corruption. Compilation-only failures (lifetime variance in safe code, trait bound mismatch, GAT lifetime bound errors, object-safety violations through generic methods, cyclic workspace deps, ? in main, HRTB depth, recursive macro limits, self-referential structs in safe Rust, no_std reflexive std::* imports, From/Into cycles) are deliberately omitted — rustc already catches them and the LLM cannot ship them. (Exception: variance soundness in unsafe raw-pointer wrappers is not caught by the compiler — that is §B18a, and it is in-scope. Second exception, and two distinct breakages, not one: adding any required (non-defaulted) method to a published library's public trait fails every downstream impl, and adding a method that is not dyn-dispatchable — generic over types, lacking a self receiver, mentioning Self outside the receiver, or an opaque return (async fn, -> impl Trait) — additionally strips the trait's dyn-compatibility unless it carries where Self: Sized (verified against rustc: none of these five shapes need to be generic to trigger E0038 on &dyn Trait); an associated const strips dyn-compatibility unconditionally, with no where Self: Sized opt-out (a where clause on a const item is not valid on stable Rust). Either break shows up only at the consumer's build — rustc cannot flag it in the author's own crate — so both stay in-scope under Operating mode item 3 and §C1, mechanically backstopped by cargo-semver-checks in Post-flight.) This spec covers what ships anyway.

The fifty-nine categories (held in this skill's theme modules — see the category→module map below) rest on an empirical base — a published 6-month field report on ~80k LOC of production LLM-generated Rust, academic benchmarks (RustEvo², SafeTrans, CRUST-Bench, SafeGenBench, Rust-SWE-Bench, AkiraRust), the error distribution observed across Claude/GPT/Cursor through 2025–2026, and real supply-chain incidents (CrateDepression 2022, faster_log/async_println 2025). (The count is of numbered categories; §B1, §B3, §B4, §B15, §B18, §B25, §C1, §C12, and §D1 split into lettered sub-sections — §B1a/b, §B3a, §B4a, §B15a–e, §B18a, §B25a, §C1a, §C12a, §D1a — that are referenced and triggered individually but counted under their parent.) Citations, URLs, sample sizes, and every percentage live in references/sources.md; load it alongside this file when a figure is load-bearing. The category→module map below is the index; the category bodies live in the theme modules, not in this file.

Industry signal: per Faros AI and Lightrun studies (2026), shifting from low to high AI adoption more than doubles the incidents-to-PR ratio, and 43% of AI-generated code changes need debugging in production; among surveyed engineering leaders, zero rated themselves "very confident" that AI-generated code behaves correctly once deployed. (These figures concern AI-generated code in general, not Rust specifically — see references/sources.md.) This is the empirical context this document defends against.

The categories split into six tiers and a meta-layer, listed below:

  • Self-monitoring: a triggers table (phrase- and code-pattern-based) that maps user-request patterns to risk categories. Scanned before generating code.
  • Tier A — Compile-fix reflexes that leave silent residue (§A1, §A2, §A3): not "the compiler caught it and you fixed it correctly", but "the compiler caught it and the cheapest fix compiles while leaving a real defect behind". Stale-but-valid APIs, supply-chain via slopsquatting, reflexive Arc<Mutex<T>>, pub as a hammer for E0603 that silently expands the public API.
  • Tier B — Silent correctness bugs (§B1–§B29): pass compilation, often pass tests, fail in production. This is where the spec lives. Includes UB, async pitfalls (basic and advanced), lock ordering, memory leaks, silent task dropping, cryptographic insecurity, TOCTOU races, backpressure neglect, Mutex poisoning, equality/hash contracts, runtime borrow panics, manual Send/Sync, iterator invalidation through indirection, serde field-presence drift, JoinHandle semantics, the async-Drop impossibility, select! side-effect cancellation, timing-attack-prone equality on secrets, panic / ownership across extern "C" FFI, lossy numeric conversions, wall-clock vs monotonic time, and UTF-8 string-boundary hazards.
  • Tier C — Architecture and ergonomics (§C1–§C12, and §C12a): design-level mistakes that are expensive to undo. Reflexive .clone(), procedural macro hygiene, Cargo feature flag hygiene, channel-and-runtime mismatch, tracing span leakage, workspace feature unification, Deref polymorphism, reinventing a solved problem (or a whole subsystem) that a world-recognized crate already handles correctly on the input the hand-rolled version misses.
  • Tier D — Testing and CI gaps (§D1–§D5): code passes tests not because it's correct but because the tests are blind. Timing-based async tests, #[should_panic] without expected, unit-vs-integration placement drift, test/prod divergence of build profile, scale, and concurrency, grep-filtered runner output hiding hangs, Windows zombie-process link wedges.
  • Tier E — Systemic cost (§E1–§E6): correct in the small, wrong at scale — performance, allocation, complexity, and contention costs that survive rustc/clippy/tests and only bite under load. A different axis from A–D (cost, not correctness); enforced 🟡/🟢, never 🔴.
  • Tier F — Semantic conformance (§F1–§F4): defects of meaning, not mechanism. The code is self-consistent, compiles, passes its own tests and clippy — and implements the wrong thing: it diverges from the named spec or reference implementation, contradicts the project's own documented guarantees, mishandles the boundary/error-path lifecycle of a connection or resource, or ships an encode/decode pair with no round-trip obligation. No grep finds these; they are found by reading the claim (RFC, README, function name, doc comment) and checking the code against it counterfactually. Reviewer stance for this tier is different — see "Tier F — how to review for meaning" below.

Read the full file on GitHub · 587 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. 22d ago Changed ef46e78ca2f7
  2. 23d ago Changed · +28 lines f70fd15fb527
  3. 1mo ago Changed · +3 lines 439219cbc37b
  4. 1mo ago Changed 90f6fda0328f
  5. 1mo ago Changed 80f8774c1a45
  6. 1mo ago Changed · +48 lines scan A → C 0af018588acf
  7. 1mo ago First seen · 508 lines · 123 tokens per session scan A 530b97b62197

Subscribe to this mod's changes

rust-intel is a skill published in the GitHub repository PHPCraftdream/rust-intel (2 stars, last pushed 23d ago), licensed Apache-2.0. It adds 123 tokens to every session and 38,661 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 2 findings (cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

roundtrip-radar

Per-journey code audit tracing data through complete user flows for bugs, data safety, performance, and round-trip completeness. Discovers workflows, audits each end-to-end, rolls up cross-cutting issues, and supports natural-language flow tracing. Triggers: "roundtrip audit", "trace user journey", "/roundtrip-radar".

Terryc21/radar-suite · 73 tokens

time-bomb-radar

Finds deferred operations that crash on aged data -- code that passes every test but breaks weeks or months after release. Covers cascade deletes, cache expiry, trial paths, background accumulation, date-threshold transitions, and scheduled side effects. Triggers: "time bomb", "time-bomb", "/time-bomb-radar", "aged…

Terryc21/radar-suite · 80 tokens

cypress-debugger

Use when a Cypress end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Cypress spec, Timed-out-retrying command, unresolved selector, cy.intercept alias or request race, suite-breaking hook, retry-only flake, hydration or timing race, or a…

voidmatcha/e2e-skills · 158 tokens

playwright-debugger

Use when a Playwright end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Playwright spec, TimeoutError, broken or ambiguous selector, post-deploy suite failure, retry-only flake, hydration or timing race, or a passes-locally-but-fails-in-CI split.…

voidmatcha/e2e-skills · 163 tokens

radar-suite-axis-classification

Shared axis classification framework for all radar-suite skills. Every finding must be classified as axis1 (bug), axis2 (scatter), or axis3 (dead/smelly) before emission, with mandatory coaching fields and file:line citations to existing patterns in the audited codebase. Triggers: invoked by every radar before…

Terryc21/radar-suite · 77 tokens

ia-verification-before-completion

Enforces fresh verification evidence before any completion claim. Use when about to claim "tests pass", "bug fixed", "done", "ready to merge", handing off work, or before editing when a request has ambiguous scope.

iliaal/whetstone · 52 tokens