claude-code: Instructions file for Claude Code

CLAUDE.md

claude-code CLAUDE.md is an instructions file for Claude Code from timothywarner-org/claude-code. It costs 4,246 tokens per session, scanned A, original, MIT.

A teaching repository for Claude Code, an AI coding assistant, that demonstrates how instruction files can apply at different folder levels. It includes examples of project rules, agent boundaries, skills, tools, and file-based memory.

In plain words
What is it for?
It is for learning how to structure Claude Code instructions, organize agent workflows, define permissions, and maintain project or user memory files.
Why use it?
It shows how to give an AI coding assistant the right context and limits for each part of a project instead of relying on one large set of instructions.

Instructions file for Claude Code

Written for Claude Code: ${CLAUDE_PROJECT_DIR variable. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is timothywarner-org/claude-code's own configuration. It tells Claude Code how to work on claude-code itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code configures →

Reuse

Borrowing it

Nothing to install: this file belongs to timothywarner-org/claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/timothywarner-org/claude-code/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/timothywarner-org/claude-code

Made for: Claude Code.

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-code CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/timothywarner-org/claude-code/claude-md/github.svg)](https://agentmods.dev/instructions/timothywarner-org/claude-code/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/timothywarner-org/claude-code/claude-md"><img src="https://agentmods.dev/badge/instructions/timothywarner-org/claude-code/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-code CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/timothywarner-org/claude-code/claude-md"><img src="https://agentmods.dev/badge/instructions/timothywarner-org/claude-code/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,246 This file is loaded in full into every session.
When invoked 4,246 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.04246 $0.04246
Opus 5.5 $0.01698 $0.01698
Sonnet 5.5 $0.00849 $0.00849
Haiku 4.5 $0.00425 $0.00425

Measured 2mo ago against content hash 40f1c21d6d16, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-code 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 2mo 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.

CLAUDE.md · 289 lines

How it starts

The opening of the file, as written. The whole thing — 289 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) when working with code in this repository.

Last revised: 2026-07-20

How this repo teaches CLAUDE.md

This repo is the worked example for Segment 2 of the course. Five CLAUDE.md files at different scopes show the hierarchy in practice:

  • CLAUDE.md (this file, repo root) - project-wide conventions
  • segment_1_quickstart/CLAUDE.md - minimal demo conventions
  • segment_2_context/CLAUDE.md - context-engineering rules
  • segment_3_agents/CLAUDE.md - boundary spec (what Claude may and may not do)
  • segment_4_hero/CLAUDE.md - skills/agents/MCP directory conventions

Open all five side-by-side. Each one is loaded automatically by Claude Code when working inside that subtree. See segment_2_context/01_claude_md_at_every_scope.md for the full lesson.

For the memory half of context engineering, segment_2_context/memory_example/ is an inert teaching example of Claude Code's file-based memory: MEMORY.example.md is the index (one line per fact, loaded each session), user_prefers_uv.example.md is a feedback memory, and project_azure_keyless.example.md is a project memory. The .example.md suffix keeps the demo from being read as a live store. See segment_2_context/memory_example/README.md.

Project Overview

O'Reilly Live Learning course materials for "Claude Code and Large-Context Reasoning," a 4-hour training. The course arc is Zero -> Context -> Agents -> Hero: install Claude Code, master CLAUDE.md at every scope, run autonomous agents with boundaries, then layer on skills, subagents, and MCP. Uses TypeScript/JavaScript with the Anthropic SDK for demos, plus Python with FastMCP (managed by UV) for MCP server implementations.

Development Commands

# Install Node dependencies
npm install

# Verify environment setup
npm run verify

# Run any TypeScript demo file
npx tsx <path-to-file.ts>

Course Demo Commands

# Segment 1: Zero (Install, CLI, First CLAUDE.md)
npm run segment1:verify      # Verify API setup
npm run segment1:workflows   # Terminal workflow demos

# Segment 2: Context (The CLAUDE.md Hierarchy)
# (No npm scripts in Segment 2. The lesson is markdown + live demos.)
# The legacy MCP memory server moved to segment_4_hero/memory_server/ as
# optional homework. To start it:
npm run mcp:memory             # Start memory server (via UV)

# Segment 3: Agents
npm run segment3:agent-loop   # Agent loop demonstration
npm run segment3:boundaries   # Permission boundaries demo

# Segment 4: Hero (Skills, Subagents, and MCP)
npm run segment4:workflows    # Production workflow demos

Read the full file on GitHub · 289 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. 2mo ago First seen · 289 lines · 4,246 tokens per session scan A 40f1c21d6d16

Subscribe to this mod's changes

claude-code CLAUDE.md is an instructions file published in the GitHub repository timothywarner-org/claude-code (226 stars, last pushed 3mo ago), licensed MIT. It adds 4,246 tokens to every session, about $0.0170 per session on Opus 5.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.

Related

claude-code CLAUDE.md compared with instructions from other repositories

claude-code CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-code CLAUDE.mdtimothywarner-org/claude-codeInstructions file2263mo agoMITA4,246Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode