uv: Instructions file for Codex

AGENTS.md

uv AGENTS.md is an instructions file for Codex, OpenCode from astral-sh/uv. It costs 823 tokens per session, scanned A, original, Apache-2.0.

Project-specific coding instructions for uv, a fast Python package and project manager written in Rust.

In plain words
What is it for?
Guiding code changes, choosing between integration and unit tests, running focused checks, handling Rust linting, and updating the lockfile carefully.
Why use it?
They help keep changes consistent with the project's contribution rules and testing practices, while avoiding unsafe shortcuts and unnecessary dependency or build changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is astral-sh/uv's own configuration. It tells Codex and OpenCode how to work on uv itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything uv configures →

About the project

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.

astral-sh/uv · 91,321 stars · on GitHub · docs.astral.sh

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/astral-sh/uv/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/astral-sh/uv

Made for: Codex, OpenCode.

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 uv AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/astral-sh/uv/agents-md/github.svg)](https://agentmods.dev/instructions/astral-sh/uv/agents-md)
Your own site
<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.

agentmods 80×15 button for uv AGENTS.md

Your own site · 80×15
<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>
Per session 823 This file is loaded in full into every session.
When invoked 823 The same file — it is already loaded in full.
Security scan A 0 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.00823 $0.00823
Opus 5.5 $0.00329 $0.00329
Sonnet 5.5 $0.00165 $0.00165
Haiku 4.5 $0.00082 $0.00082

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

Security

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.

AGENTS.md · 50 lines

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-test helpers 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 insta snapshots 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 clippy to 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 let to handle fallibility
  • PREFER exhaustive match expressions without wildcard (_) arms over matches!, so new enum variants require explicit handling
  • PREFER uv_macros::DeserializeUntagged for 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 SAFETY comments following our usual style when writing unsafe code
  • PREFER #[expect()] over [allow()] if clippy must be disabled
  • PREFER let chains (if let combined with &&) over nested if let statements
  • NEVER update all dependencies in the lockfile and ALWAYS use cargo update --precise to make lockfile changes
  • NEVER assume clippy warnings or test failures are pre-existing, it is very rare that main has warnings
  • ALWAYS use .github/automations-dispatch.json to trigger privileged workflows from GitHub webhook events instead of adding pull_request_target workflows
  • NEVER suppress the dangerous-triggers security 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 version instead of ver, and requires_python instead of rp
  • 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
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. 5d ago Changed · +3 lines · +64 tokens per session 25ee17fdaac7
  2. 20d ago Changed · +13 lines · +213 tokens per session 924a95138283
  3. 1mo ago Changed · +1 lines · +24 tokens per session 895e488bfdb6
  4. 1mo ago Changed · +5 lines · +77 tokens per session 2bad1eee3c84
  5. 1mo ago Changed · +2 lines · +29 tokens per session e62d09731b95
  6. 1mo ago First seen · 26 lines · 416 tokens per session scan A bb1f28e687cf

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,731 tokens

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.

deepseek-ai/deepseek-harness · 4,261 tokens