Claude Code Mastery: Senior Engineer Workflow

A senior engineer reveals how to use Claude Code as a force multiplier, not just a code generator. Key practices: set up Claude.md for context, use plan mode before coding, create validation loops to catch errors automatically, leverage parallel sessions and subagents for isolated work, and always follow plan-execute-review.

Claude Code Fundamentals

Claude Code is an autonomous agent, not a chatbot

Claude Code is a command-line AI agent that can read files, run commands, edit code, and work through problems autonomously within your real codebase context, unlike chat interfaces where you copy code back and forth.

Most developers use AI wrong

Most developers treat AI like a slightly better Google search, asking random questions. Senior engineers use it as a true force multiplier by thinking through problems systematically, exploring solutions, and automating time-consuming development tasks.

Setup and Initialization

Install Claude Code in your IDE or terminal

Claude Code can be installed as an extension in VS Code or Cursor, automatically pulling open files into context, or run directly in your terminal for command-line workflows.

Run backslash init to generate Claude.md

The first step in any new codebase is running backslash init, which auto-generates Claude.md—an onboarding document for the AI that covers what the project does, where things live, tech stack, conventions, key file paths, and dev commands like how to run tests and build.

Keep Claude.md lean and focused

Claude.md should be 100–200 lines maximum covering essentials only. Longer documents dilute the signal and waste tokens, forcing Claude to re-explore the codebase from scratch on each new session.

Model selection: Opus by default, Sonnet as fallback

Use Opus (highest quality) for complex engineering tasks. Claude automatically switches to Sonnet if usage limits are hit. Haiku is available for lightweight tasks.

Core Workflows and Habits

Always use plan mode before writing code

Plan mode makes Claude read your codebase and lay out a full implementation plan—which files change, logic flow, and risks—before touching any code. You can review and edit the plan before execution, preventing hours of debugging wrong solutions.

Use backslash clear between tasks

Clear the context window after each task by typing backslash clear. A finite context window degrades performance, causing Claude to make weird decisions and lose track of constraints. Each task should be a clean session with fresh context.

Create custom slash commands for repeated workflows

Save prompts as slash commands in a .claude_commands folder (plain markdown). Anything done more than once a week should have a slash command—e.g., a PR summary command that writes rear-facing descriptions, risks, and test instructions.

Validation and Error Catching

Build a self-validation loop with hooks

Wire up build, test, and type-checker hooks that run automatically after every change Claude makes. Claude sees failures immediately, understands what broke, and fixes it without intervention. Setup takes about 20 minutes and dramatically improves output quality.

Parallel and Distributed Work

Run parallel Claude Code sessions for independent tasks

Open Claude Code in multiple IDE panels pointing at different problems (e.g., bug fix and new components). As long as they work in separate files, they won't conflict. For more serious parallel work, use Git worktrees to check out multiple branches simultaneously.

Use subagents to delegate isolated work

Define subagents in a .claude_agents folder, each with its own name, allowed rules, and focus instructions. Your main Claude session delegates tasks (e.g., security review, database query) to specialized subagents, keeping the main session clean and preventing reasoning from bleeding between tasks.

Encode workflows as skills for reusability

A skill is a markdown file encoding a complete workflow (e.g., code review, refactor, release). Unlike slash commands (quick one-action triggers), skills are full playbooks with multi-step logic, file references, and subagent invocation. Skills travel with your codebase as institutional knowledge.

Advanced Integration

MCP servers extend Claude beyond local code

Model Context Protocol (MCP) lets Claude Code reach external services like GitHub, Slack, databases, and Perplexity. Configure once, then Claude can pull PR comments, check Slack for design feedback, or query databases before writing code—transforming it from a code writer to an autonomous engineer.

Universal Best Practices

Be specific in prompts

Vague prompts produce vague code. Precisely describe what you want, which files to touch, constraints, and expected behavior. Specificity directly improves output quality.

Break work into small steps

Handing Claude massive tasks leads to code spanning many files and breaking multiple things, making debugging hard. Small-scope prompts produce tighter, more reviewable diffs that can be fixed in minutes.

