2026-03-02 14:25:26 +05:00
2026-03-02 14:25:26 +05:00
2026-03-02 14:25:26 +05:00
2026-02-06 11:23:49 +05:00
2026-03-02 12:06:47 +05:00
2026-03-02 12:06:47 +05:00
2026-02-20 18:07:49 +05:00
2026-03-02 13:15:36 +05:00
2026-03-02 13:15:36 +05:00
2026-03-02 13:15:36 +05:00
2026-03-02 12:06:47 +05:00
2026-03-02 14:25:26 +05:00

claude-code-best-practice

practice makes claude perfect

Last Updated GitHub Stars

Best Practice Click on this badge to show the latest best practice
Implemented Click on this badge to show implementation in this repo
Orchestration Workflow Click on this badge to see the Command → Agent → Skill orchestration workflow

Claude Code mascot jumping

Claude Code Creator Claude Code Creator

CONCEPTS

Feature Location Description
Commands .claude/commands/<name>.md Best Practice Implemented Entry-point prompts for workflows — invoke with /command-name
Sub-Agents .claude/agents/<name>.md Best Practice Implemented Custom agents with their own name, color, tools, permissions, and model · Agent Teams
Skills .claude/skills/<name>/SKILL.md Best Practice Implemented Reusable knowledge, workflows, and slash commands — load on-demand or invoke with /skill-name
Workflows .claude/commands/weather-orchestrator.md Orchestration Workflow
Hooks .claude/hooks/ Best Practice Implemented Deterministic scripts that run outside the agentic loop on specific events
MCP Servers .claude/settings.json, .mcp.json Best Practice Implemented Model Context Protocol connections to external tools, databases, and APIs
Plugins distributable packages Bundles of skills, subagents, hooks, and MCP servers · Marketplaces
Settings .claude/settings.json Best Practice Implemented Hierarchical configuration system · Permissions · Model Config · Output Styles · Sandboxing · Keybindings · Fast Mode
Status Line .claude/settings.json Best Practice Implemented Customizable status bar showing context usage, model, cost, and session info
Memory CLAUDE.md, ~/.claude/projects/<project>/memory/ Implemented Persistent context via CLAUDE.md files and @path imports · Auto Memory · Rules
Checkpointing automatic (git-based) Automatic tracking of file edits with rewind (Esc Esc or /rewind) and targeted summarization
Remote Control CLI / claude.ai Continue local sessions from any device — phone, tablet, or browser · Headless Mode
CLI Startup Flags claude [flags] Best Practice Command-line flags, subcommands, and environment variables for launching Claude Code
AI Terms Best Practice Agentic Engineering · Context Engineering · Vibe Coding
Best Practices Official best practices · Extend Claude Code

Orchestration Workflow

Workflow orchestration using the Command → Agent → Skill pattern.

Command Skill Agent Architecture Flow

Component Role Example
Command Entry point, user interaction /weather-orchestrator
Agent Fetches data with preloaded skill (agent skill) weather-agent with weather-fetcher
Skill Creates output independently (skill) weather-svg-creator

See orchestration-workflow for implementation details.

DEVELOPMENT WORKFLOW

MY EXPERIENCE

Workflows

  • Claude.md should not exceed 150+ lines. (still not 100% guaranteed)
  • use commands for your workflows instead of agents
  • have feature specific subagents (extra context) with skills (progressive disclosure) instead of general qa, backend engineer.
  • /memory, /rules, constitution.md does not guarantee anything
  • do manual /compact at max 50%
  • always start with plan mode
  • subtasks should be so small that it can be completed in less than 50% context
  • vanilla cc is better than any workflows with smaller tasks
  • commit often, as soon as task is completed, commit.

Utilities

  • iTerm terminal instead of IDE (crash issue)
  • Wispr Flow for voice prompting (10x productivity)
  • claude-code-voice-hooks for claude feedback
  • status line for context awareness and fast compacting
  • git worktrees for parallel development
  • /permissions with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions
  • /sandbox to reduce permission prompts with file and network isolation
  • output styles: use Explanatory when learning a new codebase, Learning for coaching
  • /keybindings to remap any key, settings live reload

Debugging

  • /doctor
  • always ask claude to run the terminal (you want to see logs of) as a background task for better debugging
  • use mcp (claude in chrome, playwright, chrome dev tool) to let claude see chrome console logs on its own
  • provide screenshots of the issue

TIPS FROM BORIS CHERNY (CREATOR OF CLAUDE CODE)

CONTEXT ENGINEERING

CLAUDE CODE FEATURES INSPIRATION

REPORTS

Report Description
Agent SDK vs CLI System Prompts Why Claude CLI and Agent SDK outputs may differ—system prompt architecture and determinism
Browser Automation MCP Comparison Comparison of Playwright, Chrome DevTools, and Claude in Chrome for automated testing
CLI Startup Flags Best Practice Complete reference of all CLI flags, subcommands, and environment variables
CLAUDE.md Loading in Monorepos Understanding ancestor vs descendant loading behavior for CLAUDE.md files
Global vs Project Settings Which features are global-only (~/.claude/) vs dual-scope, including Tasks and Agent Teams
Skills Discovery in Monorepos How skills are discovered and loaded in large monorepo projects
Agent Memory Frontmatter Persistent memory scopes (user, project, local) for subagents — enabling agents to learn across sessions
Boris Cherny's 12 Customization Tips 12 ways to customize Claude Code — from terminal config to plugins, agents, hooks, and output styles
Advanced Tool Use Patterns Programmatic Tool Calling (PTC), Tool Search, and Tool Use Examples
Usage, Rate Limits & Extra Usage Usage commands (/usage, /extra-usage, /cost), rate limits, and pay-as-you-go overflow billing
Commands Reference Complete reference for Claude Code commands — command definitions, frontmatter fields, and all built-in slash commands
Claude Code Settings Reference Comprehensive guide to all settings.json configuration options
Subagents Reference Complete reference for Claude Code subagents — built-in agents, custom agents, and frontmatter fields
MCP Servers Best Practice Recommended MCP servers for daily use, configuration, scopes, and permission patterns
S
Description
No description provided
Readme MIT 72 MiB
Languages
HTML 95.4%
Python 4.6%