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.
npx agentmods add instructions/payloadcms/payload/claude-mdgit clone --depth 1 https://github.com/payloadcms/payloadWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.05127 | $0.05127 |
| Opus 5 | $0.02563 | $0.02563 |
| Sonnet 5 | $0.01025 | $0.01025 |
| Haiku 4.5 | $0.00513 | $0.00513 |
Grade A, and why
payload CLAUDE.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.
How it starts
The opening of the file, as written. The whole thing — 463 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) and Cursor when working with code in this repository.
Project Structure
Payload is a monorepo structured around Next.js, containing the core CMS platform, database adapters, plugins, and tooling.
Key Directories
packages/- All publishable packagespackages/payload- Core Payload package containing the main CMS logicpackages/ui- Admin UI components (React Server Components)packages/next- Next.js integration layerpackages/db-*- Database adapters (MongoDB, Postgres, SQLite, Vercel Postgres, D1 SQLite)packages/drizzle- Drizzle ORM integrationpackages/kv-redis- Redis key-value store adapterpackages/richtext-*- Rich text editors (Lexical)packages/storage-*- Storage adapters (S3, Azure, GCS, Vercel Blob, R2)packages/email-*- Email adapters (Nodemailer, Resend)packages/plugin-*- Additional functionality pluginspackages/graphql- GraphQL API layerpackages/translations- i18n translations
test/- Test suites organized by feature area. Each directory contains a granular Payload config and test filesdocs/- Documentation (deployed to payloadcms.com)tools/- Monorepo toolingtemplates/- Production-ready project templatesexamples/- Example implementations
Architecture Notes
- Payload 3.x is built as a Next.js native CMS that installs directly in
/appfolder - UI is built with React Server Components (RSC)
- Database adapters use Drizzle ORM under the hood
- Packages use TypeScript with strict mode and path mappings defined in
tsconfig.base.json - Source files are in
src/, compiled outputs go todist/ - Monorepo uses pnpm workspaces and Turbo for builds
Quick Start
pnpm installpnpm run build:corepnpm run dev(MongoDB) orpnpm run dev:postgres
Build Commands
pnpm install- Install all dependenciespnpm turbo- All Turbo commands should be run from root with pnpm - not withturbodirectlypnpm run buildorpnpm run build:core- Build core packages (excludes plugins and storage adapters)pnpm run build:all- Build all packagespnpm run build:<directory_name>- Build specific package (e.g.pnpm run build:db-mongodb,pnpm run build:ui)
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.
- 2d ago First seen · 463 lines · 5,127 tokens per session scan A 3e403a5c09e1
payload CLAUDE.md is an instructions file published in the GitHub repository payloadcms/payload (44,499 stars, last pushed 4d ago), licensed MIT. It adds 5,127 tokens to every session, about $0.0256 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.
Other instructions, from other repositories
sonicjs AGENTS.md
Instructions for SonicJs-Org/sonicjs, covering sonicjs agent guidelines, decision tree — code exploration, rtk (rust token killer), caveman mode and delegation — cavecrew subagents.
webiny-js AGENTS.md
AGENTS.md instructions for webiny/webiny-js, covering exploration, persist learnings, code, building and testing.
webiny-js CLAUDE.md
Claude Code instructions for webiny/webiny-js, covering context, claude project guidelines, reading code, development commands and install dependencies (suppress all output – it's noise).
sonicjs CLAUDE.md
Instructions for SonicJs-Org/sonicjs, covering sonicjs ai development guidelines, core technology stack, workspace boundary (conductor), architecture direction: document model (authoritative) and the 5 document tables (migration 0002documents.sql).
webiny-js copilot-instructions.md
Copilot instructions for webiny/webiny-js, a project described as: Open-source, self-hosted CMS platform on AWS serverless (Lambda, DynamoDB, S3). TypeScript framework with multi-tenancy, lifecycle hooks, GraphQL API, and AI-assisted development via MCP server. Built for developers at large organizations.
flowwink CLAUDE.md
Instructions for magnusfroste/flowwink, covering claude.md, commands, development (auto-runs migrations before starting), production build and lint.