
What is AGENTS.md? How to write one your coding agents follow
AGENTS.md is a Markdown file that tells AI coding agents how to work on your repo. What it is, which tools read it, and how to write one that works.
An agent skill that reviews a branch the way our checklist does: access control first, then secrets, dependencies and errors, with file and line.
Run it in a fresh session so the reviewer isn't the agent that wrote the code.
---
name: ai-code-review
description: Reviews the current branch diff for AI-written code risks, in priority order (access control, secrets, dependencies, input handling, errors, scope) and reports findings by severity without changing code. Use when the user asks for a code review, a security review, a PR review, or whether a branch is safe to merge.
metadata:
author: codema
version: "1.0"
---
# AI code review
Review the changes on the current branch against the main branch. Report first. Do not edit, commit, or push anything unless the user explicitly asks after reading the report.
## 0. Scope the diff
1. Find the base branch (usually `main`). Run `git diff --stat <base>...HEAD` and `git diff <base>...HEAD`.
2. List every changed file with a one-line summary of what changed.
3. Flag any changed file that does not relate to the stated task as UNEXPECTED.
4. If the diff is over roughly 800 changed lines, say so and suggest splitting it before a full review.
## 1. Access control (highest priority)
SKILL.md named ai-code-review, so it doesn't clash with Claude Code's built-in /code-reviewBuilders who merge AI-written code and want a second pass.

AGENTS.md is a Markdown file that tells AI coding agents how to work on your repo. What it is, which tools read it, and how to write one that works.

How to run coding agents safely with Claude Code permission modes, Codex sandbox and approval settings, deny rules, and habits that keep secrets out of reach.

MCP security best practices for vibe coders: prompt injection risks, what the MCP spec requires, and a checklist to use MCP servers without leaking data.
The Codema publication. Consent is required. You are not subscribed until you confirm from the email, and nothing is stored if email delivery is not connected.