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 instructions/zircote/rust-lsp/claude-mdgit clone --depth 1 https://github.com/zircote/rust-lspWrote 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/instructions/zircote/rust-lsp/claude-md)<a href="https://agentmods.dev/instructions/zircote/rust-lsp/claude-md"><img src="https://agentmods.dev/badge/instructions/zircote/rust-lsp/claude-md.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 | $0.00552 | $0.00552 |
| Opus 5 | $0.00276 | $0.00276 |
| Sonnet 5 | $0.00110 | $0.00110 |
| Haiku 4.5 | $0.00055 | $0.00055 |
Grade A, and why
rust-lsp CLAUDE.md 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.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
A Claude Code plugin providing Rust development support through rust-analyzer LSP integration and 18 automated hooks for code quality, security, and dependency analysis.
Setup
Run /setup to install all required tools, or manually:
rustup component add rust-analyzer
rustup toolchain install nightly
cargo install cargo-audit cargo-deny cargo-outdated cargo-machete \
cargo-semver-checks cargo-geiger cargo-expand cargo-bloat \
cargo-mutants
cargo +nightly install cargo-udeps
Key Files
| File | Purpose |
|---|---|
.lsp.json |
rust-analyzer LSP configuration |
hooks/hooks.json |
18 automated development hooks |
commands/setup.md |
/setup command definition |
.claude-plugin/plugin.json |
Plugin metadata |
Hook System
Hooks trigger on PostToolUse for Write/Edit operations. Designed to be fast and non-blocking.
What hooks execute (instant):
.rsfiles:rustfmt(single file), grep for unsafe/TODO/FIXME.mdfiles:markdownlint(if available)Cargo.toml/Cargo.lock: hints only (no cargo execution)
On-demand commands (shown as hints, run manually):
cargo check && cargo clippy && cargo testcargo audit && cargo outdated --depth 1cargo machete(find unused deps)
When Modifying Hooks
Edit hooks/hooks.json. Each hook follows this pattern:
{
"name": "hook-name",
"event": "afterWrite",
"hooks": [{ "type": "command", "command": "..." }],
"matcher": "**/*.rs"
}
- Use
|| trueto prevent hook failures from blocking writes - Use
head -Nto limit output verbosity - Use
command -v tool >/dev/null &&for optional tool dependencies
When Modifying LSP Config
Edit .lsp.json. The extensionToLanguage map controls which files use the LSP. Current config maps .rs files to the rust language server.
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.
- 3d ago First seen · 71 lines · 552 tokens per session scan A d84cdb3d6de5
rust-lsp CLAUDE.md is an instructions file published in the GitHub repository zircote/rust-lsp (12 stars, last pushed 24d ago), licensed MIT. It adds 552 tokens to every session, about $0.0028 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 instructions, from other repositories
rust-doctor CLAUDE.md
Instructions for arthjean/rust-doctor, a project described as: Your agent writes bad Rust. This catches it.
VTCode copilot-instructions.md
Instructions for vinhnx/VTCode, covering vt code agent guidelines, build & test commands, preferred (faster with cargo-nextest), standard cargo commands and fallback (if nextest unavailable).
cargo-txt AGENTS.md
Instructions for pyk/cargo-txt, covering tools, cargo-txt, build the serde crate documentation, list all items in serde and view serde crate overview.
rust-skills AGENTS.md
Instructions for leonardomso/rust-skills, a project described as: A collection of 265 rules across 26 categories that AI coding agents can use to write idiomatic, fast, and safe Rust.
rust-skills CLAUDE.md
Instructions for leonardomso/rust-skills, a project described as: A collection of 265 rules across 26 categories that AI coding agents can use to write idiomatic, fast, and safe Rust.
turso AGENTS.md
Instructions for tursodatabase/turso, covering turso agent guidelines, quick reference, testing, running tests and test organization.