c/agents › command
0votes

Project context pack for coding agents

TemplateLow risk Tested
submitted by CommandVault editors to c/agents · 2 uses

A reusable AGENTS.md that stops your AI agent from guessing.

Template · 2 variables
Write an AGENTS.md for my project so coding agents work the way my team does.

Project: {{project_description}}
Stack: {{stack}}

Include sections:
- What this app is and who uses it (3 lines).
- How to run, test, lint and build (exact commands).
- Folder map: where things live and where new code goes.
- Conventions: naming, error handling, data fetching, styling.
- Never do: list of dangerous or banned actions (e.g. editing generated files, touching prod data).
- Definition of done for a change.

Rules for writing it:
- If an AGENTS.md already exists, update it and keep the parts that are still true.
- Only state facts you checked in this repo: run the commands, open the folders. Mark folders that don't exist yet as (planned), and write "no test runner yet" if there isn't one.
- Don't copy your own personal or global instructions into this project file.

Keep it under 120 lines. Prefer concrete rules over advice.
0 commentsreport

Guide

What you get: The agent writes an AGENTS.md (about 100 lines) with run/lint/build commands, a folder map, conventions, a never-do list and a definition of done. Best for Anyone starting a project with coding agents who wants them to follow the team's rules instead of guessing..

Before you start

  • A repository the agent can read
  • Fill in project description and stack
  • If the repo already has an AGENTS.md (create-next-app 16 ships one), check the agent kept it

Worked example (Oct 17, 2026, Claude Code 2.1.296; Codex 0.151.0 (gpt-5.6-sol))

Input

Project: Acme Notes, a note-taking web app for small teams (still the create-next-app starter). Stack: Next.js 16 App Router, React 19, TypeScript, ESLint, CSS Modules, npm.

Result

Codex: "- Test: no automated test runner or `npm test` script is configured yet." Claude Code: "| Tests | No test runner yet. Do not invent `npm test`."

Both kept the existing Next.js managed block. Every command in both files exists and worked when we ran it (npm run lint, npm run build, npx tsc --noEmit for Claude's file). Codex's file was accurate and labeled not-yet-existing folders as 'create for'. Claude Code's file had inaccuracies: its folder map lists src/components, src/lib, src/server, src/app/(app) and src/app/api without saying none of them exist yet; it states 'Each top-level route segment has an error.tsx' (there is none); it invents '2-20 people per workspace'; and it copied the tester's personal ~/.claude/CLAUDE.md git/Vercel rules into the project file. Claude Code's file in this test had four errors (listed folders that don't exist, an invented error.tsx rule, an invented workspace size, and copied the tester's personal instructions), so only Codex is listed as passing. After this test the prompt tells the agent to check every fact, mark planned folders and keep an existing AGENTS.md.

How to check it worked

  • Run every command listed in the file
  • Check every path in the folder map exists, or is clearly marked as where new code will go
  • Remove details you didn't give the agent (user counts, features)

Common problems

  • Planned folders described as if they already exist
  • Rules written as facts (e.g. 'each route has an error.tsx')
  • Personal agent settings leaking into a shared project file
  • Invented product details

How to use this prompt

  1. Fill in the 2 blanks above. The more specific you are, the better the answer.
  2. Copy it and paste it into ChatGPT, Claude, Gemini, Cursor or Codex, or use "Try it here" for a quick test.
  3. Read the answer critically: check anything it claims about your code or data before you rely on it.
  • {{project_description}} Project description
  • {{stack}} Stack

More from c/agents

See all of c/agents →
0 comments

Log in to join the discussion.