agents AGENTS.md

General instructions for AI coding agents contributing to software projects. They cover the project's environment, engineering practices, code style, and testing.

In plain words
What is it for?
Use them when making code changes, choosing build or test commands, handling errors, and following project-specific contribution rules.
Why use it?
They help agents follow the repository's existing toolchain and conventions instead of making unsafe or inconsistent changes.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/scarletkc/agents/agents-md
Clone the repo
git clone --depth 1 https://github.com/scarletkc/agents

Made for: Codex, OpenCode.

Per session 703 This file is loaded in full into every session.
When invoked 703 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00703 $0.00703
Opus 5 $0.00351 $0.00351
Sonnet 5 $0.00141 $0.00141
Haiku 4.5 $0.00070 $0.00070

Measured 2d ago against content hash 3c2faadf98c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

AGENTS.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Guidelines

Project-agnostic rules for AI agents contributing to a repository. To adopt: copy this file into a project as AGENTS.md and prepend the project-specific sections (structure, build/test commands, domain notes). Everything below applies as-is to any codebase.

Environment

Use the project's own toolchain and environment: the checked-in virtualenv, lockfile, or package manager, never the system interpreter or global installs. If the project defines a canonical test or lint command, run that one; don't invent a variant. Read the project's own guidelines and existing code before the first change: established conventions beat personal defaults.

Engineering Principles

Let errors surface instead of swallowing them: degraded paths are acceptable only as deliberate, user-visible product behavior, never as silent fallbacks that make code appear to work. Fix root causes rather than papering over symptoms; if the root cause can't be pinned down, say so and state what information is missing (better diagnostics beat a speculative fix). All code is production-quality by default: no temporary, placeholder, or demo-only implementations unless explicitly requested. When requirements are unclear, ambiguous, or inconsistent, ask instead of inventing details. A change that claims to improve behavior ships with evidence: measure before flipping a default, and if your own benchmark doesn't support the claim, ship the change opt-in and say so.

Code Style

Match the surrounding code: its naming, idiom, comment density, and error handling. Before writing new logic, look for an existing helper to reuse or extend; if the same behavior already lives in more than one place, extract the smallest shared helper that makes sense. Route user-facing strings through whatever centralized message layer the project has, and prefer structured rendering paths over ad hoc print strings. For judgment on user-facing text and documentation, see the ux-writing skill.

Testing

Read the full file on GitHub · 68 lines

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. 2d ago First seen · 68 lines · 703 tokens per session scan A 3c2faadf98c1

Subscribe to this mod's changes

agents AGENTS.md is an instructions file published in the GitHub repository scarletkc/agents (191 stars, last pushed 6d ago), licensed Apache-2.0. It adds 703 tokens to every session, about $0.0035 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.

Related

Other instructions, from other repositories