If you've ever wondered how the people who build AI tools actually use them, you're in for a treat. Boris, the creator of Claude Code, recently shared his complete workflow on Twitter, and it's a masterclass in maximizing AI-assisted development.
Original Thread - https://x.com/bcherny/status/2007179832300581177
This isn't just about using Claude Code—it's about building an entire development ecosystem around AI that scales, automates, and produces high-quality code consistently.
Let's break down Boris's workflow tweet by tweet, with practical examples you can apply today.
The Setup: 15+ Parallel Claude Sessions
Boris runs Claude Code at an impressive scale:
- 5 terminal instances - Numbered tabs 1-5 with system notifications
- 5-10 web sessions - On claude.ai/code, running in parallel
- iOS app sessions - Started from phone, checked later on desktop
That's 15+ parallel Claude sessions across platforms!
Why This Works
The beauty of this approach is platform synergy:
| Platform | Best For |
|---|---|
| Terminal | Active coding, file edits, running commands |
| Web | Code review, documentation, visual diffs |
| iOS | Quick prompts, starting long tasks, checking progress |
Cross-Platform Commands
Boris uses powerful commands to move between platforms:
# Hand off long-running task to web
> analyze this entire codebase and generate documentation &
# Teleport session back to terminal
claude --teleport <session-id>
The & operator backgrounds tasks to web, while --teleport moves sessions between devices. This is device continuity at its finest.
Model Choice: Opus 4.5 with Thinking Mode
Here's a counterintuitive insight: Boris uses Opus 4.5 with thinking mode for everything.
You might think smaller/faster models save time, but Boris argues the opposite:
Sonnet (fast) → 5 iterations → Total time: 5 minutes
Opus (slow) → 1 iteration → Total time: 2 minutes
The Math
Opus is slower per request, but:
- Less steering needed - Claude gets it right the first time
- Better tool use - Selects and uses tools correctly without guidance
- Fewer iterations - No constant course correction
The real bottleneck isn't AI processing time—it's human time spent steering and correcting.
When to Use Which Model
| Scenario | Sonnet | Opus 4.5 |
|---|---|---|
| Simple one-liners | ✅ Good | ✅ Overkill |
| Multi-file refactoring | ⚠️ Needs guidance | ✅ Autonomous |
| Complex debugging | ⚠️ Multiple iterations | ✅ Fewer iterations |
| Tool-heavy workflows | ⚠️ Manual steering | ✅ Self-directed |
Team Knowledge: CLAUDE.md
The Claude Code team maintains a single shared CLAUDE.md file checked into git. Everyone contributes multiple times per week.
The Feedback Loop
Claude makes mistake
↓
Developer notices
↓
Add pattern to CLAUDE.md
↓
Commit to git
↓
Claude reads CLAUDE.md next session
↓
Claude avoids mistake
What Goes Into CLAUDE.md
# CLAUDE.md for Claude Code Repo
## Common Bash Commands
- npm run build: Build the project
- npm run test: Run test suite
- npm run lint: Run linter
## Code Style Guidelines
- Use TypeScript strict mode
- Prefer const over let
- Use functional patterns over classes
## Repository Etiquette
- Branch naming: feature/description
- Prefer rebase over merge
- Commit messages: conventional commits
## Common Mistakes to Avoid
- Don't modify .claude/ directory directly
- Always run tests before committing
- Don't use deprecated APIs (list them)
Why This Works
- Captures tribal knowledge - Things not in official docs
- Prevents repeated mistakes - Learn once, apply forever
- Scales across teams - Each team optimizes for their codebase
- Version controlled - Track what changed and why
Automated Knowledge Extraction: GitHub Actions
Boris takes CLAUDE.md a step further with automated knowledge extraction:
# PR Comment
@.claude Please review this PR and add any new patterns,
anti-patterns, or conventions to CLAUDE.md that should be
remembered for future work.
The GitHub Action Setup
# Install Claude Code GitHub Action
/install-github-action
This creates a workflow that:
- Triggers when @.claude is tagged in a PR
- Claude analyzes the PR
- Extracts patterns, anti-patterns, conventions
- Updates CLAUDE.md automatically
- Commits the change as part of the PR
Compounding Engineering
This is Dan Shipper's concept in action—knowledge compounds over time rather than being one-off gains.
Week 1: CLAUDE.md has 20 patterns
Week 10: CLAUDE.md has 200 patterns
Week 50: CLAUDE.md has 1000 patterns
Claude gets exponentially smarter about your codebase!
Two-Phase Workflow: Plan Then Execute
Boris uses a disciplined two-phase approach for complex tasks:
Phase 1: Planning (Interactive)
# Start Plan mode
[Shift+Tab][Shift+Tab]
> I need to add user authentication with OAuth
# Claude responds with plan:
## Plan: Add OAuth Authentication
1. Install OAuth library (passport-oauth2)
2. Create OAuth configuration file
3. Add OAuth routes (/auth/login, /auth/callback)
4. Update user model to store OAuth data
5. Create middleware for protected routes
6. Update frontend with login button
7. Add tests for OAuth flow
> Looks good, but can we also add refresh tokens?
# Claude updates plan...
Phase 2: Execution (Automated)
# Switch to auto-accept mode
[Toggle auto-accept]
# Claude executes in one shot
✓ Installing dependencies...
✓ Creating auth routes...
✓ Updating user model...
✓ All files modified
✓ Tests passing
Why This Works
Traditional approach:
"Add feature X" → Claude starts coding →
"Wait, not like that" → Claude adjusts →
Multiple iterations, wasted effort
Boris's approach:
"Add feature X" → Plan mode →
Iterate until plan is perfect →
Auto-accept → Claude executes → Done!
The key insight: A good plan is really important! Invest time upfront in planning, and save way more time in execution.
Slash Commands: Automate Repeated Workflows
Boris creates slash commands for every "inner loop" workflow he does multiple times per day.
Example: /commit-push-pr
---
description: Commit changes, push to remote, and create PR
---
# Git Status
!`git status --short`
# Current Branch
!`git branch --show-current`
# Recent Commits
!`git log -5 --oneline`
Based on git status above:
1. **Stage and commit** changes with a descriptive message
2. **Push** to remote repository
3. **Create PR** with:
- Clear title summarizing changes
- Detailed description of what was done
- Link to any related issues
- Request review from appropriate team members
Use conventional commit format (feat:, fix:, docs:, etc.)
The Power of Inline Bash
The inline bash commands pre-compute context, avoiding back-and-forth:
---
description: Run tests and commit if passing
---
# Test Results
!`npm test 2>&1`
# Type Check
!`npm run typecheck 2>&1`
# Lint
!`npm run lint 2>&1`
If all checks pass:
1. Stage all changes
2. Commit with message: "chore: pass tests and linting"
3. Report success
If any check fails:
1. Report what failed
2. Suggest fixes
3. Don't commit
Where Commands Live
project/
├── .claude/
│ └── commands/
│ ├── commit-push-pr.md
│ ├── test-and-commit.md
│ ├── deploy-staging.md
│ └── ...
└── src/
Commands are checked into git and shared across the team!
Subagents: Specialized AI Assistants
Boris uses subagents for domain-specific tasks:
- code-simplifier - Simplifies code after Claude is done
- verify-app - Tests Claude Code end-to-end with detailed instructions
What Are Subagents?
Subagents are pre-configured AI personalities with:
- Specific purpose and expertise area
- Separate context window (doesn't pollute main conversation)
- Custom system prompts
- Specific tool access
Example: code-simplifier
---
name: code-simplifier
description: Simplify code after Claude is done working. Use proactively after code changes.
tools: Read, Edit, Grep, Glob
model: inherit
---
You are a code simplification expert. Your goal is to make code more readable and maintainable without changing functionality.
Simplification principles:
- Reduce complexity and nesting
- Extract repeated logic into functions
- Use meaningful variable names
- Remove dead code and comments
- Simplify conditional logic
- Apply modern language features
Process:
1. Read the modified files
2. Identify simplification opportunities
3. Apply simplifications
4. Verify tests still pass
5. Report changes made
Never change functionality - only improve readability and maintainability.
Subagents vs Slash Commands
| Aspect | Slash Commands | Subagents |
|---|---|---|
| Purpose | Automate workflows | Specialized expertise |
| Context | Same as main | Separate context window |
| System Prompt | Simple instructions | Detailed, specialized |
| Tool Access | Inherits from main | Can be customized |
| Best For | Multi-step processes | Domain-specific tasks |
Hooks: Automate Everything
PostToolUse Hook for Formatting
Boris uses a PostToolUse hook to format Claude's code automatically:
// .claude/hooks.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "npx prettier --write \"$CLAUDE_FILE_PATH\""
}
]
}
]
}
}
This catches the last 10% of formatting issues that Claude might miss, preventing CI formatting errors.
Why This Matters
Without hook:
Claude writes code → Push to PR → CI fails →
"Formatting errors" → Fix formatting → Push again → CI passes
With hook:
Claude writes code → Hook formats → Push to PR → CI passes ✓
Smart Permissions Management
Boris doesn't use --dangerously-skip-permissions. Instead, he uses /permissions to pre-allow common, safe commands.
What NOT to Do
# ❌ DON'T DO THIS
claude --dangerously-skip-permissions
# This allows Claude to run ANY command without asking!
What to Do Instead
# ✅ DO THIS
/permissions
# Pre-allow specific, safe commands
Bash(git status)
Bash(git diff)
Bash(git commit)
Bash(npm test)
Bash(npm run build)
Example Configuration
// .claude/settings.json
{
"permissions": {
"allowedTools": {
"Bash": {
"allowedCommands": [
"git status",
"git diff",
"git log",
"git commit",
"git push",
"npm test",
"npm run build",
"npm run lint",
"cat",
"ls",
"grep"
]
},
"Edit": {
"allowed": true
},
"Read": {
"allowed": true
}
}
}
}
This approach gives you the convenience of auto-approval for safe operations while maintaining security for unknown commands.
MCP Integration: Connect to All Your Tools
Claude Code uses MCP (Model Context Protocol) to connect to external tools:
- Slack - Post updates, notifications
-
BigQuery - Run analytics queries via
bqCLI - Sentry - Fetch error logs
Example MCP Configuration
// .mcp.json
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-...",
"SLACK_TEAM_ID": "T..."
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"]
}
}
}
Real-World Use Cases
Slack Integration:
> Deploy to staging and notify the team in #deployments
Claude: [Runs deployment]
Claude: [Uses Slack MCP server]
Claude: [Posts to #deployments channel]
✓ Deployment complete, team notified
BigQuery Analytics:
> How many users signed up last week?
Claude: [Uses BigQuery MCP]
Claude: [Runs bq query]
Claude: [Analyzes results]
Last week: 1,247 new users
The .mcp.json file is checked into git and shared with the team!
Long-Running Tasks: Three Approaches
For very long-running tasks, Boris has three strategies:
Option A: Background Agent Verification
> Implement this feature. When you're done,
use a background agent to verify everything works.
Claude: [Implements feature]
Claude: [Launches background agent]
Claude: [Agent runs tests, checks functionality]
Claude: [Agent reports back]
✓ Feature implemented and verified
Option B: Stop Hook (Deterministic)
// .claude/hooks.json
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/verify-work.sh"
}
]
}
]
}
}
#!/bin/bash
# .claude/hooks/verify-work.sh
# Run tests
npm test
# If tests pass, allow exit
if [ $? -eq 0 ]; then
echo "✓ All tests passing"
exit 0
else
echo "✗ Tests failing - continue working"
exit 1 # Block exit
fi
Option C: Ralph Wiggum Plugin (Iterative Loops)
The Ralph Wiggum technique, named after the Simpsons character, embodies persistent iteration despite setbacks.
# Start a Ralph loop
/ralph-loop "Build a REST API for todos. Requirements: CRUD operations, input validation, tests. Output <promise>COMPLETE</promise> when done." --completion-promise "COMPLETE" --max-iterations 50
How Ralph Works:
Iteration 1:
Claude: [Implements basic API]
Claude: [Tries to exit]
Stop Hook: [Tests failing - block exit]
Stop Hook: [Feed same prompt back]
Iteration 2:
Claude: [Sees test failures]
Claude: [Fixes bugs]
Claude: [Tries to exit]
Stop Hook: [Some tests still failing - block exit]
Iteration 3:
Claude: [Fixes remaining bugs]
Claude: [All tests passing]
Claude: [Outputs <promise>COMPLETE</promise>]
Stop Hook: [Completion promise detected - allow exit]
✓ Done!
Real-World Results:
- Generated 6 repositories overnight in Y Combinator hackathon
- Completed $50k contract for $297 in API costs
- Created entire programming language ("cursed") over 3 months
Permission Modes for Long-Running Tasks
To avoid permission prompts blocking long-running tasks:
# Option 1: Don't ask for permissions
claude --permission-mode=dontAsk
# Option 2: Skip all permissions (ONLY IN SANDBOX!)
claude --dangerously-skip-permissions
Use --dangerously-skip-permissions only in isolated, safe environments like Docker containers.
The Most Important Tip: Verification
Boris's final tip is probably the most important:
Give Claude a way to verify its work. If Claude has that feedback loop, it will 2-3x the quality of the final result.
Why Verification is Critical
Without verification:
Claude writes code → Pushes to PR →
CI fails → Bugs in production →
Manual debugging required
With verification:
Claude writes code → Tests it →
Sees failures → Fixes them →
Retests → Iterates until passing →
High-quality code
Verification Methods by Domain
1. Command-Line Verification
---
description: Implement and verify feature
---
Implement user authentication feature.
After implementation, verify by:
1. Running: npm test
2. Running: npm run typecheck
3. Running: npm run lint
4. Testing manually: npm run dev
Only consider complete when all checks pass.
2. Test Suite Verification
---
description: Feature with test verification
---
Add payment processing feature.
Verification requirements:
- Unit tests: npm run test:unit
- Integration tests: npm run test:integration
- E2E tests: npm run test:e2e
- Coverage: npm run test:coverage (must be >80%)
Feature is complete only when:
✓ All test suites passing
✓ Coverage threshold met
✓ No linting errors
✓ TypeScript compilation successful
3. Browser Verification (Chrome Extension)
Boris uses the Claude Chrome extension to test every change to claude.ai/code:
---
description: Browser-verified feature
---
Update user registration flow.
Browser verification:
1. Open http://localhost:3000/register
2. Fill in registration form with test data
3. Submit form
4. Verify success message appears
5. Verify user is logged in
6. Test validation errors (empty fields, invalid email)
7. Test password strength indicator
8. Verify UX feels smooth and responsive
Only complete when all browser tests pass.
4. API Verification
---
description: API-verified endpoint
---
Implement user creation endpoint.
API verification:
1. Test successful creation:
curl -X POST http://localhost:3000/api/users \
-H "Content-Type: application/json" \
-d '{"name":"Test User","email":"test@example.com"}'
2. Test validation errors:
- Missing required fields
- Invalid email format
- Duplicate email
3. Test authentication:
- Without token (should fail)
- With valid token (should succeed)
- With expired token (should fail)
4. Verify response schema matches OpenAPI spec
Only complete when all API tests pass.
Making Verification Rock-Solid
Automated Tests:
npm test # Unit tests
npm run test:integration # Integration tests
npm run test:e2e # End-to-end tests
npm run test:coverage # Coverage reports
Linting & Type Checking:
npm run lint # ESLint/Prettier
npm run typecheck # TypeScript
npm run audit # Security audit
Pre-commit Hooks:
// package.json
{
"husky": {
"hooks": {
"pre-commit": "npm run lint && npm run typecheck && npm test",
"pre-push": "npm run test:integration"
}
}
}
The Investment Pays Off
Setup verification: 1-2 hours initially
Maintain verification: 30 min/week
Without verification: 5-10 hours debugging per feature
With verification: 1-2 hours per feature
ROI: Break-even after 1-2 features, then pure savings!
Putting It All Together
Here's Boris's complete workflow summarized:
- 15+ Parallel Sessions - Terminal, web, iOS
- Opus 4.5 + Thinking - Best model, faster overall
- Team CLAUDE.md - Shared knowledge base
- GitHub Action - Auto-update CLAUDE.md from PRs
- Plan Mode → Auto-Accept - Two-phase workflow
- Slash Commands - Automate repeated workflows
- Subagents - Specialized AI assistants
- PostToolUse Hook - Auto-format code
- Smart Permissions - Pre-allow safe commands
- MCP Integration - Connect to all tools
- Ralph Wiggum - Iterative loops for long tasks
- VERIFICATION - Most important: feedback loop!
Key Takeaways
The Feedback Loop is Everything
Claude writes code
↓
Tests it
↓
Sees failures
↓
Fixes them
↓
Retests
↓
Iterates until passing
↓
High-quality result (2-3x better!)
Invest in Verification
- Make it automated
- Make it comprehensive
- Make it fast
- Make it reliable
- Make it part of every workflow
Start Small, Scale Up
You don't need to implement everything at once. Start with:
- Create a CLAUDE.md - Document your project
- Set up one slash command - Automate a repeated workflow
- Add verification - Give Claude a way to test its work
- Configure permissions - Pre-allow safe commands
- Add a hook - Auto-format code
Then iterate and expand from there.
Resources
- Claude Code Documentation
- Claude Code GitHub
- Slash Commands Reference
- Subagents Guide
- Hooks Guide
- MCP Documentation
- Ralph Wiggum Plugin
- Claude Chrome Extension
Conclusion
Boris's workflow is impressive because it's:
- Scalable - Works for small and large projects
- Team-Oriented - Everything shared via git
- Automated - Minimizes manual work
- Verified - Quality assurance built-in
- Cross-Platform - Works everywhere
The most important lesson: Give Claude a way to verify its work, and it will produce 2-3x better results.
This is the secret sauce that makes Claude Code so powerful for Boris and the Claude Code team. By building a development ecosystem around AI—with shared knowledge, automated workflows, and robust verification—you can transform Claude from a helpful assistant into an autonomous, self-correcting development system.
Start small, iterate often, and watch your productivity soar!
Have you tried any of these techniques? What's your workflow with Claude Code? Share your tips and experiences in the comments!
Top comments (0)