creating-agents-md

A guide for writing an `agents.md` file: a plain Markdown file in a project's root folder that explains the project to AI coding assistants. It covers project-specific context such as structure, tools, conventions, testing, and business rules.

In plain words
What is it for?
Use it when creating an `agents.md` package for PRPM or adding project context for an AI coding assistant.
Why use it?
It helps an AI coding assistant understand how the project is organized and how work should be done. The required format avoids invalid frontmatter and keeps the file easy to read.

Cursor rule for Cursor

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 rules/pr-pm/prpm/creating-agents-md
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Cursor.

Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,207 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00028 $0.01207
Opus 5 $0.00014 $0.00603
Sonnet 5 $0.00006 $0.00241
Haiku 4.5 $0.00003 $0.00121

Measured 2d ago against content hash b0d0d4819b23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

creating-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 2d 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.

.cursor/rules/creating-agents-md.mdc · 217 lines

How it starts

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

Creating agents.md Files

Quick reference for creating agents.md files - plain markdown project context for AI coding assistants.

Schema: https://github.com/pr-pm/prpm/blob/main/packages/converters/schemas/agents-md.schema.json

Format Rules

Requirement Value
Format Plain markdown only
Frontmatter None (forbidden)
Structure Free-form
File agents.md in project root

Critical Requirements

  1. No frontmatter: Pure markdown only (no YAML)
  2. Single file: Typically agents.md in project root
  3. Plain markdown: Standard markdown syntax
  4. Free-form content: No required structure

What to Include

High Priority:

  • Project overview and purpose
  • Architecture decisions and patterns
  • Tech stack and dependencies
  • File structure and organization
  • Coding conventions
  • Development workflow
  • Testing approach
  • Domain knowledge and business logic

Skip:

  • General programming best practices
  • Language syntax explanations
  • Framework basics
  • Obvious code quality rules

Example: Full Stack App

# TaskMaster Development Guide

## Project Overview

TaskMaster is a task management application for remote teams with real-time collaboration and offline-first architecture.

## Architecture

### Frontend
- React 18 with TypeScript
- Vite for build tooling
- Zustand for state management
- Tailwind CSS for styling

### Backend
- Node.js with Express
- PostgreSQL with Prisma ORM
- WebSocket for real-time features
- Redis for caching and pub/sub

## Coding Conventions

- Use TypeScript strict mode
- Functional components with hooks (no class components)
- Colocate tests with source files (*.test.tsx)
- Use Zod for runtime validation

## File Structure

\`\`\`
src/
  components/     # Reusable UI components
  features/       # Feature-based modules
  hooks/          # Custom React hooks
  lib/            # Utility functions
  pages/          # Route pages
\`\`\`

## Development Workflow

1. Create feature branch from `main`
2. Write tests first (TDD)
3. Implement feature
4. Run `pnpm test` and `pnpm lint`
5. Create PR with description

## Testing

- Vitest for unit tests
- Playwright for E2E tests
- 80% coverage target
- Mock external dependencies

Read the full file on GitHub · 217 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. 2d ago First seen · 217 lines · 28 tokens per session scan A b0d0d4819b23

Subscribe to this mod's changes

creating-agents-md is a cursor rule published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 1,207 once invoked, about $0.0001 per session on Opus 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.