Always follow plan-execute-review sequence

Plan before touching code, execute in small steps, review before merging. Every Claude Code feature (plan mode, validation loops, subagents, skills) enforces one of these three phases. Building this habit makes all tools more effective.

Quick Reference Checklist

Setup and ongoing practices checklist

Set up Claude.md, use plan mode before coding, clear context between tasks, create slash commands for repeat workflows, wire up validation loops, use parallel agents and subagents for isolated work, encode workflows as skills, follow plan-execute-review, and leverage MCP servers for external integration.

Notable quotes

Most developers are using AI like a slightly better Google search, but as a senior engineer, that's not how you should be using it. — Maddy Zhang
There's a huge difference between using Claude Code just as a fancy chatbot and using it as a true force multiplier. — Maddy Zhang
Plan before you touch code, execute in small steps, and review before you merge. — Maddy Zhang

Action items

  • Run backslash init in your codebase to generate Claude.md, covering project description, file structure, tech stack, conventions, and dev commands.
  • Set up a validation loop by configuring hooks to run build, tests, and type-checker after every Claude change.
  • Create your first slash command for a workflow you repeat more than once a week (e.g., PR summaries).
  • Enable plan mode and review the implementation plan before letting Claude write any code.
  • Set up Git worktrees or multiple IDE panels to run parallel Claude Code sessions on independent tasks.
  • Configure MCP servers (GitHub, Slack, databases) to extend Claude's access beyond local code.
  • Adopt the plan-execute-review sequence for all Claude Code workflows.
