Master Claude Code: 10 Advanced Tips to Turn AI into Your Engineering Partner

This guide distills Boris Cherny's ten advanced Claude Code strategies—covering parallel worktrees, plan‑mode design, rule‑based documentation, skill automation, efficient bug fixing, reviewer prompts, terminal enhancements, sub‑agents, data analysis, and learning techniques—into actionable steps and a ready‑to‑use workflow appendix.

Architect
Architect
Architect
Master Claude Code: 10 Advanced Tips to Turn AI into Your Engineering Partner

Introduction

Many developers use Claude Code either as a simple Copilot or as a "black‑box" that runs without supervision, which often leads to wasted effort. Boris Cherny’s ten advanced secrets reframe Claude as a schedulable teammate, encouraging engineers to treat it like a colleague and run engineering problems through structured workflows.

Four Core Keywords

Parallel : Use git worktree to run multiple tasks simultaneously.

Plan First : Adopt a Plan Mode for complex tasks instead of forcing execution.

Rule‑Based Documentation : Capture recurring errors in CLAUDE.md to prevent repeats.

Reduce Switching Cost : Automate repetitive work with skills, MCP, and sub‑agents.

10‑Tip Quick Reference

1) Open 3‑5 git worktree instances; each worktree gets a clean Claude session.

2) Use Plan Mode for complex tasks and include acceptance criteria.

3) After each Claude mistake, update CLAUDE.md to create a "project constitution".

4) Turn daily repeated actions into skills or slash commands.

5) When fixing bugs, provide reproduction steps and tell Claude to "fix the failing CI tests".

6) Advance prompts by making Claude act as reviewer, prove execution, or rewrite for a better solution.

7) Pin context and branch info to the terminal status line with /statusline.

8) Use sub‑agents for task delegation and, if needed, hook them to automatically approve safe requests.

9) Let Claude run data analysis via CLI tools like bq and generate reusable analysis templates.

10) Enable learning mode: configure /config for explanatory output, generate HTML slides, draw ASCII diagrams, or create spaced‑repetition skills.

Detailed Tips

01 | Parallel: One Task per Worktree

Claude Code’s team recommends opening three to five worktrees so each task runs in an isolated Git context.

# Create a new worktree with a new branch
git worktree add ../project-feature-a -b feature-a

# Or create a worktree from an existing branch
git worktree add ../project-bugfix bugfix-123

Benefits:

Cleaner session context without cross‑pollution.

When one task stalls, you can switch to another without stopping work.

Optional: define shell aliases (e.g., za, zb, zc) for one‑click switching.

02 | Plan Mode: Design Before Execution

Plan Mode reduces rework; safety is a side effect. Typical flow:

Claude writes an initial plan.

A second Claude, acting as a "Staff Engineer", reviews the plan.

If execution deviates, switch back to Plan Mode and re‑plan.

Example command: claude --permission-mode plan Prompt structure:

> Analyze the current state without modifying files.
> Provide a plan with:
1) State summary (key files)
2) Goals & non‑goals
3) Implementation steps (by PR)
4) Risk list with mitigations
5) Verification checklist (commands)
6) Rollback plan

03 | CLAUDE.md: Encode Corrections as Rules

After Claude makes a mistake, immediately append a line to CLAUDE.md so the error is not repeated.

> Update CLAUDE.md to ensure this mistake never happens again.

Team practice: maintain a notes directory per task, update it after each PR, and reference it from CLAUDE.md. This separates rules ( CLAUDE.md) from evidence ( notes).

04 | Skills: Automate Repeated Work

When an action occurs more than once, turn it into a skill or command.

Create a /techdebt command that scans for repeated code at session end.

Build a one‑click context snapshot command that exports recent Slack, Drive, Asana, and GitHub activity.

Develop vertical agents (e.g., an analytics‑engineer agent) to write dbt scripts, run analyses, and review code.

05 | Bug Fixing: Provide Evidence, Reduce Manual Steps

Strategy:

Paste a Slack MCP thread and issue a simple fix command.

For CI failures, issue Go fix the failing CI tests. directly.

For runtime issues, feed Docker logs as evidence and ask Claude to explain the root cause before suggesting a fix.

