agents: Instructions file for Codex

AGENTS.md

agents AGENTS.md is an instructions file for Codex, OpenCode from scarletkc/agents. It costs 703 tokens per session, scanned A, original, Apache-2.0.

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

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

This is scarletkc/agents's own configuration. It tells Codex and OpenCode how to work on agents 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 agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to scarletkc/agents. 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/scarletkc/agents/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/scarletkc/agents

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/scarletkc/agents/agents-md/github.svg)](https://agentmods.dev/instructions/scarletkc/agents/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/scarletkc/agents/agents-md"><img src="https://agentmods.dev/badge/instructions/scarletkc/agents/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 agents AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/scarletkc/agents/agents-md"><img src="https://agentmods.dev/badge/instructions/scarletkc/agents/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00703 $0.00703
Opus 5.5 $0.00281 $0.00281
Sonnet 5.5 $0.00141 $0.00141
Haiku 4.5 $0.00070 $0.00070

Measured 1mo ago against content hash 3c2faadf98c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (224 stars, last pushed 6d ago), licensed Apache-2.0. It adds 703 tokens to every session, about $0.0028 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

ai-agent-rules-generator ui-design.instructions.md

Glitch Payment Gateway admin UI design rules — mandatory element & component reference for WooCommerce settings.

savedpixel/ai-agent-rules-generator · 701 tokens

ai-agent-rules-generator ratelimitting.instructions.md

Instructions for savedpixel/ai-agent-rules-generator, covering rate limit prevention (critical), rules, output length limits and visibility.

savedpixel/ai-agent-rules-generator · 522 tokens

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