Free guide + agent skill

The Claude Code creator's prompting rules, as a copy-paste CLAUDE.md

Boris Cherny, the Anthropic engineer who created Claude Code, gave a talk called "Mastering Claude Code". We turned his workflow into nine rules and a CLAUDE.md you can paste into any repo. We also checked his shortcuts against today's Claude Code docs, and two of them changed.

Paraphrased by us, not his words. The talk is from 2025 (reposted on X in Oct 2026). Checked against the docs 2026-10-29. Raw Markdown: /guides/boris-claude-code-rules.md · Skill: SKILL.md

The 9 rules

  1. Ask before you edit. On a new codebase, use Claude for Q&A first: how does this work, where is X, why was it built this way. No edits yet.
  2. Make it read the history. Ask it to look through git log, git blame and the related GitHub issues so it learns why the code is the way it is.
  3. Plan, pick, then build. Ask for a plan or a few options, approve one, and only then let it write code.
  4. Short incantations for routine jobs. Once the routine is written down, a prompt like "commit, push, pr" is enough.
  5. Teach it your team's tools. Tell it to run your internal CLI or MCP tool with -h and learn it before use.
  6. Give it a way to check itself. Tests, a screenshot or a simulator let it compare its output with the goal and iterate until it matches.
  7. Write it down in CLAUDE.md. Shared CLAUDE.md checked into git, a personal CLAUDE.local.md, and nested CLAUDE.md files for subfolders.
  8. Point at files with @. @-mention the files that matter instead of making it search.
  9. Script it with claude -p. Non-interactive mode for CI and scripts, with --output-format json for machine-readable output.

Copy-paste CLAUDE.md

Put it at the repo root and fill in the commands. If you also keep an AGENTS.md, add @AGENTS.md as the first line, because Claude Code reads CLAUDE.md instead of AGENTS.md when both exist (why).

# CLAUDE.md
<!-- Workflow rules based on Boris Cherny's "Mastering Claude Code" talk (2025), adapted by agentpromptsatoz.com -->
<!-- If this repo also has AGENTS.md, put @AGENTS.md on the first line so Claude Code reads it too. -->

## Commands
- Install: <fill in>
- Test: <fill in>
- Lint / typecheck: <fill in>
- Team CLIs you may use: <name> (run `<name> -h` first to learn it)

## How to work here
1. New to this code? Answer questions first. When I ask "how does X work", read the code, `git log` and `git blame` for the files involved, and the linked GitHub issues, then explain. Do not edit anything during Q&A.
2. Plan before code. For any change bigger than a one-liner, give me a short plan or 2-3 options with tradeoffs, then STOP and wait. Start coding only after I pick one.
3. Check your own work. Before saying done, run the tests (or take a screenshot for UI work), compare with the goal, and keep fixing until it passes. Paste the command and its result.
4. Learn our tools. Before using a CLI or MCP tool you don't know, run it with `-h` / `--help` and use only what it supports.
5. Short commands mean the usual routine:
   - "commit" = stage the relevant files, write a clear message, commit.
   - "commit, push, pr" = commit, push the branch, open a PR with a summary and test results.
6. When you learn something about this repo that a teammate would need, propose a one-line addition to this file. Don't add it without my OK.

## Files
- Shared rules: this CLAUDE.md, checked into git.
- My personal notes: CLAUDE.local.md (gitignored).
- Folder-specific rules: a CLAUDE.md inside that folder (loaded when you work there).

Install it as an agent skill

npx skills add https://agentpromptsatoz.com --skill claude-code-creator-rules

The skill makes your agent follow the rules (Q&A first, plan then wait, verify before done) and can draft this CLAUDE.md for your repo. It writes the file only after you OK it.

Shortcuts from the talk: what changed

ShortcutIn the 2025 talkCurrent docs (2026-10-29)Status
Shift+TabToggle auto-accept editsCycles permission modes: Manual (default), acceptEdits, plan, and auto or bypassPermissions when availableChanged: now a mode cycle that includes plan mode
# at the start of a promptQuickly add a memory to CLAUDE.mdNo longer listed as a quick command. Say "add this to CLAUDE.md" or edit with /memory; plain "remember X" goes to auto memoryChanged: use /memory or ask
! at the start of a promptRun a bash command directlyShell mode: runs the command and adds the output to the sessionStill works
EscStop ClaudeInterrupts the current response or tool call; Esc Esc on an empty prompt opens rewindStill works
@Mention a fileFile path autocompleteStill works
claude -p ... --output-format jsonScripting / CIprint mode; --output-format text, json or stream-jsonStill works

Sources: Interactive mode (shortcuts) · Memory (CLAUDE.md files) · Permission modes · CLI reference (-p, --output-format)

Make "check your own work" a hard rule

Rule 6 is the one that matters most, and it's also the one agents skip. A line in CLAUDE.md is only a request. Our free Claude Code Stop hook blocks "done" until your checks exit 0. To keep one rules file for every agent, see the AGENTS.md guide and its free drift check.

Optional · $19

Want this loop already wired up?

The App Builder Agent Pack has a finished AGENTS.md, CLAUDE.md and six Cursor rules files built around plan, approve, build, verify. You can also get all 5 packs for $29.

Launch offer: code LAUNCH40 takes 40% off your whole Payhip order until Nov 20, 2026 (first 100 uses). The $29 bundle comes to $17.40 and App Builder to $11.40.

App Builder pack: $19 All 5 packs: $29 Test results

FAQ

Who is Boris Cherny?

He is the Anthropic engineer who created Claude Code. The rules here are our paraphrase of his talk "Mastering Claude Code", not his words or an official Anthropic document.

Is this the current advice?

The talk is from 2025 and was reposted in October 2026. The workflow ideas still hold, but two shortcuts changed. We checked each one against the current Claude Code docs on 2026-10-29; see the table.

Does the CLAUDE.md work with AGENTS.md?

Yes. If your repo has an AGENTS.md, put @AGENTS.md on the first line of CLAUDE.md. Claude Code reads CLAUDE.md instead of AGENTS.md when both exist, so without that import it ignores AGENTS.md.

Will Claude really stop and wait after the plan?

Usually, but a rule in a file is a request, not a lock. For a hard stop, use plan mode (Shift+Tab) or a Stop hook such as our free done-check.

Credit

The workflow comes from Boris Cherny's talk "Mastering Claude Code" (2025). We wrote this summary and CLAUDE.md ourselves. We are not affiliated with or endorsed by Anthropic or Boris Cherny.

Get new free agent prompts

One short email a week: new free packs, guides and tested agent rules. Unsubscribe anytime.

Form not showing? Subscribe on Beehiiv.