rust-teach

rust-teach is a command for coding agents from mathisk2095/jko-claude-plugins. It costs 39 tokens per session (827 once invoked), scanned A, original, MIT.

A one-time Rust project review that records the project's conventions in CLAUDE.md, a file used to give future coding-agent sessions persistent instructions. It examines the project structure, dependencies, errors, logging, async code, tests, unsafe code, builds, and CI.

In plain words
What is it for?
Use it at the start of work on a Rust project to document its coding conventions, tools, testing approach, and remaining uncertainties.
Why use it?
It prevents future sessions from having to rediscover the project's established Rust patterns and checks.

Command

Part of the rust plugin — 1 skill, 5 commands shipped together

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.

agentmods
npx agentmods add commands/mathisk2095/jko-claude-plugins/rust-teach
Clone the repo
git clone --depth 1 https://github.com/mathisk2095/jko-claude-plugins

Or install rust, the plugin that ships this one along with the rest of its 1 skill, 5 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/rust-teach.svg)](https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/rust-teach)
Your own site
<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/rust-teach"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/rust-teach.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00039 $0.00827
Opus 5 $0.00019 $0.00413
Sonnet 5 $0.00008 $0.00165
Haiku 4.5 $0.00004 $0.00083

Measured 3d ago against content hash 39d72ce3b37a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-teach 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 3d 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.

plugins/rust/commands/rust-teach.md · 90 lines

How it starts

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

Rust Teach

Scan this Rust project, understand its patterns, and persist the findings so all future sessions start with the right context.

Step 1: Explore the Codebase

Before asking questions, thoroughly scan the project:

  • Cargo.toml: Edition, rust-version, dependencies, features, lint config, workspace structure
  • src/lib.rs or src/main.rs: Module structure, re-exports, visibility patterns
  • Error types: rg --type rust 'enum.*Error|struct.*Error' src/ -l — what error handling strategy is used?
  • Error crate: Is it thiserror, anyhow, snafu, or hand-rolled?
  • Logging: tracing, log, or println?
  • Async runtime: tokio, async-std, smol, or sync-only?
  • Testing: What test frameworks? proptest, rstest, mockall, insta?
  • Clippy config: Check Cargo.toml [lints.clippy] and any clippy.toml
  • Unsafe usage: rg --type rust 'unsafe' src/ -c — how much, where, documented?
  • Build profiles: LTO, overflow-checks, codegen-units settings
  • CI config: .github/workflows/, justfile, Makefile — what checks run?
  • Existing CLAUDE.md: Any Rust conventions already documented?

Note what you've learned and what remains unclear.

Step 2: Ask Clarifying Questions

Ask the user only what you couldn't infer from the codebase:

Project Context

  • Is this a library, application, or both?
  • What's the target audience? (internal team, open-source consumers, embedded, web services)
  • Any performance constraints? (latency SLAs, memory limits, throughput targets)

Conventions

  • Any strong opinions on iterator chains vs for loops?
  • Preferred error handling approach if not clear from code?
  • Any crates that should always/never be used?
  • Minimum supported Rust version (MSRV) if different from Cargo.toml?

Safety & Quality

  • How strict should unsafe review be? (zero tolerance, case-by-case, embedded-pragmatic)
  • What clippy lint level does the team prefer?
  • Any domain-specific rules? (e.g., "all network calls must be retried", "all DB queries go through the repository layer")

Read the full file on GitHub · 90 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. 3d ago First seen · 90 lines · 39 tokens per session scan A 39d72ce3b37a

Subscribe to this mod's changes

rust-teach is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 5d ago), licensed MIT. It adds 39 tokens to every session and 827 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-31.