Stop Vibe Coding Blindly! claude-code-best-practice Reveals Agentic Engineering Secrets
What if every AI coding session you ran was 10x more predictable, debuggable, and scalable? Most developers are stuck in "vibe coding" hell—throwing prompts at Claude, hoping something sticks, then drowning in broken context windows and unmaintainable spaghetti code. The pain is real: context rot at 40%, sessions that drift into oblivion, and that sinking feeling when Claude ignores your carefully crafted CLAUDE.md for the eighth time. But here's the secret the top 1% of AI-native engineers already know. There's a systematic path from chaotic prompt-chucking to agentic engineering—and it's all documented in one explosive repository that's been climbing GitHub trending charts like a rocket.
Enter claude-code-best-practice—the definitive field manual for transforming Claude Code from a fancy chatbot into a production-grade engineering partner. Curated by Shayan Rais with contributions from Boris Cherny (the creator of Claude Code itself), this isn't another fluffy tips thread. It's a battle-tested compendium of 83+ pro tips, 12 complete development workflows, cross-model orchestration strategies, and the exact architectural patterns that power Anthropic's own internal development. Ready to stop babysitting Claude and start engineering with agents? Let's dive deep.
What is claude-code-best-practice?
claude-code-best-practice is an open-source knowledge base that codifies the evolution from "vibe coding"—impromptu, unstructured AI assistance—to agentic engineering: systematic, reproducible, multi-agent software development using Claude Code. Created by Shayan Rais (@shanraisshan), this repository has become the unofficial bible for developers serious about AI-native workflows, earning GitHub Trending #1 status and accumulating thousands of stars from engineers at top startups and enterprises.
The repository's tagline says it all: "from vibe coding to agentic engineering - practice makes claude perfect." But what makes this resource genuinely explosive is its provenance. The tips and workflows aren't theoretical—they're harvested from the people who actually built Claude Code. Boris Cherny, Claude Code's creator, contributes regularly. Thariq, an Anthropic engineer who works on the product itself, shares internal context management secrets. Community powerhouses like Matt Pocock, Andrej Karpathy, and Garry Tan have their workflows dissected and catalogued.
Why is this trending now? Because the AI coding landscape just hit an inflection point. Claude Code's v2.1.142 release (May 2026) introduced game-changing features like Auto Mode, Ultrareview, Agent Teams, and Scheduled Tasks—but most developers have zero clue how to wield them effectively. Meanwhile, context windows have ballooned to 1M tokens, creating new failure modes (context rot, "dumb zone" degradation) that require systematic countermeasures. The repository captures this bleeding-edge knowledge before it ossifies into blog posts and courses, making it indispensable for anyone coding with AI in 2026.
Key Features That Separate Pros from Tourists
The repository organizes Claude Code's capabilities into a conceptual taxonomy that reveals how the pieces fit together. Here's what separates agentic engineers from vibe coders:
Core Architectural Primitives
| Primitive | Location | Superpower |
|---|---|---|
| Subagents (Agents) | .claude/agents/<name>.md |
Isolated context windows for specialized tasks—test time compute that actually works |
| Commands | .claude/commands/<name>.md |
Reusable slash commands for daily workflows, version-controlled in git |
| Skills | .claude/skills/<name>/SKILL.md |
Progressive disclosure folders with references, scripts, and examples |
| Workflows | .claude/commands/ |
Orchestrated Command → Agent → Skill chains |
| Hooks | .claude/hooks/ |
Pre/post tool execution automation—formatting, permission routing, measurement |
| MCP Servers | .claude/settings.json, .mcp.json |
External tool integration via Model Context Protocol |
| Memory | CLAUDE.md, .claude/rules/, ~/.claude/rules/ |
Persistent project context with auto-loading rule hierarchies |
| Checkpointing | Automatic (git-based) | Atomic session recovery with /rewind and branch isolation |
Hot Features (Beta but Battle-Ready)
- Auto Mode (
--permission-mode auto,Shift+Tab): Model-based safety classifier that eliminates permission prompts without the recklessness ofdangerously-skip-permissions - Ultrareview (
/ultrareview): Multi-agent PR analysis that catches bugs, security issues, and regressions before merge - Agent Teams: Parallel development with tmux and git worktrees—multiple Claudes working simultaneously
- Scheduled Tasks (
/loop,/schedule): Local recurring monitoring (7 days) and cloud-based persistent routines - Fast Mode (
/fast,"fastMode": true): Stripped-down execution for speed-critical paths - No Flicker Mode (
CLAUDE_CODE_NO_FLICKER=1): Reduced visual noise for focus-heavy sessions
The repository doesn't just list features—it provides best practice documents and implementation files for each, so you copy working configurations rather than guessing.
4 Concrete Use Cases Where Agentic Engineering Destroys Vibe Coding
1. Production Code Review at Scale
Stop pasting diffs into chat. The repository documents how Anthropic itself uses /code-review with multi-agent analysis. One agent finds bugs, another checks security, a third verifies no regressions. The result? Greptile, CodeRabbit, and Devin Review are already obsolete—replaced by native Claude Code workflows that understand your full codebase context.
2. Parallel Feature Development with Agent Teams
Solo developers and small teams can punch above their weight using Agent Teams with git worktrees. Spin up 3-4 Claude instances simultaneously: one researches APIs, one writes tests, one implements the feature, one handles documentation. The repository includes Boris Cherny's exact tmux configuration and worktree isolation patterns. This isn't theoretical—it's how the creator of Claude Code builds his own projects.
3. Autonomous Long-Running Tasks
The Ralph Wiggum Loop (a self-evolving plugin) and Scheduled Tasks (/loop, /schedule) enable truly autonomous operation. Set Claude to monitor logs, regenerate reports, or iterate on designs while you sleep. The repository includes a complete implementation of the self-evolving loop, plus cron-based scheduling for cloud persistence.
4. Cross-Model Quality Assurance
Why trust one model's judgment? The repository documents three mechanisms for multi-model workflows: Plugin (run Codex inside Claude Code via /codex:review), MCP (call GPT-5 as a tool), and Router (swap the entire API endpoint to DeepSeek or Gemini). The included cross-model workflow shows how to plan in Claude, implement in Sonnet, and QA-review in Codex—catching the blind spots each model has.
Step-by-Step Installation & Setup Guide
Prerequisites
# Claude Code CLI (v2.1.142+ recommended for all features)
npm install -g @anthropic-ai/claude-code
# Or via Homebrew on macOS
brew install claude-code
# Verify installation
claude --version
# Expected: 2.1.142 (May 17, 2026) or later
Repository Setup for Best Practices
# Clone the best practice repository
git clone https://github.com/shanraisshan/claude-code-best-practice.git
cd claude-code-best-practice
# Explore the structure
ls -la
# You'll see: best-practice/, implementation/, orchestration-workflow/, tips/
Project-Specific Configuration
Create your project's .claude/ directory structure:
# In your actual project root
mkdir -p .claude/{agents,commands,skills,hooks}
touch CLAUDE.md
Essential Settings Configuration
Copy and adapt the repository's settings pattern to .claude/settings.json:
{
"model": "claude-sonnet-4.7",
"thinking": true,
"outputStyle": "explanatory",
"permissions": {
"bash": ["npm run *", "python↗ Bright Coding Blog -m pytest"],
"edit": ["/src/**", "/tests/**"],
"dangerouslySkipPermissions": false
},
"attribution": {
"commit": ""
},
"autoMode": {
"enabled": true,
"riskThreshold": "medium"
}
}
Critical: The repository emphasizes using settings.json for harness-enforced behavior rather than putting "NEVER add Co-Authored-By" in CLAUDE.md—the JSON is deterministic, natural language is not.
Memory System Setup
# Global rules (apply to all projects)
mkdir -p ~/.claude/rules/
# Project-specific rules
mkdir -p .claude/rules/
# Lazy-loaded rules with path matching
# Create .claude/rules/backend.md with YAML frontmatter:
# ---
# paths: ["src/server/**/*.ts", "api/**/*.py"]
# ---
Daily Update Habit
# The repository insists: update daily
claude update
# And read the changelog before starting
open https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
REAL Code Examples from the Repository
Example 1: Orchestration Workflow—Command → Agent → Skill Pattern
The repository's flagship pattern. Here's the actual weather orchestrator implementation:
# Launch Claude Code in your project
claude
# Invoke the orchestration command
/weather-orchestrator
This triggers a three-stage pipeline defined in .claude/commands/weather-orchestrator.md:
- Command parses the request and delegates to...
- Agent (
.claude/agents/weather-researcher.md) with isolated context for API investigation - Skill (
.claude/skills/weather-formatter/SKILL.md) for output formatting with progressive disclosure
The magic? The agent's 20 file reads, 12 greps, and 3 dead ends stay in the child's context. Only the final report returns to your main session. This is subagent context management in action—preventing the "dumb zone" that kills productivity.
Example 2: Skill with Progressive Disclosure and Dynamic Injection
From the repository's skills best practice, here's how Thariq (Anthropic) structures production skills:
<!-- .claude/skills/api-testing/SKILL.md -->
# API Testing Skill
## Description
Fire when the user needs to test REST/GraphQL endpoints, validate schemas, or debug integration failures
## Instructions
### Gotchas (HIGHEST SIGNAL CONTENT)
- Claude defaults to `curl`; prefer `httpie` or Python `requests` for complex auth flows
- Never hardcode secrets; always reference `.env` files via `!cat .env | grep API_KEY`
- 401 errors usually mean token refresh needed, not credential failure
### Core Workflow
1. Discover endpoints via OpenAPI spec or `!ls docs/api/`
2. Generate test cases covering 200, 400, 401, 403, 500
3. Execute with `!npm run test:api` or equivalent
4. Report: pass count, fail count, flaky indicators
### References
- `references/openapi.yml` — canonical API specification
- `scripts/generate-tests.js` — test scaffolding generator
- `examples/auth-patterns.md` — OAuth2, API key, JWT implementations
### Dynamic Context
!node scripts/get-latest-endpoints.js
<!-- Injects current endpoint list into prompt at invocation time -->
Key insight from the repository: The description field is a trigger, not a summary. Write it for the model: "when should I fire?" The !command syntax injects dynamic shell output—Claude runs it once and only sees the result, not the command itself.
Example 3: Hook for Auto-Formatting and Permission Routing
From the hooks best practice section, Boris Cherny's recommended setup:
// .claude/hooks/post-tool-use.json
{
"name": "auto-format",
"pattern": "Edit|Write",
"command": "npx prettier --write {{file}} && npx eslint --fix {{file}}",
"condition": "file.matches(/\\.(ts|tsx|js|jsx)$/)"
}
And for security-conscious auto-approval:
// .claude/hooks/permission-route.json
{
"name": "opus-security-scan",
"pattern": "Bash|Edit",
"command": "claude --model opus --prompt 'Review this command for safety: {{command}}. Respond APPROVE or REJECT with reason.'",
"autoApproveOn": "APPROVE",
"fallback": "ask"
}
This routes permission requests to Opus for attack scanning while auto-approving safe ones—eliminating the friction of dangerously-skip-permissions without the risk.
Example 4: Context Management with /compact and /rewind
The repository's session management tips, codified:
# When context hits 40% (the "dumb zone" threshold)
/compact focus on the auth refactor, drop the test debugging
# When a failed attempt pollutes context
# Double-Esc or:
/rewind 5
# Then re-prompt with lessons learned
# For clean task boundaries
/clear
# Brief handoff: "Implementing OAuth2 PKCE flow, login endpoint done, token refresh pending"
# For long-running sessions
/rename "TODO - refactor auth service"
# Resume later with:
/resume "TODO - refactor auth service"
Critical numbers from the repository: Context rot kicks in at 300-400k tokens on the 1M model. The "dumb zone" starts at ~40% context usage. Aggressive practitioners keep it below 30%.
Example 5: Cross-Model Workflow—Claude Plans, Codex Reviews
From the cross-model implementation:
# Terminal 1: Claude Code for planning
claude
/plan
# "Implement user authentication with OAuth2 PKCE, JWT refresh tokens,
# and rate-limited login attempts. Interview me with AskUserQuestion
# to refine requirements."
# Save plan to spec.md
# Terminal 2: Codex for implementation review
codex review spec.md --adversarial
# Catches edge cases Claude missed in planning
# Back to Terminal 1: Execute with confidence
claude
/goal "spec.md implemented, tests pass, codex review addressed"
The repository documents this as manual two-terminal flow with plans for plugin-based automation via the official codex-plugin-cc.
Advanced Usage & Best Practices
The 83 Tips: Hidden Gems
The repository's Tips and Tricks section is a goldmine. Here are the most explosive:
- "Grill me on these changes": Challenge Claude to prove your code works before PR. This "don't babysit" pattern (
🚫👶) appears throughout—trust the model, verify the outcome. - Prototype > PRD: Boris Cherny's counterintuitive advice—build 20-30 versions instead of writing specs. The cost of building is so low that exploration beats specification.
- Vertical Slices, Not Horizontal Phases: AI defaults to database → API → frontend sequencing. Force tracer bullets that cross all layers for immediate end-to-end feedback.
- ASCII Architecture Diagrams: Claude understands spatial relationships in ASCII. Use them extensively in prompts and
CLAUDE.md. - Voice Dictation 10x:
/voiceor Wispr Flow for 10x prompt throughput. The future is spoken, not typed.
Context Management Mastery
| Strategy | When to Use | Command |
|---|---|---|
| Continue | Going well, momentum matters | Enter |
| /compact | Mid-task, fuzzy details OK | /compact [hint] |
| /clear + brief | High-stakes next step | /clear then context summary |
| /rewind | Failed attempt polluted context | /rewind [turns] |
| Subagent | Tool output needed only for conclusion | use subagent |
| New session | Genuinely new task | claude (new terminal) |
PR Discipline
Boris's actual metrics from the repository: p50 of 118 lines per PR, 141 PRs, 45K lines changed in a day. Always squash merge. This isn't preference—it's the throughput that makes AI-assisted development viable.
Comparison with Alternatives
| Dimension | claude-code-best-practice | Generic AI Coding Tips | Official Claude Docs | Cursor/VS Code AI |
|---|---|---|---|---|
| Source | Creator + internal engineers | Random Twitter threads | Technical writers | Product marketing |
| Depth | 83 tips, 12 workflows, implementations | Surface-level | Reference, not strategy | Feature announcements |
| Currency | Updated with Claude Code releases | Stale quickly | Quarterly releases | Editor-centric |
| Community | Curated from 20+ power users | Unverified | Official only | Cursor ecosystem |
| Cross-model | Codex, Gemini, GPT, DeepSeek bridges | None | N/A | Cursor-only |
| Implementation | Working config files | None | Examples only | Templates |
| Context management | Token-level optimization | "Use context windows" | Basic /compact |
Implicit |
| Agent orchestration | Command→Agent→Skill patterns | N/A | Subagent docs | Composer only |
Why this repository wins: It's the only resource that combines official insider knowledge, community battle-testing, working implementations, and explicit cross-model strategies. The official docs tell you what exists; this tells you how to wield it.
FAQ
Q: Is claude-code-best-practice officially maintained by Anthropic? A: No—it's community-curated by Shayan Rais, but features tips directly from Boris Cherny (Claude Code creator), Thariq (Anthropic engineer), and other insiders. Think of it as the "unofficial official" knowledge base.
Q: Do I need Claude Code Pro/Enterprise for these features? A: Most features work on the standard tier. Auto Mode, Ultrareview, and Agent Teams require current beta access. The repository marks beta features explicitly and provides fallbacks.
Q: How often should I update my CLAUDE.md? A: The repository suggests: after every significant architecture change, when Claude starts ignoring instructions (stale signals), or when onboarding new team members. Keep it under 200 lines—Boris's target is 60 lines for maximum compliance.
Q: What's the difference between a Command and a Skill?
A: Commands (/do-thing) are for workflows you run repeatedly—checked into .claude/commands/, simple markdown↗ Smart Converter. Skills are folders with progressive disclosure—references, scripts, examples—for complex domain knowledge. Use commands for "inner loop" daily tasks; skills for deep expertise.
Q: Can I use these patterns with other AI coding tools? A: The concepts transfer (context management, subagent isolation, PR discipline). The implementations are Claude Code-specific. The repository includes cross-model workflows for Codex, Gemini, and GPT integration.
Q: Is vibe coding really dead? A: Not dead—just insufficient for production. The repository's position: vibe coding is great for exploration and learning, but agentic engineering is required for maintainable, team-scalable, debuggable systems.
Q: How do I contribute my own tips? A: The repository accepts community contributions. Check the subscribe section for contact info, or engage via the Reddit communities and X accounts listed.
Conclusion
The transition from vibe coding to agentic engineering isn't optional—it's the divide between AI tourists and AI-native engineers. claude-code-best-practice is your accelerated path across that chasm, distilling hundreds of hours of insider experimentation into copyable configurations, proven workflows, and hard-won context management discipline.
What makes this repository genuinely irreplaceable? It's alive. Updated with Claude Code releases, annotated with creator commentary, and battle-tested by the community building the future of software. While others guess at best practices, you'll be running Boris Cherny's actual tmux setup, Thariq's context isolation patterns, and cross-model QA pipelines that catch what single-model workflows miss.
The repository's billion-dollar questions section asks: "Can we convert an existing codebase into specs, delete the code, and have AI regenerate the exact same code from those specs alone?" We're not there yet. But with the systematic approaches in this guide, we're closer than anyone vibe coding their way through prompts.
Stop babysitting Claude. Start engineering with agents. Star the repository, fork the implementations, and join the community defining how software gets built in the intelligence age. Your future self—and your context windows—will thank you.
Ready to transform your Claude Code workflow? Dive into the complete resource at github.com/shanraisshan/claude-code-best-practice and start building like the engineers who built the tool itself.