06 | Prompt Advanced: Make Claude a Reviewer, Not a Typist

Three powerful prompts:

> Rigorously question my code changes. Do not create a PR until you pass your own tests.
> Prove this works. Compare main vs. feature branch and list what you verified.
> Based on all information, discard the current solution and implement a more elegant one.

07 | Terminal & Environment: Surface Context Costs

Use /statusline to pin current context usage and Git branch in the terminal status bar. Voice dictation can also speed up prompt creation.

08 | Sub‑Agents & Hooks: Divide Work and Guard Access

Invoke sub‑agents with use subagents to offload heavy reasoning or isolated tasks, keeping the main session clean. Hooks can route privileged requests to a stronger model for automatic security checks—run first in a non‑production environment.

09 | Data Analysis: Let Claude Pull Metrics via CLI

Claude can call bq (BigQuery CLI) to fetch and analyze data, even for users unfamiliar with SQL. The same pattern works with any CLI, MCP, or API.

Ask Claude to retrieve data.

Ask Claude to explain fluctuations.

Ask Claude to generate a reusable analysis template.

10 | Learning: Make Claude Explain the "Why"

Learning‑oriented tricks:

Set /config to Explanatory or Learning mode so Claude explains each change.

Ask Claude to generate an HTML slide deck for unfamiliar code.

Request ASCII architecture diagrams for protocols or data flows.

Implement spaced‑repetition skills: Claude asks follow‑up questions, you fill gaps, and results are recorded.

Underlying Model: A Combined Punch‑Card

Space‑for‑time: parallel worktrees.

Design‑over‑code: Plan Mode first.

Digital memory: continuously evolve CLAUDE.md.

Tooling & automation: skills, MCP, sub‑agents reduce context switches.

Running these steps turns Claude from a code‑writing assistant into a full‑blown engineering system scheduler.

Appendix | 12 Common‑Workflow Prompts (Copy‑Ready)

These prompts are taken from the official Claude Code documentation and ordered from repository reading to delivery.

1) Read Repository

> give me an overview of this codebase
> explain the main architecture patterns used here
> what are the key data models?

2) Find Relevant Code

> find the files that handle user authentication
> how do these authentication files work together?
> trace the login process from front‑end to database

3) Fix Bug (with Reproduction)

> I'm seeing an error when I run npm test
> suggest a few ways to fix the @ts-ignore in user.ts
> update user.ts to add the null check you suggested

4) Refactor (Preserve Behavior)

> find deprecated API usage in our codebase
> refactor utils.js to use ES2024 features while maintaining the same behavior
> run tests for the refactored code

5) Use Sub‑Agents for Division of Labor

> /agents
> use the code‑reviewer subagent to check the auth module
> have the debugger subagent investigate why users can't log in

6) Plan Mode (Analyze‑then‑Plan)

claude --permission-mode plan
> Analyze the authentication system and suggest improvements

7) Write Tests (Find Gaps First)

> find functions in NotificationsService.swift that are not covered by tests
> add tests for the notification service
> run the new tests and fix any failures

8) Create PR

> /commit-push-pr
> summarize the changes I've made to the authentication module
> enhance the PR description with more context about the security improvements

9) Document

> find functions without proper JSDoc comments in the auth module
> add JSDoc comments to the undocumented functions in auth.js
> check if the documentation follows our project standards

10) Use Image as Context

> What does this image show?
> Here's a screenshot of the error. What's causing it?
> Generate CSS to match this design mockup

11) Reference Files/Resources with @

> Explain the logic in @src/utils/auth.js
> What's the structure of @src/components?
> Show me the data from @github:repos/owner/repo/issues

12) Pipe‑In/Out Command‑Line Component

cat build-error.txt | claude -p 'concisely explain the root cause of this build error' > output.txt
cat data.txt | claude -p 'summarize this data' --output-format text > summary.txt

References

https://x.com/bcherny/status/2017742741636321619
https://code.claude.com/docs/en/common-workflows
https://code.claude.com/docs/en/terminal-config
https://code.claude.com/docs/en/skills
https://code.claude.com/docs/en/hooks
AIprompt engineeringsoftware developmentGit
Architect
Written by

Architect

Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.