Skip to main content
★ 8,094 stars on GitHub

Claude Code
Best Practice

Comprehensive best practices, patterns, and reference implementations for Claude Code. Learn how to master commands, subagents, skills, hooks, and orchestration workflows.

$claude
/weather-orchestrator
→ Command orchestrates workflow
→ Agent fetches data with skill
→ Skill creates SVG output
✓ Weather card generated

Quick Start

Get up and running with Claude Code best practices in minutes

1

Install Claude Code

Install Claude Code CLI from the official repository or download the latest release.
# Visit https://code.claude.com/docs/en/setup for installation instructions
claude --version
2

Clone the repository

Clone the best practice repository to explore reference implementations.
git clone https://github.com/shanraisshan/claude-code-best-practice.git
cd claude-code-best-practice
The repository contains live examples of commands, subagents, skills, hooks, and orchestration patterns in the .claude/ directory.
3

Explore the weather orchestration example

Run the example workflow to see the Command → Agent → Skill architecture in action.
claude
/weather-orchestrator
  1. Command (/weather-orchestrator) asks you for temperature unit preference
  2. Agent (weather-agent) fetches temperature using its preloaded weather-fetcher skill
  3. Skill (weather-svg-creator) creates an SVG weather card
This demonstrates two skill patterns: agent skills (preloaded) and standalone skills (invoked).
4

Customize for your project

Copy patterns from .claude/commands/, .claude/agents/, and .claude/skills/ to your own projects. Start with the quickstart guide for detailed instructions.
# Create your own command
mkdir -p .claude/commands
touch .claude/commands/my-workflow.md

Core Concepts

Master the fundamental building blocks of Claude Code

Commands

Entry-point prompts for workflows invoked with /command-name. Define reusable workflows with frontmatter configuration.

Subagents

Custom agents with specialized tools, permissions, and models. Orchestrate complex tasks with the Task tool.

Skills

Reusable knowledge and workflows with progressive disclosure. Preload into agents or invoke on-demand.

Hooks

Deterministic scripts that run on lifecycle events like PreToolUse, PostToolUse, and SessionStart.

MCP Servers

Model Context Protocol connections to external tools, databases, and APIs like Chrome, Playwright, and Slack.

Settings

Hierarchical configuration system with project, personal, and plugin-level settings for permissions and behavior.

Memory

Persistent context via CLAUDE.md files with ancestor and descendant loading for monorepos.

Workflows & Patterns

Learn proven patterns for real-world development

Orchestration Workflow

Command → Agent → Skill architecture pattern demonstrated through the weather system example.

RPI Workflow

Research, Plan, Implement pattern for systematic feature development and bug fixes.

Agent Teams

Multiple agents working in parallel on the same codebase with shared task coordination.

Git Worktrees

Isolated git branches for parallel development — each agent gets its own working copy.

Ready to master Claude Code?

Start with the quickstart guide and explore the reference implementations in the repository.

Build docs developers (and LLMs) love