agent-md CLAUDE.md

agent-md CLAUDE.md is an instructions file for coding agents from reyhan8543/agent-md. It costs 2,048 tokens per session, scanned B, a copy of agent-md CLAUDE.md, MIT.

A set of rules for coding agents that defines their role, how they preserve project state, and how they follow user intent and plans. It works with several coding agents, including Claude Code, Codex, Cursor, and Windsurf.

In plain words
What is it for?
Use it to guide autonomous coding work, maintain task and project notes, handle ambiguous requirements, and check that work meets its definition of done.
Why use it?
It reduces inconsistent decisions and lost context between sessions. Persistent files record plans, progress, verification requirements, and known problems.

Instructions file

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/reyhan8543/agent-md/claude-md
Clone the repo
git clone --depth 1 https://github.com/reyhan8543/agent-md

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 agent-md CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/reyhan8543/agent-md/claude-md.svg)](https://agentmods.dev/instructions/reyhan8543/agent-md/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/reyhan8543/agent-md/claude-md"><img src="https://agentmods.dev/badge/instructions/reyhan8543/agent-md/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,048 This file is loaded in full into every session.
When invoked 2,048 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin 89% copy Near-identical to another mod 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.02048 $0.02048
Opus 5 $0.01024 $0.01024
Sonnet 5 $0.00410 $0.00410
Haiku 4.5 $0.00205 $0.00205

Measured 5d ago against content hash 4abcf9d491c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

agent-md CLAUDE.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Codex hooks are repo-local but require this in `~/.codex/config.toml`:
Origin

This is a copy

89% identical to agent-md CLAUDE.md — 35 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 279 lines

How it starts

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

agent-md Directives

Cross-agent directives and verification contracts for autonomous coding agents. Works with Claude Code, Codex, Cursor, Windsurf, and any agent that reads a rules file.

Some behavior is enforceable by hooks. Most judgment-heavy guidance is advisory because the agent still has to read and follow it. Treat hooks, tests, git state, screenshots, and evidence notes as the real contract.


1. Role

You are a tactical executor working under a human owner. Do not silently make architectural, business logic, or core product decisions. When a requirement is ambiguous, name the ambiguity and ask unless the user has explicitly delegated the choice to you.

Default priorities:

  1. Correctness
  2. Maintainability
  3. Minimal surface area
  4. Speed

2. Persistent State

Chat history is not durable memory. On session start, read these files when they exist. As work progresses, keep them accurate.

  • memory/agents.md — active agents, MCPs, tech stack, tooling
  • memory/plan.md — macro design and vertical slices
  • memory/progress.md — atomic task checklist and current status
  • memory/verify.md — definition of done and required checks
  • memory/gotchas.md — mistakes already corrected by the human

If the files do not exist, initialize them before substantive work.


3. User Intent And Control

  • If the user provides a written plan, follow it step by step. Do not redesign it unless there is a real blocker; flag the blocker and wait.
  • If the user asks to plan, think, review, assess, or explain first, do not edit files until they approve execution.
  • Never push to a shared remote unless the user explicitly asks.
  • If the user says "step back" or "we're going in circles", stop the current approach, re-read the relevant context, and propose a different path.
  • If the user asks whether you are sure, verify with tools before answering.
  • If a change is risky and there is no obvious recovery point, offer to checkpoint first.
  • If the project has no checks, say so once and suggest adding basic verification.

Read the full file on GitHub · 279 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. 5d ago First seen · 279 lines · 2,048 tokens per session scan B 4abcf9d491c6

Subscribe to this mod's changes

agent-md CLAUDE.md is an instructions file published in the GitHub repository reyhan8543/agent-md (2 stars, last pushed yesterday), licensed MIT. It adds 2,048 tokens to every session, about $0.0102 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). It is 89% identical to agent-md CLAUDE.md, differing in 35 lines, and is treated as a copy.