agent-md: Instructions file for Claude Code

CLAUDE.md

agent-md CLAUDE.md is an instructions file for Claude Code, Codex from iamfakeguru/agent-md. It costs 2,314 tokens per session, scanned B, original, MIT.

Working instructions for agent-md, a set of rules for coding agents that covers roles, persistent notes, user control, planning, and verification. It is meant to work with tools such as Claude Code, Codex, Cursor, and Windsurf.

In plain words
What is it for?
Maintaining agent notes, recording plans and progress, clarifying ambiguous requests, and following checks before declaring coding work complete.
Why use it?
They keep work traceable across sessions and prevent the agent from making major product or architecture decisions without the owner's approval.

Instructions file for Claude CodeCodex

Written for Codex and Claude Code: reads ~/.codex or $CODEX_HOME, but also the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is iamfakeguru/agent-md's own configuration. It tells Claude Code and Codex how to work on agent-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 agent-md configures →

Reuse

Borrowing it

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

Made for: Claude Code, Codex.

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/iamfakeguru/agent-md/claude-md.svg)](https://agentmods.dev/instructions/iamfakeguru/agent-md/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/iamfakeguru/agent-md/claude-md"><img src="https://agentmods.dev/badge/instructions/iamfakeguru/agent-md/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,314 This file is loaded in full into every session.
When invoked 2,314 The same file — it is already loaded in full.
Security scan B 1 finding. 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.02314 $0.02314
Opus 5 $0.01157 $0.01157
Sonnet 5 $0.00463 $0.00463
Haiku 4.5 $0.00231 $0.00231

Measured 8d ago against content hash e0e9fa47ebd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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

Copies of this mod

1 near-identical copy found in the catalogue:

CLAUDE.md · 306 lines

How it starts

The opening of the file, as written. The whole thing — 306 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 · 306 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. 8d ago First seen · 306 lines · 2,314 tokens per session scan B e0e9fa47ebd5

Subscribe to this mod's changes

agent-md CLAUDE.md is an instructions file published in the GitHub repository iamfakeguru/agent-md (966 stars, last pushed 4mo ago), licensed MIT. It adds 2,314 tokens to every session, about $0.0116 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens