10 Proven Claude Code Tips to Supercharge Your Development Workflow

This guide consolidates Boris Cherny’s internal practices and official best‑practice documentation into ten actionable techniques that help you manage Claude Code’s context window, plan work, automate repetitive tasks, run parallel sessions, and use prompts effectively for faster, higher‑quality software development.

Su San Talks Tech
Su San Talks Tech
Su San Talks Tech
10 Proven Claude Code Tips to Supercharge Your Development Workflow

Fundamental: The Context Window Is Your Most Valuable Resource

Claude operates on a limited context window that works like a whiteboard; every message, file read, and command consumes space, and once it fills up Claude’s performance degrades. All subsequent tips aim to use that whiteboard more efficiently.

上下文窗口示意图
上下文窗口示意图

Tip 1: Let Claude Self‑Validate Its Work

Instead of manually checking Claude’s output, embed validation criteria directly in the prompt so Claude can run its own tests and report results.

Prompt example:

Write a validation function for email addresses. Test cases: [email protected] should pass, hello@ should fail, @domain.com should fail. Run the tests and tell me the results.

This forces Claude to produce verifiable code and reduces human QA effort.

Tip 2: Plan Before You Code

Use Claude’s Plan Mode to read files, understand project structure, and generate a detailed execution plan before any code is written.

Enter Plan Mode and let Claude explore relevant files.

Ask Claude to produce a full plan: which files to modify, order of changes, and potential pitfalls.

Review the plan yourself and make adjustments.

Switch back to normal mode and execute the plan.

After execution, have Claude generate a clear commit message.

Some teams even run a second Claude as a senior engineer to review the plan before coding.

Boris Cherny:Tip 2 Plan Mode
Boris Cherny:Tip 2 Plan Mode

Tip 3: CLAUDE.md – Your Persistent Rule File

Place a CLAUDE.md file in the project root; Claude reads it on every start and follows the rules inside, eliminating the need to repeat the same instructions.

Use ES modules only, no CommonJS.

Never use mocks in tests.

Run the linter after every change.

Branch naming convention: feature/ticket-号 Update CLAUDE.md whenever Claude makes a mistake, so the rule becomes part of the evolving system.

⚠️ Note: Keep CLAUDE.md concise; each line should correspond to a real error you’ve observed. Overly long files cause Claude to ignore details.

Boris Cherny:Tip 3 CLAUDE.md
Boris Cherny:Tip 3 CLAUDE.md

Tip 4: Parallel Sessions as an Efficiency Lever

Claude Code supports multiple sessions simultaneously. By using Git worktrees, a team can run 3‑5 sessions in parallel, each handling a different task.

Session A : write a new feature.

Session B : review Session A’s code, looking for edge cases and bugs.

Feed B’s feedback back to A.

This “write‑then‑review” pattern yields higher code quality than a single session looping.

Another pattern: Session A writes tests (TDD), Session B implements code to pass those tests, letting Claude handle the TDD workflow automatically.

Boris Cherny:Tip 1 并行 Worktrees
Boris Cherny:Tip 1 并行 Worktrees
并行 Session 工作流
并行 Session 工作流

Tip 5: Bug Fixing by Feeding Raw Data

Instead of describing a bug in words, paste the raw error logs, Slack thread, or Docker output into Claude and simply say “fix.” Claude will locate the offending code, apply a fix, and optionally run the failing tests.

Boris Cherny:Tip 5 Bug Fix
Boris Cherny:Tip 5 Bug Fix

Tip 6: Subagents Keep the Main Context Clean

When a deep investigation is needed, launch a separate Claude sub‑agent that works with its own context. After it finishes, it reports the findings back to the main session, preventing the primary whiteboard from filling up.

Prompt pattern:

Use a sub‑agent to investigate how our payment flow handles failed transactions.
Boris Cherny:Tip 8 子智能体
Boris Cherny:Tip 8 子智能体

Tip 7: Create Skills to Eliminate Repetitive Work

When a task is performed more than once, turn it into a named skill that can be invoked with a single command.

Example skill: /fix-issue 447 Execution steps:

Read GitHub issue #447.

Locate relevant files.

Apply the fix.

Write and run tests.

Create a Pull Request.

Teams also build custom skills such as a BigQuery skill for on‑the‑fly data analysis, and newer skills like /simplify (auto‑review PRs and enforce CLAUDE.md compliance) and /batch (parallel code migrations).

Boris Cherny:新功能 /simplify + /batch
Boris Cherny:新功能 /simplify + /batch

Tip 8: Prompt Techniques for Better Answers

Three counter‑intuitive prompt patterns:

Make Claude Review You : "Question my changes harshly until I pass your tests before opening a PR." This forces Claude into a reviewer role.

Ask Claude to Rewrite Elegantly : After an initial solution, say "You now know all the background. Rewrite this implementation elegantly." Claude often produces a cleaner version.

Require Proof : "Show me the behavioral difference between main and my feature branch to prove this change works." This prevents blind trust in passing tests.

Tip 9: Use /clear, /compact, and Checkpoints to Manage Context

When a session becomes noisy, you can: /clear: hard reset, wiping the entire context. /compact: soft reset, preserving only the parts you specify, e.g., /compact focus on payment integration changes.

Claude automatically creates checkpoints after each change, allowing you to roll back code, conversation, or both even after the terminal is closed.

Tip 10: Treat Claude Code as a Learning Tool

Beyond production, ask Claude explanatory questions about a new codebase, such as how the logging system works, what a function does, or the full user‑login flow. Claude can also generate HTML slides to visualize complex code and conduct spaced‑repetition learning by probing your understanding and tracking gaps.

Prompt example:

What does the project's logging system do?
Explain this function and why it calls method X instead of Y.
Describe the complete user login flow from the first request to session creation.

Generate HTML slides for visual explanations.

Use Claude to quiz you repeatedly, identifying blind spots and reinforcing knowledge.

Common Mistakes and How to Fix Them

Kitchen‑sink session : topics drift in many directions – use /clear to start a fresh task.

Correction loop : fixing the same error three+ times – clear context and rewrite the prompt.

Bloated CLAUDE.md : >500 lines – delete rules that aren’t tied to a concrete error.

Unbounded investigation : Claude reads hundreds of files and exhausts context – limit the investigation scope or use sub‑agents.

Automationsoftware developmentproductivityAI AssistantClaude Code
Su San Talks Tech
Written by

Su San Talks Tech

Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.

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.