uv is a Rust-written tool for managing Python packages, projects, environments, versions, scripts, and command-line tools. Python developers use it as a single workflow for dependency management and project tasks, including projects organized into Cargo-style workspaces; the catalogue entries assist with its use or development.
Borrowing it
Nothing to install: this file belongs to astral-sh/uv. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/astral-sh/uv/main/AGENTS.mdgit clone --depth 1 https://github.com/astral-sh/uvWrote 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/astral-sh/uv/agents-md)<a href="https://agentmods.dev/instructions/astral-sh/uv/agents-md"><img src="https://agentmods.dev/badge/instructions/astral-sh/uv/agents-md/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.
<a href="https://agentmods.dev/instructions/astral-sh/uv/agents-md"><img src="https://agentmods.dev/badge/instructions/astral-sh/uv/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.00823 | $0.00823 |
| Opus 5.5 | $0.00329 | $0.00329 |
| Sonnet 5.5 | $0.00165 | $0.00165 |
| Haiku 4.5 | $0.00082 | $0.00082 |
Grade A, and why
uv 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 5d 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.
What it actually says
- Read CONTRIBUTING.md for guidelines on how to run tools
- ALWAYS ensure that new tests use the same style as existing tests for all parts of the test
- ALWAYS check whether the behavior of a new test is already covered by an existing test
- DO NOT run integration test scenarios in loops or share their snapshots with
insta::allow_duplicates!. Write explicit command invocations and snapshots; use separate named tests for independent scenarios - DO NOT repeat integration tests for every quiet level, flag alias, boolean spelling, or unrelated option combination. Include a variant only when it exercises behavior specific to the change; shared parsing and rendering belong in tests for their owning layer
- PREFER explicit fixture setup and command arguments over local helpers that hide the inputs just
to reduce repetition. Reuse existing
uv-testhelpers for common setup, file reads, filters, and cleanup - PREFER integration tests, e.g., at
it/...over unit tests - PREFER putting integration tests in the relevant existing test module. Keep fixtures focused on the behavior under test. Explain a non-obvious regression scenario in a test doc comment
- PREFER running specific tests over running the entire test suite
- PREFER
instasnapshots following patterns in nearby tests over substring assertions - PREFER
uv_snapshot!for command output over manual output parsing, sorting, or reconstructed snapshots. Use existing context filters for nondeterminism without hiding the behavior under test - When making changes for Windows from Unix, use
cargo xwin clippyto check compilation - NEVER perform builds with the release profile, unless asked or reproducing performance issues
- AVOID using
panic!,unreachable!,.unwrap(), unsafe code, and clippy rule ignores - PREFER patterns like
if letto handle fallibility - PREFER exhaustive
matchexpressions without wildcard (_) arms overmatches!, so new enum variants require explicit handling - PREFER
uv_macros::DeserializeUntaggedfor untagged enums when each variant accepts a distinct Serde input shape (string, boolean, sequence, or map). Serde's#[serde(untagged)]buffers the input to try variants in declaration order - ALWAYS write
SAFETYcomments following our usual style when writingunsafecode - PREFER
#[expect()]over[allow()]if clippy must be disabled - PREFER let chains (
if letcombined with&&) over nestedif letstatements - NEVER update all dependencies in the lockfile and ALWAYS use
cargo update --preciseto make lockfile changes - NEVER assume clippy warnings or test failures are pre-existing, it is very rare that
mainhas warnings - ALWAYS use
.github/automations-dispatch.jsonto trigger privileged workflows from GitHub webhook events instead of addingpull_request_targetworkflows - NEVER suppress the
dangerous-triggerssecurity lint; extend the automation dispatcher in a separate pull request if it does not support the required event - PREFER top-level imports over local imports or fully qualified names
- AVOID shortening variable names, e.g., use
versioninstead ofver, andrequires_pythoninstead ofrp - PREFER [
TypeName] references when writing Rust doc comments - DO NOT leak our conversation, prompt, or iteration history into code comments, pull request descriptions, or other maintainer-facing prose. Write for readers who have not seen our conversation.
- PREFER comments that explain the current behavior and rationale. Avoid past-facing wording like "preserve the existing behavior"; explain the actual backwards-compatibility constraint instead.
- ALWAYS check if a new or modified test needs a
#[cfg(feature = "test-...")]gate
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.
- 5d ago Changed · +3 lines · +64 tokens per session 25ee17fdaac7
- 20d ago Changed · +13 lines · +213 tokens per session 924a95138283
- 1mo ago Changed · +1 lines · +24 tokens per session 895e488bfdb6
- 1mo ago Changed · +5 lines · +77 tokens per session 2bad1eee3c84
- 1mo ago Changed · +2 lines · +29 tokens per session e62d09731b95
- 1mo ago First seen · 26 lines · 416 tokens per session scan A bb1f28e687cf
uv AGENTS.md is an instructions file published in the GitHub repository astral-sh/uv (91,321 stars, last pushed today), licensed Apache-2.0. It adds 823 tokens to every session, about $0.0033 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.