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

> Boris Cherny (Anthropic, created Claude Code) described his workflow in the 2025 talk "Mastering Claude Code" (reposted: https://x.com/RamSingh_369/status/2115640171937018076). This is our paraphrase, with shortcuts checked against the current Claude Code docs on 2026-10-29.

Source: https://agentpromptsatoz.com/guides/boris-claude-code-rules/ · Free to use and adapt · Not affiliated with Anthropic

## 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

If you also keep AGENTS.md, add `@AGENTS.md` as the first line (Claude Code reads CLAUDE.md instead of AGENTS.md when both exist).

````markdown
# 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 as an agent skill

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

Skill file: https://agentpromptsatoz.com/agent-skills/claude-code-creator-rules/SKILL.md

## Shortcuts: 2025 talk vs current docs (2026-10-29)

| Shortcut | 2025 talk | Current docs | Status |
|---|---|---|---|
| `Shift+Tab` | Toggle auto-accept edits | Cycles permission modes: Manual (default), acceptEdits, plan, and auto or bypassPermissions when available | Changed: now a mode cycle that includes plan mode |
| `# at the start of a prompt` | Quickly add a memory to CLAUDE.md | No longer listed as a quick command. Say "add this to CLAUDE.md" or edit with /memory; plain "remember X" goes to auto memory | Changed: use /memory or ask |
| `! at the start of a prompt` | Run a bash command directly | Shell mode: runs the command and adds the output to the session | Still works |
| `Esc` | Stop Claude | Interrupts the current response or tool call; Esc Esc on an empty prompt opens rewind | Still works |
| `@` | Mention a file | File path autocomplete | Still works |
| `claude -p ... --output-format json` | Scripting / CI | print mode; --output-format text, json or stream-json | Still works |

Sources: [Interactive mode (shortcuts)](https://code.claude.com/docs/en/interactive-mode), [Memory (CLAUDE.md files)](https://code.claude.com/docs/en/memory), [Permission modes](https://code.claude.com/docs/en/permission-modes), [CLI reference (-p, --output-format)](https://code.claude.com/docs/en/cli-reference)

## Related free tools

- [Claude Code Stop hook that blocks a fake done](https://agentpromptsatoz.com/guides/done-gate/)
- [AGENTS.md guide and drift check](https://agentpromptsatoz.com/guides/agents-md/)

## 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.

## Go further (premium)

[App Builder Agent Pack](https://payhip.com/b/EuRgw) ($19): finished AGENTS.md, CLAUDE.md and six Cursor rules files with a plan-approve-build-verify loop. Or [all 5 premium packs](https://payhip.com/b/J8eUb) 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.
