claude-md

claude-md is a cursor rule for coding agents from nedcodes-ok/cursor-doctor. It costs 0 tokens per session (812 once invoked), scanned A, a copy of claude-md, MIT.

Guidance for writing a CLAUDE.md file, a project note that Claude Code reads when working on a codebase. It explains what the project does, how it is organized, and which commands to use.

In plain words
What is it for?
Use it to document the technology stack, project folders, business context, build and test commands, deployment steps, and rules for monorepos, which are repositories containing multiple related applications or packages.
Why use it?
It gives the coding agent important context before it starts exploring or changing files. This reduces guesses about the project structure, purpose, tools, and workflows.

Cursor rule

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/nedcodes-ok/cursor-doctor/claude-md
Clone the repo
git clone --depth 1 https://github.com/nedcodes-ok/cursor-doctor

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-md

README.md
[![agentmods](https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/claude-md.svg)](https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/claude-md)
Your own site
<a href="https://agentmods.dev/rules/nedcodes-ok/cursor-doctor/claude-md"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursor-doctor/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 812 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00000 $0.00812
Opus 5 $0.00000 $0.00406
Sonnet 5 $0.00000 $0.00162
Haiku 4.5 $0.00000 $0.00081

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

Security

Grade A, and why

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 4d 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.

Origin

This is a copy

100% identical to claude-md — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

pro-kit/templates/ai-tools/claude-md.mdc · 46 lines

How it starts

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

CLAUDE.md Rules

CLAUDE.md is loaded into every Claude Code session. It's your one chance to onboard the model to your codebase before each conversation.

What Goes In CLAUDE.md

  • WHAT: tech stack, project structure, key directories. In monorepos, list the apps, shared packages, and what each one does. Claude doesn't explore on its own until prompted
  • WHY: purpose of the project, what the different parts do, business context that affects technical decisions ("we use polling instead of websockets because our infra doesn't support persistent connections")
  • HOW: build commands, test commands, lint commands, deploy process. If your project uses pnpm instead of npm, say so here or Claude will guess wrong

Discovery Hierarchy

  • ~/.claude/CLAUDE.md — global, applies to every project
  • CLAUDE.md at project root — project-specific, overrides global
  • CLAUDE.md in subdirectories — more specific, stacks with parent files
  • Claude concatenates all found files, root to leaf. Later files override earlier ones for conflicting guidance

What Makes CLAUDE.md Get Ignored

  • Claude Code wraps CLAUDE.md with a system reminder saying "this context may or may not be relevant to your tasks." If your file is full of situational hotfixes and edge cases, Claude is more likely to skip the whole thing
  • Keep instructions broadly applicable to tasks you'll run. "Always run tests after changes" stays relevant. "When modifying the payment webhook handler, remember the Stripe API changed in v2024-06" only matters for one specific task
  • Shorter, focused files get followed more reliably than 2000-line dumps. If you hit diminishing returns, split into subdirectory CLAUDE.md files

Patterns That Work

  • Build/test/lint commands at the top — these are universally relevant and anchor the file as useful context
  • Project map with directory descriptions: src/api/ does X, src/workers/ does Y, shared/ contains Z
  • Explicit tool preferences: package manager, test runner, formatter, deployment method
  • Coding conventions that differ from defaults: "we use tabs not spaces," "we use Zustand not Redux," "error responses use Problem Details format"

Read the full file on GitHub · 46 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. 4d ago First seen · 46 lines · 0 tokens per session scan A f5579870eca7

Subscribe to this mod's changes

claude-md is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 812 tokens. A static security scan graded it A with 0 findings. It is 100% identical to claude-md, differing in 0 lines, and is treated as a copy.