Every command, file path, and setup step from the complete 10-tip Claude Code workflow system — including the 5 tips not shown in the post.
This guide is reviewed for clarity, service accuracy, and AI-search readability. The next quarterly content review is tracked internally before unsupported metrics or client proof are added.
Most people use Claude Code the same way they use a search bar — one question, one answer, repeat. That's fine for demos. It's not how the engineers shipping full products in a weekend are working.
The difference is systems. Every tip below makes the next session faster than the last. By the end, you have a setup that compounds — not a tool you're fighting against.
This is the full ten-tip system. The first five are the popular ones. The next five are where the real depth lives.
Part 1: The 5 Core Workflow Shifts
Tip 1: Turn Repeat Tasks Into Skills
A skill is a reusable slash command backed by a markdown file. You run /techdebt and Claude executes the full instruction set — no re-typing, no copy-pasting from a notes doc.
Where skills live:
promptyour-project/ └── .claude/ └── skills/ ├── techdebt.md ├── review.md └── deploy.md
Skills inside your project's .claude/skills/ are project-scoped. Skills in ~/.claude/skills/ are available across every project on your machine. Both directories work at the same time.
Create your first skill — /techdebt:
bashmkdir -p .claude/skills
Create .claude/skills/techdebt.md:
markdown--- name: techdebt description: Find duplicated code, dead imports, and fixable tech debt at end of session --- Scan the codebase for: 1. Duplicated functions or logic blocks (3+ identical lines across files) 2. Unused imports and dead variables 3. TODO and FIXME comments with no associated ticket or owner 4. Functions longer than 50 lines that could be split For each finding, report: file path, line number, issue type, and the recommended fix. After reporting, ask: "Fix all of these now, or save a list for the next session?"
Commit it so the whole team has the command:
bashgit add .claude/skills/techdebt.md git commit -m "add /techdebt skill"
Run /techdebt in any Claude Code session. It loads the full instruction set automatically.
Skills directory with a few starters:
prompt.claude/skills/ ├── techdebt.md → /techdebt — finds and fixes code debt ├── review.md → /review — pre-PR code review checklist ├── deploy.md → /deploy — deployment preflight steps └── standup.md → /standup — summarizes today's changes for a standup note
Tip 2: Throw More Compute at Problems
When a task is complex, parallelism beats a longer prompt. Add "use subagents" to your request and Claude spawns multiple focused agents in parallel. The main context stays clean. Each agent handles a piece.
Basic subagent invocation:
promptAdd auth to the checkout flow. Use subagents — one for backend validation, one for frontend state, one for tests.
That's it. Claude handles the routing.
Route permission requests to Opus for smarter gatekeeping:
When subagents run commands, they ask for permission. You can intercept those requests with a hook and pass them to a more capable model (Opus) instead of stopping your flow every time.
Add a PreToolUse hook to .claude/settings.json:
json{ "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "claude -p "You are a senior engineer. Review this bash command and decide whether to approve or block it. Reply only with: {\"decision\":\"approve\"} or {\"decision\":\"block\",\"reason\":\"state why\"}" --model claude-opus-4-5" } ] } ] } }
Start with "matcher": "Bash" to scope it to shell commands only. Expand to other tool types once you've confirmed the behavior is what you want.
Tip 3: Plan First, Prompt Second
One-shot implementations work when the plan is airtight. Plan mode forces that step before a single line of code is written.
Enter Plan mode:
Press Shift-Tab twice in Claude Code. Claude produces a plan and stops — it will not take any action until you approve.
The loop that gets you to a clean 1-shot implementation:
- Press
Shift-Tabtwice to activate Plan mode - Describe the feature or fix in full — include constraints, edge cases, affected files
- Read the plan. Push back on anything vague or missing
- Optional but high-leverage: paste the plan into a second Claude session and ask it to "review this plan as a staff engineer and flag any gaps"
- Once the plan is solid, confirm execution
This single habit removes most mid-task course corrections. The time you spend sharpening the plan is recovered in fewer revisions.
Tip 4: Train Claude With One File
CLAUDE.md is Claude's memory for your project. It loads at the start of every session. The more specific it is, the less you have to re-explain.
The self-training loop is simple: every time you correct Claude, end with:
promptUpdate CLAUDE.md so you never make this mistake again.
Claude writes the rule in its own words. Three months of this gives you 200 lines of project-specific guidance that Claude inherits automatically — written by Claude, for Claude.
Drop this starter file into any new project:
Create CLAUDE.md in your project root:
markdown# Project: [Your Project Name] ## Stack - Language: [e.g., TypeScript, Python] - Framework: [e.g., Next.js, FastAPI] - Database: [e.g., Postgres, Supabase] - Deploy: [e.g., Vercel, Railway] ## Code Standards - Functions stay small. Max 40 lines. Split anything longer. - Comments explain WHY only. Never describe what the code does. - No new dependencies without asking first. - No temporary fixes. Find root causes. ## Workflow - Read a file before editing it. - Run tests after any change to a core module. - Never mark a task done without proving it works. - If a fix feels hacky, say so and propose the clean solution. ## Verification Commands - Test: [your test command, e.g. npm test] - Lint: [your lint command, e.g. npm run lint] - Build: [your build command, e.g. npm run build] ## Learned Rules <!-- Claude appends corrections here automatically --> <!-- After any mistake: "Update CLAUDE.md so you never do this again." -->
Commit it and let it grow:
bashgit add CLAUDE.md git commit -m "add CLAUDE.md starter"
Tip 5: Run 5 Claudes at the Same Time
Git worktrees give each Claude Code session its own branch and filesystem state. They don't conflict. They all run concurrently. You check in on each one when it sends a notification.
Set up 3 parallel worktrees from your main repo:
bashgit worktree add ../my-project-feat-a -b feat/agent-a git worktree add ../my-project-feat-b -b feat/agent-b git worktree add ../my-project-feat-c -b feat/agent-c
Open each in a new terminal and start Claude:
bash# Terminal 1 cd ../my-project-feat-a && claude # Terminal 2 cd ../my-project-feat-b && claude # Terminal 3 cd ../my-project-feat-c && claude
Or use Claude Code's -w flag to create the worktree and start a session in one step:
bashclaude -w feat/agent-a claude -w feat/agent-b claude -w feat/agent-c
Each session runs in isolation on its own branch. Notifications fire when Claude needs input. You only switch to a session when it asks — not constantly.
Clean up when all work is merged:
bashgit worktree remove ../my-project-feat-a git worktree remove ../my-project-feat-b git worktree remove ../my-project-feat-c
Part 2: The 5 Additional Workflow Shifts
These come from the official Claude Code documentation. The core five get the most attention; these are what separates the good setups from the ones that truly don't degrade over time.
Tip 6: Give Claude a Way to Verify Its Own Work
Claude works better when it can check its output. Without a verification step, Claude estimates correctness. With one, it proves it.
Add verification commands to your CLAUDE.md:
markdown## Verification Commands - Lint: npm run lint - Tests: npm test - Build: npm run build - Type check: npx tsc --noEmit After any code change, run the relevant command and show me the output before marking the task done.
Then make it explicit in your prompts:
promptFix the broken cart logic. After your fix, run npm test and paste the output before you call it done.
This one change eliminates the most common failure mode: Claude making a change that looks right but breaks something downstream. The test proves it. If the test fails, Claude fixes it. You don't find out at commit time.
Tip 7: Use Rules Files for Modular Constraints
CLAUDE.md handles project-wide context. Rules files let you break specific constraint sets into their own files — security rules, style rules, API contract rules — so they can be maintained and shared independently.
Create the rules directory:
bashmkdir -p .claude/rules
Example: a security rules file — .claude/rules/security.md:
markdown# Security Rules - Never log sensitive data: passwords, tokens, API keys. - Sanitize all user input before any database operation. - Credentials go in environment variables only — never hardcoded. - Flag any third-party dependency not updated in 12+ months. - Never expose stack traces in API responses.
Reference it from CLAUDE.md:
markdown@rules/security.md
Rules files are committed to git. Every team member gets them. You can update a rules file without touching CLAUDE.md. Hypd uses this pattern to keep security and style rules decoupled — each can be changed, reviewed, and versioned on its own track.
Tip 8: Connect MCP Servers to Expand Claude's Toolset
MCP (Model Context Protocol) servers are external processes that give Claude direct access to databases, APIs, and services beyond the local filesystem. Instead of pasting your schema into the chat, Claude queries it live.
Add a Postgres server in .claude/settings.json:
json{ "mcpServers": { "postgres": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"] } } }
Now Claude can query your database directly during any session — no manual schema copying.
Check which servers are active in a session:
prompt/mcp
Common MCP servers to add:
@modelcontextprotocol/server-postgres— direct database access@modelcontextprotocol/server-filesystem— extended file operations@modelcontextprotocol/server-github— read issues, PRs, and repo metadata
Each server you add makes Claude more capable without making your prompts longer.
Tip 9: Manage Your Context Window Deliberately
A 30,000-token context full of stale conversation is slower and less focused than a 5,000-token context with only the relevant files. Context hygiene is a skill.
Clear conversation history without ending the session:
prompt/clear
CLAUDE.md, skills, and settings persist. Only the conversation history is wiped.
Compress context without clearing it:
prompt/compact
This summarizes the current conversation thread into a tighter form, freeing up space for new work while keeping the session's understanding intact.
Start fresh for large tasks:
For anything touching more than 4–5 files, open a new session entirely. Pass relevant context through CLAUDE.md instead of relying on a long conversation thread. Fresh context beats a cluttered one.
The habit: at the end of every task, run /clear. Start the next task clean. Your response quality will noticeably improve within a week.
Tip 10: Run Claude Headless for Automation Pipelines
Claude Code has a headless mode. Pass a prompt with the -p flag and Claude runs once, outputs the result, and exits. No UI, no back-and-forth — just execution. This is how you embed Claude into scripts, CI pipelines, and cron jobs.
One-shot prompt from the CLI:
bashclaude -p "Review this diff for security issues and output a JSON array of findings." < my.diff
Run a skill headlessly and save the output:
bashclaude -p "/techdebt" --output-format json > techdebt-report.json
Use Claude as a pre-commit reviewer:
Create .git/hooks/pre-commit:
bash#!/bin/sh git diff --cached | claude -p "Check this diff for obvious bugs. If you find any, print them and exit with code 1. If the diff looks clean, exit with code 0."
bashchmod +x .git/hooks/pre-commit
Now Claude reviews every commit before it lands. No prompting required.
CLAUDE.md Starter Template
Drop this into any new project. Commit it immediately. Let it grow session by session.
markdown# Project: [Name] ## Stack - Language: - Framework: - Database: - Deploy: ## Code Standards - Functions stay small. Max 40 lines. Split anything longer. - Comments explain WHY only. Never describe what the code does. - No new dependencies without asking first. - No temporary fixes — find root causes. - No backwards-compatibility hacks for removed code. Delete it. ## Workflow - Read a file before editing it. - Run tests after any change to a core module. - Never mark a task done without proving it works. - If a fix feels hacky, say so and propose the clean version. ## Verification Commands - Test: [your test command] - Lint: [your lint command] - Build: [your build command] ## Rules <!-- Reference modular rule files here, e.g.: --> <!-- @rules/security.md --> <!-- @rules/style.md --> ## Learned Rules <!-- Claude appends corrections here automatically --> <!-- After any mistake, end with: "Update CLAUDE.md so you never do this again." -->
Worktree Setup Script
Save this as setup-worktrees.sh in your repo root. Pass the task names as arguments.
bash#!/bin/bash # Usage: ./setup-worktrees.sh auth-refactor api-tests ui-updates set -e REPO=$(git rev-parse --show-toplevel) PARENT=$(dirname "$REPO") PROJECT=$(basename "$REPO") for TASK in "$@"; do BRANCH="feat/${TASK}" DEST="${PARENT}/${PROJECT}-${TASK}" git worktree add "$DEST" -b "$BRANCH" echo "" echo "Created: $DEST" echo "Branch: $BRANCH" echo "Start: cd $DEST && claude" done echo "" echo "Open each path above in a separate terminal and run: claude" echo "Clean up later: git worktree remove <path>"
bashchmod +x setup-worktrees.sh ./setup-worktrees.sh auth-refactor api-tests ui-updates
Quick-Reference Cheatsheet
| Tip | What To Do | Key File / Command | What It Eliminates |
|---|---|---|---|
| 1. Skills | Reusable slash commands | .claude/skills/[name].md | Retyping the same prompts |
| 2. Subagents | Parallelize complex tasks | Add "use subagents" to prompt | Sequential bottlenecks |
| 2b. Hook | Route permission gates to Opus | PreToolUse in settings.json | Constant permission interruptions |
| 3. Plan mode | Force a plan before execution | Shift-Tab × 2 | Mid-task course corrections |
| 4. CLAUDE.md | Self-training memory file | CLAUDE.md in project root | Repeating corrections session after session |
| 5. Worktrees | Run parallel Claude sessions | git worktree add / claude -w | Waiting for one task to finish before starting another |
| 6. Verify | Give Claude self-check commands | Verification block in CLAUDE.md | "It should work" guesses |
| 7. Rules files | Modular constraint sets | .claude/rules/[topic].md | Bloated CLAUDE.md, hard-to-share conventions |
| 8. MCP servers | Connect DBs and APIs live | mcpServers in settings.json | Pasting schema and context manually |
| 9. Context hygiene | Clear stale context between tasks | /clear or /compact | Slow, confused responses late in a session |
| 10. Headless | Embed Claude in scripts and CI | claude -p "..." | Manual review steps that should be automated |
FAQ
Q: Do skills in .claude/skills/ get shared with my team automatically?
Yes, if you commit them. Skills inside your project's .claude/skills/ directory are part of the repo — anyone who clones it can run the same slash commands. Skills in ~/.claude/skills/ are personal and stay on your machine only. Commit project skills to git. Keep personal productivity shortcuts in your home directory.
Q: Running 5 parallel Claude sessions sounds expensive. Is it worth it?
The cost scales linearly with sessions, but so does throughput. If three tasks each take 20 minutes sequentially (60 minutes total), three parallel sessions finish in roughly 20 minutes. For time-sensitive work, the tradeoff leans toward parallelism quickly. Start with two worktrees to get comfortable with the workflow before scaling to five.
Q: How do I stay on top of multiple worktree sessions without constantly switching between them?
Claude Code sends a system notification when a session stops and needs your input. You don't monitor them — you wait for the ping. Keep each terminal visible in a split-pane setup or separate windows, and you'll catch notifications as they come in without actively watching. The model does the work; you step in only when asked.