shanraisshan / claude-code-best-practice
practice made claude perfect
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing shanraisshan/claude-code-best-practice in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewclaude-code-best-practice practice makes claude perfect -white?style=flat&labelColor=555) *Click on this badge to show the latest best practice* *Click on this badge to show implementation in this repo* *Click on this badge to see the Command → Agent → Skill orchestration workflow* Boris Cherny on X ( tweet 1 · tweet 2 · tweet 3 ) 🧠 CONCEPTS | Feature | Location | Description | |---------|----------|-------------| | **Commands** | | Knowledge injected into existing context — simple user-invoked prompt templates for workflow orchestration | | **Subagents** | | Autonomous actor in fresh isolated context — custom tools, permissions, model, memory, and persistent identity | | **Skills** | | Knowledge injected into existing context — configurable, preloadable, auto-discoverable, with context forking and progressive disclosure · Official Skills | | **Workflows** | | | | **Hooks** | | User-defined handlers (scripts, HTTP, prompts, agents) that run outside the agentic loop on specific events · Guide | | **MCP Servers** | , | Model Context Protocol connections to external tools, databases, and APIs | | **Plugins** | distributable packages | Bundles of skills, subagents, hooks, and MCP servers · Marketplaces | | **Settings** | | Hierarchical configuration system · Permissions · Model Config · Output Styles · Sandboxing · Keybindings · Fast Mode | | **Status Line** | | Customizable status bar showing context usage, model, cost, and session info | | **Memory** | , , , | Persistent context via CLAUDE.md files and imports · Auto Memory · Rules | | **Checkpointing** | automatic (git-based) | Automatic tracking of file edits with rewind ( or ) and targeted summarization | | **CLI Startup Flags** | | Command-line flags, subcommands, and environment variables for launching Claude Code · Interactive Mode | | **AI Terms** | | Agentic Engineering · Context Engineering · Vibe Coding | | **Best Practices** | | Official best practices · Prompt Engineering · Extend Claude Code | 🔥 Hot | Feature | Location | Description | |---------|----------|-------------| | **/btw** | | Side chain conversations while Claude is working | | **Code Review** | GitHub App (managed) | Multi-agent PR analysis that catches bugs, security vulnerabilities, and regressions · Blog | | **Scheduled Tasks** | , cron tools | Run prompts on a recurring schedule (up to 3 days), set one-time reminders, poll deployments and builds | | **Voice Mode** | | speak to prompt - /voice to activate| | **Simplify & Batch** | , | Built-in skills for code quality and bulk operations — simplify refactors for reuse and efficiency, batch runs commands across files | | **Agent Teams** | built-in (env var) | Multiple agents working in parallel on the same codebase with shared task coordination | | **Remote Control** | , | Continue local sessions from any device — phone, tablet, or browser · Headless Mode | | **Git Worktrees** | built-in | Isolated git branches for parallel development — each agent gets its own working copy | | **Ralph Wiggum Loop** | plugin | Autonomous development loop for long-running tasks — iterates until completion | See orchestration-workflow for implementation details of **Command → Agent → Skill** pattern. ⚙️ DEVELOPMENT WORKFLOWS 🔥 Hot • Cross-Model (Claude Code + Codex) Workflow • RPI • Ralph Wiggum Loop • Garry Tan (CEO of Y Combinator) - gstack · ★ 15k Others • obra/superpowers · ★ 87k • Github Speckit · ★ 77k • get-shit-done (GSD) · ★ 31k • OpenSpec OPSX · ★ 31k • Brian Casel (Creator of Agent OS) - 2026 Workflow · ★ 4k - it's overkill in 2026 • Human Layer RPI - Research Plan Implement · ★ 1.5k • Andrej Karpathy (Founding Member, OpenAI) Workflow • Boris Cherny (Creator of Claude Code) - Feb 2026 Workflow • Peter Steinberger (Creator of OpenClaw) Workflow 💡 TIPS AND TRICKS ■ **Prompting (4)** • challenge Claude — "grill me on these changes and don't make a PR until I pass your test." or "prove to me this works" and have Claude diff between main and your branch • after a mediocre fix — "knowing everything you know now, scrap this and implement the elegant solution" • Claude fixes most bugs by itself — paste the bug, say "fix", don't micromanage how 👶 • say "use subagents" to throw more compute at a problem — offload tasks to keep your main context clean and focused 👶 ■ **Planning/Specs (5)** • always start with plan mode • start with a minimal spec or prompt and ask Claude to interview you using AskUserQuestion tool, then make a new session to execute the spec • always make a phase-wise gated plan, with each phase having multiple tests (unit, automation, integration) • spin up a second Claude to review your plan as a staff engineer, or use cross-model for review • write detailed specs and reduce ambiguity before handing work off — the more specific you are, the better the output ■ **Workflows (12)** • CLAUDE.md should target under 200 lines per file. 60 lines in humanlayer (still not 100% guaranteed). • use multiple CLAUDE.md for monorepos — ancestor + descendant loading • use .claude/rules/ to split large instructions • use commands for your workflows instead of sub-agents • have feature specific sub-agents (extra context) with skills (progressive disclosure) instead of general qa, backend engineer. • memory.md, constitution.md does not guarantee anything • avoid agent dumb zone, do manual /compact at max 50%. Use /clear to reset context mid-session if switching to a new task • vanilla cc is better than any workflows with smaller tasks • use skills in subfolders for monorepos • use /model to select model and reasoning, /context to see context usage, /usage to check plan limits, /extra-usage to configure overflow billing, /config to configure settings • always use thinking mode true (to see reasoning) and Output Style Explanatory (to see detailed output with ★ Insight boxes) in /config for better understanding of Claude's decisions • use ultrathink keyword in prompts for high effort reasoning • /rename impor…