Claude Code ベストプラクティス公式ガイド
Anthropic公式のClaude Codeベストプラクティス。CLAUDE.mdの書き方、マルチセッション、Writer/Reviewerパターン。
# Claude Code Best Practices (Official)
## CLAUDE.md Writing Guidelines
- Keep under 200 lines per file
- Write in imperative form (commands, not descriptions)
- Include only what Claude cannot infer from code
- Use bullet points, not paragraphs
## What to Include
- Build, test, deploy commands
- Code style deviations from language defaults
- Project-specific architecture decisions
- Non-obvious gotchas and workarounds
- Branch naming and PR conventions
## What NOT to Include
- Standard language conventions (Claude already knows)
- Detailed API documentation (link instead)
- Information that changes frequently
- File-by-file descriptions
## Effective Patterns
- **Writer/Reviewer**: One agent writes, another reviews
- **Progressive Disclosure**: Layer 1 (CLAUDE.md) → Layer 2 (.claude/rules/) → Layer 3 (.claude/skills/)
- **Multi-session**: Use /compact and /continue for long tasks
- **Headless mode**: claude -p for CI/CD integration
## Key Insight
CLAUDE.md is injected as a user message, not a system prompt. It is advisory — Claude may ignore instructions it deems irrelevant to the current task. こちらもおすすめ
DevOps カテゴリの他のルール
もっとルールを探す
CLAUDE.md、.cursorrules、AGENTS.md、Image Prompts の全 157 ルールをチェック。



