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 rules/nedcodes-ok/cursorrules-collection/agents-mdgit clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWhat 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.00000 | $0.00742 |
| Opus 5 | $0.00000 | $0.00371 |
| Sonnet 5 | $0.00000 | $0.00148 |
| Haiku 4.5 | $0.00000 | $0.00074 |
Grade A, and why
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 yesterday.
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 — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md Rules
AGENTS.md is the instruction file for OpenAI Codex (and increasingly, other tools like GitHub Copilot coding agent, Zed, and OpenCode). It's loaded once per session before any work begins.
Discovery Chain
- Global:
~/.codex/AGENTS.md(orAGENTS.override.mdif it exists — override takes priority, only one file at this level) - Project: Starting from the Git root, Codex walks down to your current working directory, checking each directory for
AGENTS.override.mdthenAGENTS.md. At most one file per directory - Merge order: Files concatenate root-to-leaf, separated by blank lines. Later files override earlier guidance because they appear last in the combined prompt
- Size limit: 32 KiB combined by default (
project_doc_max_bytesconfig). If you hit it, split instructions into subdirectory files
What Goes In AGENTS.md
- Working agreements: "Always run
npm testafter modifying JavaScript files," "Preferpnpmwhen installing dependencies" - Verification commands: How to build, test, lint, typecheck. Codex runs these to validate its own changes
- Repo conventions: naming patterns, directory structure expectations, PR requirements
- Tool preferences: which package manager, which test runner, which formatter — Codex won't guess correctly without this
Override Files
AGENTS.override.mdin any directory replacesAGENTS.mdat that same level — useful for temporary overrides without editing the base file- Common use: a
services/payments/AGENTS.override.mdthat says "usemake test-paymentsinstead ofnpm test" for that specific service - Delete the override to restore the base instructions
Patterns That Work
- Keep global (
~/.codex/AGENTS.md) minimal — personal preferences that apply everywhere (coding style, preferred tools, commit message format) - Project root AGENTS.md handles repo-wide setup: build commands, CI expectations, PR conventions
- Subdirectory overrides for teams/services with different tooling or constraints
- Commands first, conventions second — Codex needs to know how to verify its work before anything else
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.
- yesterday First seen · 45 lines · 0 tokens per session scan A 440e1c945262
agents-md is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 742 tokens. 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.