← ClaudeAtlas

cc-best-practiceslisted

Official Claude Code best practices and prompt-library patterns. Use when the user asks how to prompt Claude Code effectively, how to structure a task (plan vs. direct, verify, scope), how to set up CLAUDE.md/skills/hooks/subagents/MCP, how to scale with headless or parallel sessions, or why a session is going badly (context bloat, repeated corrections).
1luvc0d3/claude-best-practice · ★ 0 · AI & Automation · score 57
Install: claude install-skill 1luvc0d3/claude-best-practice
# Claude Code Best Practices Distilled from https://code.claude.com/docs/en/best-practices and https://code.claude.com/docs/en/prompt-library (fetched 2026-07-31). Full prompt catalog in `references/prompt-library.md`; full guide in `references/best-practices.md`. ## The one constraint The context window fills fast and performance degrades as it fills. Almost every practice below manages that resource: clear it, delegate to it, or avoid loading it. ## Core practices (apply in this order) 1. **Give Claude a verification loop.** Provide a check it can run — tests, build exit code, linter, screenshot diff — and ask it to iterate until the check passes. Escalation ladder: same-prompt check → `/goal` condition → Stop hook gate → fresh-context reviewer subagent. Demand evidence (test output, commands + results), not assertions. If it can't be verified, don't ship it. 2. **Explore → plan → implement → commit** for uncertain, multi-file, or unfamiliar work (plan mode, `Ctrl+G` to edit the plan). **If you could describe the diff in one sentence, skip the plan.** For large features: have Claude interview the user via AskUserQuestion, write SPEC.md, then execute in a fresh session. 3. **Be specific.** Name files, constraints, edge cases, and reference patterns ("look at HotDogWidget.php, follow that pattern"). Describe symptoms with location and what "fixed" looks like. Vague is fine only for exploration. 4. **Manage context aggressively.** `/clear` between unrelated tasks. After t