Guides for Claude Code and Codex.

Practical guides on agent instruction files, hooks and orchestration, drawn from the rules, hooks and protocols in the CommonRig kit.

CLAUDE.md best practices and a template

What belongs in CLAUDE.md, what to leave out, how big it should be, and a short template for Claude Code you can adapt in five minutes.

AGENTS.md example, and AGENTS.md vs CLAUDE.md

An AGENTS.md example for Codex and other agents, which engines read AGENTS.md or CLAUDE.md, and how to keep both files in step without copying.

Claude Code hooks examples: block dangerous git, enforce rules

Working Claude Code hook examples: block force pushes and hard resets before they run, send the agent back to fix rule breaks, and roll hooks out safely.

One rule set for Claude Code and Codex

How to keep CLAUDE.md and AGENTS.md in step from a single source, with per-engine variants for the rules that differ, and a check that catches drift.

Briefing subagents: an orchestration template

How an orchestrator splits work, writes subagent briefs that survive a restart, keeps parallel writers apart and checks results. Includes a brief template.

Agent ignores CLAUDE.md? Your file may be too long

Why coding agents drop rules from a long CLAUDE.md or AGENTS.md, how to measure the context footprint, and how to cut it without losing the rules that matter.

Want a number for your own file? Score your CLAUDE.md or AGENTS.md for free.