← AGENTS.md Generator

AGENTS.md for Rust

A ready-to-use instructions file for Claude Code, Cursor, Codex and other coding agents in Rust repos. Save as AGENTS.md (or CLAUDE.md) at the repo root.

# Project agent instructions (Rust)

## Commands
- Test: `cargo test`
- Lint/typecheck: `cargo clippy -- -D warnings && cargo fmt --check`
- Run both before saying a task is done; paste the output.

## Stack rules
- No unwrap() in non-test code. Prefer existing error types.

## Workflow
1. Read relevant files first. Never guess APIs.
2. Plan in 3-5 bullets, then make the smallest diff that works.
3. No drive-by refactors. Stay in scope.
4. If uncertain, stop and ask.

## Guardrails
- No new dependencies without asking.
- Never read, print or commit secrets (.env, keys).
- No destructive commands (rm -rf, force push, DB drops).
- Never delete or skip failing tests to go green.

Customize in the generator

Why these rules

Agents fail most on: guessing APIs, sprawling diffs, adding dependencies, and "fixing" tests by deleting them. Each line above targets one of those failure modes.

More: Agent Tools Directory · buildlog pack

Get one practical AI/dev tip a week

Free. No spam. Unsubscribe anytime.