Files
Obsidian/Claude/shanraisshanclaude-code-best-practice practice made claude perfect.md
T
2026-07-21 14:53:24 +08:00

22 KiB

title, source, author, published, created, description, tags
title source author published created description tags
shanraisshan/claude-code-best-practice: practice made claude perfect https://github.com/shanraisshan/claude-code-best-practice
shanraisshan
2026-03-07 practice made claude perfect. Contribute to shanraisshan/claude-code-best-practice development by creating an account on GitHub.
clippings

You only have a single verified email address. We recommend verifying at least one more email address to ensure you can recover your account if you lose access to your primary email.

Open in github.dev Open in a new github.dev tab Open in codespace

claude-code-best-practice

practice makes claude perfect

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

Claude Code mascot jumping

Boris Cherny on Claude Code
Boris Cherny on X (tweet 1 · tweet 2 · tweet 3)

CONCEPTS

Feature Location Description
Commands .claude/commands/<name>.md Entry-point prompts for workflows — invoke with /command-name
Sub-Agents .claude/agents/<name>.md Custom agents with their own name, color, tools, permissions, and model
Skills .claude/skills/<name>/SKILL.md Reusable knowledge, workflows, and slash commands — load on-demand or invoke with /skill-name
Workflows .claude/commands/weather-orchestrator.md
Hooks .claude/hooks/ Deterministic scripts that run outside the agentic loop on specific events
MCP Servers .claude/settings.json, .mcp.json 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 Hierarchical configuration system · Permissions · Model Config · Output Styles · Sandboxing · Keybindings · Fast Mode
Status Line .claude/settings.json Customizable status bar showing context usage, model, cost, and session info
Memory CLAUDE.md, .claude/rules/, ~/.claude/rules/, ~/.claude/projects/<project>/memory/ 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
CLI Startup Flags claude [flags] Command-line flags, subcommands, and environment variables for launching Claude Code
AI Terms Agentic Engineering · Context Engineering · Vibe Coding
Best Practices Official best practices · Prompt Engineering · Extend Claude Code

🔥 Hot

Feature Location Description
Scheduled Tasks /loop, cron tools Run prompts on a recurring schedule (up to 3 days), set one-time reminders, poll deployments and builds
Agent Teams built-in (env var) Multiple agents working in parallel on the same codebase with shared task coordination
Voice Mode built-in command speak to prompt - /voice to activate
Remote Control built-in command 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.

Command Skill Agent Architecture Flow

Orchestration Workflow Demo

claude
/weather-orchestrator
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

DEVELOPMENT WORKFLOWS

🔥 Hot

Others

■ Planning (2)

  • always start with plan mode. ask Claude to interview you; ask the user a question
  • always make a phase-wise gated plan, with each phase having multiple tests (unit, automation, integration). use cross-model to review your plan

■ Workflows (12)

■ Workflows Advanced (6)

  • use ASCII diagrams a lot to understand your architecture
  • agent teams with tmux and git worktrees for parallel development
  • use /loop for recurring monitoring — poll deployments, babysit PRs, check builds (runs up to 3 days)
  • use Ralph Wiggum plugin for long-running autonomous tasks
  • /permissions with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions
  • /sandbox to reduce permission prompts with file and network isolation

■ Debugging (5)

  • make it a habit to take screenshots and share with Claude whenever you are stuck with any issue
  • use mcp (Claude in Chrome, Playwright, Chrome DevTools) to let claude see chrome console logs on its own
  • always ask claude to run the terminal (you want to see logs of) as a background task for better debugging
  • /doctor to diagnose installation, authentication, and configuration issues
  • error during compaction can be resolved by using /model to select a 1M token model, then running /compact
  • use a cross-model for QA — e.g. Codex for plan and implementation review

■ Utilities (5)

■ Daily (3)

Claude Replaced
Voice Mode Wispr Flow, SuperWhisper
Remote Control OpenClaw
Cowork OpenAI Operator, AgentShadow
Tasks Beads
Plan Mode Agent OS
Skills / Plugins YC AI wrapper startups (reddit)

If you have answers, do let me know at shanraisshan@gmail.com

Memory & Instructions (4)

  1. What exactly should you put inside your CLAUDE.md — and what should you leave out?
  2. If you already have a CLAUDE.md, is a separate constitution.md or rules.md actually needed?
  3. How often should you update your CLAUDE.md, and how do you know when it's become stale?
  4. Why does Claude still ignore CLAUDE.md instructions — even when they say MUST in all caps? (reddit)

Agents, Skills & Workflows (6)

  1. When should you use a command vs an agent vs a skill — and when is vanilla Claude Code just better?
  2. How often should you update your agents, commands, and workflows as models improve?
  3. Does giving your subagent a detailed persona improve quality? What does a "perfect persona/prompt" for research/QA subagent look like?
  4. Should you rely on Claude Code's built-in plan mode — or build your own planning command/agent that enforces your team's workflow?
  5. If you have a personal skill (e.g., /implement with your coding style), how do you incorporate community skills (e.g., /simplify) without conflicts — and who wins when they disagree?
  6. Are we there yet? Can we convert an existing codebase into specs, delete the code, and have AI regenerate the exact same code from those specs alone?

Specs & Documentation (3)

  1. Should every feature in your repo have a spec as a markdown file?
  2. How often do you need to update specs so they don't become obsolete when a new feature is implemented?
  3. When implementing a new feature, how do you handle the ripple effect on specs for other features?

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
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
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
LLM Day-to-Day Degradation Why LLM performance varies day-to-day — infrastructure bugs, MoE routing variance, and psychology

Releases

No releases published

Packages

No packages published

Languages