Loading lesson…
Claude Code has Read, Edit, and Write tools. The choice between them shapes performance, safety, and how recoverable a mistake is.
Read pulls a file into context. Edit makes a surgical replacement (old string to new string). Write replaces a file entirely. They look interchangeable in a chat trace; they aren't. Edit preserves the parts you didn't touch — Write trusts the model to remember everything that was in the file.
| Tool | Risk | When to prefer |
|---|---|---|
| Read | Wastes context if file is huge | Always before any edit |
| Edit | Fails if old string isn't unique enough | Existing files, surgical changes |
| Write | Overwrites — loses anything not in the new content | Brand new files, full rewrites |
If the model is editing a file it hasn't read in this session, expect a high error rate. The Edit tool needs to match exact text. Without a Read, the model is guessing — and guessing produces failed edits or, worse, silently wrong ones. CLAUDE.md should reinforce 'always read before editing.'
The big idea: Edit existing files surgically. Write only when you're starting fresh or rewriting completely. Read before you edit, every time.
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-claude-code-read-vs-edit-creators
What is the main idea of "Reading vs Editing: When To Use Read+Edit vs Write"?
Which concept is most central to "Reading vs Editing: When To Use Read+Edit vs Write"?
Which use of AI fits this topic best?
What should a careful learner remember about "Edit beats Write for existing files"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about Read tool be treated?
Name one way to verify an AI answer about Read tool.
Which action would help you apply "Reading vs Editing: When To Use Read+Edit vs Write" responsibly?