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/rust-lang/crates.io/agents-mdgit clone --depth 1 https://github.com/rust-lang/crates.ioWhat 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.02498 | $0.02498 |
| Opus 5 | $0.01249 | $0.01249 |
| Sonnet 5 | $0.00500 | $0.00500 |
| Haiku 4.5 | $0.00250 | $0.00250 |
Grade A, and why
crates.io AGENTS.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 2d 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 — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.
crates.io
Repository Layout
/src/- Backend Rust application code/src/bin/crates-io/- Combined backend entry point for the server, background worker, monitor, and administrative commands/src/controllers/- API controllers organized by domain (krate/,user/,version/,trustpub/,github/,admin/)/src/worker/jobs/- Background job implementations (crate analysis, README rendering, OG image generation, database dumps)/src/middleware/- Request processing middleware (auth, rate limiting, logging, error handling)/src/tests/- Backend integration tests with snapshot testing usinginsta/src/config/- Configuration loading and validation/src/util/- Shared utilities (errors, authentication, pagination)
/svelte/- Frontend SvelteKit application/svelte/src/routes/- File-based routes and page components/svelte/src/lib/- Shared components, stores, services, and utilities/svelte/static/- Static assets served at/(favicon, robots.txt, etc.)
/crates/- Workspace crates providing specialized functionalitycrates_io_api_types/- API response serialization typescrates_io_database/- Database models and schema (Diesel ORM)crates_io_worker/- Background job queue systemcrates_io_index/- Git index management for crate metadatacrates_io_tarball/- Package tarball processing and validationcrates_io_trustpub/- Trusted Publishing implementationcrates_io_markdown/,crates_io_linecount/- Content processing
/migrations/- Database migrations (260+ historical migrations managed by Diesel)/e2e/- Playwright tests for the frontend with accessibility checks/packages/- MSW (Mock Service Worker) test utilities for API mocking/script/- Development utilities/docs/- Project documentation (CONTRIBUTING.md,ARCHITECTURE.md, PR review guidelines)
General Guidance
- Read
/docs/CONTRIBUTING.mdfor comprehensive setup instructions and contribution guidelines. - Use
cargo insta acceptinstead ofcargo insta reviewwhen updating snapshot tests. - Use
#[expect(...)]instead of#[allow(...)]to silence warnings that should be resolved later. - Match existing code style within each area (backend Rust follows workspace lints, frontend follows ESLint/Prettier config).
- Add documentation comments to new types and functions; existing code may lack comments, but new code should have them.
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.
- 2d ago First seen · 235 lines · 2,498 tokens per session scan A 897ebe573e21
crates.io AGENTS.md is an instructions file published in the GitHub repository rust-lang/crates.io (3,691 stars, last pushed today), licensed Apache-2.0. It adds 2,498 tokens to every session, about $0.0125 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
mega copilot-instructions.md
Instructions for gitmono-dev/mega, covering mega – repository custom instructions for github copilot, what this repo is, languages & defaults, build & run and key components (modules).
maui uitests.instructions.md
Instructions for dotnet/maui, covering ui testing guidelines for .net maui, ui test structure, two-project requirement, base class and infrastructure and naming conventions.
maui performance-hotpaths.instructions.md
Instructions for dotnet/maui, covering performance-critical path rules, hot paths in maui, allocation avoidance, caching and invalidation and collection iteration.
agentgateway copilot-instructions.md
Copilot instructions for agentgateway/agentgateway: Do not check for, speculate about, or report compilation errors during code review. Compilation diagnostics from review are frequently incorrect; rely on CI to detect and report compilation failures.
mq commit.instructions.md
Instructions for harehare/mq: Use the following format for commit messages.
playwright-rust CLAUDE.md
Instructions for padamson/playwright-rust, covering claude.md, project, repository layout, skills (procedural reference) and documentation hierarchy.