agents.md: Instructions file for Codex

AGENTS.md

agents.md AGENTS.md is an instructions file for Codex, OpenCode from agentsmd/agents.md. It costs 441 tokens per session, scanned A, original, MIT.

A set of instructions for agents working on a Next.js web application, a JavaScript framework for building websites and web apps.

In plain words
What is it for?
Use it while developing the application, updating dependencies, and following its TypeScript and project conventions.
Why use it?
It prevents agents from disrupting hot reload during development and reminds them to keep dependency lockfiles current.

Instructions file for CodexOpenCode

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

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

About the project

AGENTS.md is an open file format for giving AI coding agents project-specific context and instructions, functioning much like a README intended for agents. Developers use it to explain how an agent should work within a codebase. The catalogue entry is an instruction based on this format.

agentsmd/agents.md · 25,347 stars · on GitHub · agents.md

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/agentsmd/agents.md/agents-md"><img src="https://agentmods.dev/badge/instructions/agentsmd/agents.md/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 441 This file is loaded in full into every session.
When invoked 441 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.00441 $0.00441
Opus 5.5 $0.00176 $0.00176
Sonnet 5.5 $0.00088 $0.00088
Haiku 4.5 $0.00044 $0.00044

Measured 2mo ago against content hash 7f8ae31d1350, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agents.md 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 2mo 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

AGENTS.md · 44 lines

How it starts

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

AGENTS Guidelines for This Repository

This repository contains a Next.js application located in the root of this repository. When working on the project interactively with an agent (e.g. the Codex CLI) please follow the guidelines below so that the development experience – in particular Hot Module Replacement (HMR) – continues to work smoothly.

1. Use the Development Server, not npm run build

  • Always use npm run dev (or pnpm dev, yarn dev, etc.) while iterating on the application. This starts Next.js in development mode with hot-reload enabled.
  • Do not run npm run build inside the agent session. Running the production build command switches the .next folder to production assets which disables hot reload and can leave the development server in an inconsistent state. If a production build is required, do it outside of the interactive agent workflow.

2. Keep Dependencies in Sync

If you add or update dependencies remember to:

  1. Update the appropriate lockfile (package-lock.json, pnpm-lock.yaml, yarn.lock).
  2. Re-start the development server so that Next.js picks up the changes.

3. Coding Conventions

  • Prefer TypeScript (.tsx/.ts) for new components and utilities.
  • Co-locate component-specific styles in the same folder as the component when practical.

4. Useful Commands Recap

Command Purpose
npm run dev Start the Next.js dev server with HMR.
npm run lint Run ESLint checks.
npm run test Execute the test suite (if present).
npm run build Production build – do not run during agent sessions

Following these practices ensures that the agent-assisted development workflow stays fast and dependable. When in doubt, restart the dev server rather than running the production build.

Read the full file on GitHub · 44 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. 2mo ago First seen · 44 lines · 441 tokens per session scan A 7f8ae31d1350

Subscribe to this mod's changes

agents.md AGENTS.md is an instructions file published in the GitHub repository agentsmd/agents.md (25,347 stars, last pushed 1mo ago), licensed MIT. It adds 441 tokens to every session, about $0.0018 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

agents.md AGENTS.md compared with instructions from other repositories

agents.md AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agents.md AGENTS.mdagentsmd/agents.mdInstructions file25k1mo agoMITA441Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode