workflowContext Engineering1 min read
Writer / Reviewer Pattern
A second Claude session reviewing code it didn't write catches more than a self-review.
Split implementation and review across two separate Claude sessions. The reviewer has no attachment to the implementation and brings fresh eyes — exactly what a real code review should do.
Why It Works
When Claude reviews code it just wrote, it's biased. It knows what it was trying to do, so it skips the surprises and doesn't read carefully. A fresh session has no memory of the implementation choices. It reads only what's in the file — the same way a human reviewer does.
The Setup
Run two terminal windows with separate Claude Code sessions:
- Session A (Writer):
implement a rate limiter for our API endpoints - Session B (Reviewer — fresh terminal):
review the rate limiter in @src/middleware/rateLimiter.ts. look for edge cases, race conditions, and consistency with our existing middleware patterns. be specific. - Session A again:
here's the review feedback: [paste Session B output]. address these issues.
Session B knows nothing about what Session A built. It reads only what's on disk.
Extend the Pattern
- Test-first variant: Session A writes tests. Session B writes the implementation to pass them.
- Security review:
use a subagent to review this PR for auth bypasses and injection vulnerabilities - Architecture check: have the reviewer compare output against your CLAUDE.md anti-patterns before the code merges
More in Context Engineering
- 2 min readCLAUDE.md That Actually WorksStop re-explaining your project to every new agent session.Read
- 4 min readAGENTS.md — One File, Every AgentThe open standard that makes your project context portable across Claude Code, Cursor, Codex, Copilot, and 20+ other agents. Write it once, every agent reads it.Read
- 5 min readWriting Your Own SkillsThis hub is full of skills other people wrote. The compounding win is writing your own. A skill is how you encode your team's process once and have every agent follow it the same way.Read