Maddy Zhang
10 min video
3 min read
Claude Code Mastery: Senior Engineer Workflow
You just saved 7 min.
The big takeaway
A senior engineer reveals how to use Claude Code as a force multiplier, not just a code generator. Key practices: set up Claude.md for context, use plan mode before coding, create validation loops to catch errors automatically, leverage parallel sessions and subagents for isolated work, and always follow plan-execute-review.
Claude Code Fundamentals
Claude Code is an autonomous agent, not a chatbot
Claude Code is a command-line AI agent that can read files, run commands, edit code, and work through problems autonomously within your real codebase context, unlike chat interfaces where you copy code back and forth.
Most developers use AI wrong
Most developers treat AI like a slightly better Google search, asking random questions. Senior engineers use it as a true force multiplier by thinking through problems systematically, exploring solutions, and automating time-consuming development tasks.
Setup and Initialization
Install Claude Code in your IDE or terminal
Claude Code can be installed as an extension in VS Code or Cursor, automatically pulling open files into context, or run directly in your terminal for command-line workflows.
Run backslash init to generate Claude.md
The first step in any new codebase is running backslash init, which auto-generates Claude.md—an onboarding document for the AI that covers what the project does, where things live, tech stack, conventions, key file paths, and dev commands like how to run tests and build.
Keep Claude.md lean and focused
Claude.md should be 100–200 lines maximum covering essentials only. Longer documents dilute the signal and waste tokens, forcing Claude to re-explore the codebase from scratch on each new session.
100–200 lines
Optimal Claude.md length
Longer documents dilute signal and waste tokens
Model selection: Opus by default, Sonnet as fallback
Use Opus (highest quality) for complex engineering tasks. Claude automatically switches to Sonnet if usage limits are hit. Haiku is available for lightweight tasks.
1
Opus
Highest quality, complex tasks
2
Sonnet
Fallback when limits hit
3
Haiku
Lightweight tasks
Claude model selection hierarchy
Core Workflows and Habits
Always use plan mode before writing code
Plan mode makes Claude read your codebase and lay out a full implementation plan—which files change, logic flow, and risks—before touching any code. You can review and edit the plan before execution, preventing hours of debugging wrong solutions.
Use backslash clear between tasks
Clear the context window after each task by typing backslash clear. A finite context window degrades performance, causing Claude to make weird decisions and lose track of constraints. Each task should be a clean session with fresh context.
Create custom slash commands for repeated workflows
Save prompts as slash commands in a .claude_commands folder (plain markdown). Anything done more than once a week should have a slash command—e.g., a PR summary command that writes rear-facing descriptions, risks, and test instructions.
Validation and Error Catching
Build a self-validation loop with hooks
Wire up build, test, and type-checker hooks that run automatically after every change Claude makes. Claude sees failures immediately, understands what broke, and fixes it without intervention. Setup takes about 20 minutes and dramatically improves output quality.
1
Claude makes a code change
2
Build step runs automatically
3
Tests run automatically
4
Type checker runs automatically
5
Claude sees failures and fixes them
6
Green CI output
Self-validation loop workflow
Parallel and Distributed Work
Run parallel Claude Code sessions for independent tasks
Open Claude Code in multiple IDE panels pointing at different problems (e.g., bug fix and new components). As long as they work in separate files, they won't conflict. For more serious parallel work, use Git worktrees to check out multiple branches simultaneously.
Use subagents to delegate isolated work
Define subagents in a .claude_agents folder, each with its own name, allowed rules, and focus instructions. Your main Claude session delegates tasks (e.g., security review, database query) to specialized subagents, keeping the main session clean and preventing reasoning from bleeding between tasks.
Encode workflows as skills for reusability
A skill is a markdown file encoding a complete workflow (e.g., code review, refactor, release). Unlike slash commands (quick one-action triggers), skills are full playbooks with multi-step logic, file references, and subagent invocation. Skills travel with your codebase as institutional knowledge.
Advanced Integration
MCP servers extend Claude beyond local code
Model Context Protocol (MCP) lets Claude Code reach external services like GitHub, Slack, databases, and Perplexity. Configure once, then Claude can pull PR comments, check Slack for design feedback, or query databases before writing code—transforming it from a code writer to an autonomous engineer.
Universal Best Practices
Be specific in prompts
Vague prompts produce vague code. Precisely describe what you want, which files to touch, constraints, and expected behavior. Specificity directly improves output quality.
Break work into small steps
Handing Claude massive tasks leads to code spanning many files and breaking multiple things, making debugging hard. Small-scope prompts produce tighter, more reviewable diffs that can be fixed in minutes.
Large task
15 files, 3 breaks
Small steps
2 files, 1 break
Impact of breaking work into smaller steps
Always follow plan-execute-review sequence
Plan before touching code, execute in small steps, review before merging. Every Claude Code feature (plan mode, validation loops, subagents, skills) enforces one of these three phases. Building this habit makes all tools more effective.
1
Plan: Review implementation strategy
2
Execute: Make changes in small steps
3
Review: Check before merging
Universal workflow sequence
Quick Reference Checklist
Setup and ongoing practices checklist
Set up Claude.md, use plan mode before coding, clear context between tasks, create slash commands for repeat workflows, wire up validation loops, use parallel agents and subagents for isolated work, encode workflows as skills, follow plan-execute-review, and leverage MCP servers for external integration.
Worth quoting
"Most developers are using AI like a slightly better Google search, but as a senior engineer, that's not how you should be using it."
— Maddy Zhang, at [0:00]
"There's a huge difference between using Claude Code just as a fancy chatbot and using it as a true force multiplier."
— Maddy Zhang, at [0:30]
"Plan before you touch code, execute in small steps, and review before you merge."
— Maddy Zhang, at [9:05]
Try this
Run backslash init in your codebase to generate Claude.md, covering project description, file structure, tech stack, conventions, and dev commands.
Set up a validation loop by configuring hooks to run build, tests, and type-checker after every Claude change.
Create your first slash command for a workflow you repeat more than once a week (e.g., PR summaries).
Enable plan mode and review the implementation plan before letting Claude write any code.
Set up Git worktrees or multiple IDE panels to run parallel Claude Code sessions on independent tasks.
Configure MCP servers (GitHub, Slack, databases) to extend Claude's access beyond local code.
Adopt the plan-execute-review sequence for all Claude Code workflows.
Made with Glimpse by Wozart
glimpse.wozart.com/v/we0j9em2
Share this infographic

More like this