CLAUDE.md Hierarchy & Configuration
Understand the CLAUDE.md configuration hierarchy and how project, user, and directory-level settings interact.
CLAUDE.md configuration layers:
User-level: ~/.claude/CLAUDE.md (personal preferences across all projects)
Project-level: .claude/CLAUDE.md (shared team configuration)
Directory-level: CLAUDE.md in any directory (scoped to that directory and below)
@import syntax: include external markdown files for modular configuration
.claude/rules/ directory: topic-specific rule files for organized configuration
Anti-Patterns to Avoid
Putting all configuration in one massive CLAUDE.md instead of using modular rules
Not understanding the precedence of user vs project vs directory configs
Custom Commands & Skills
Create custom slash commands and skills to extend Claude Code's capabilities for your team.
Commands and skills system:
Custom slash commands: .claude/commands/ directory for team-shareable shortcuts
Skills: .claude/skills/ directory with SKILL.md for complex, reusable behaviors
SKILL.md frontmatter: context: fork, allowed-tools, argument-hint
Path-specific rules: YAML frontmatter with paths glob patterns for targeted configuration
Anti-Patterns to Avoid
Using commands when skills (with forked context) would be more appropriate
Not specifying allowed-tools in skills, leaving overly broad tool access
Plan Mode & Iterative Refinement
Use plan mode for complex tasks and iterative refinement patterns to improve output quality progressively.
Planning and iteration strategies:
Plan mode: think before acting — useful for complex multi-step tasks
Direct execution: appropriate for well-defined, simple tasks
Iterative refinement: concrete examples, TDD iteration, interview pattern
TDD iteration: write tests first, then implement, then refine until tests pass
Anti-Patterns to Avoid
Using plan mode for simple, well-defined tasks (unnecessary overhead)
Skipping planning for complex tasks that need architectural thinking first
CI/CD Integration & Batch Processing
Integrate Claude Code into CI/CD pipelines using the -p flag and structured output. Leverage batch processing for cost optimization.
CI/CD and batch processing patterns:
-p flag: run Claude Code in non-interactive mode for CI/CD pipelines
--output-format json: get structured output for automated processing
--json-schema: enforce specific output schemas
Session context isolation in CI: separate generator and reviewer contexts
Message Batches API: 50% cost savings with 24-hour processing window
custom_id: track individual requests in batch processing
Anti-Patterns to Avoid
Using interactive mode in CI/CD pipelines
Same-session self-review (retains reasoning context bias)
Not isolating generator and reviewer sessions in code review pipelines
Exam Tips for Domain 3
Know the CLAUDE.md hierarchy: user > project > directory
Understand when to use plan mode vs direct execution
CI/CD uses -p flag with --output-format json for automation
Batch API offers 50% savings — know when to use synchronous vs batch
Related Exam Scenarios
Code Generation with Claude Code
Configure Claude Code for a development team workflow. Tests CLAUDE.md configuration, plan mode, slash commands, and iterative refinement strategies.
Developer Productivity with Claude
Build developer tools using the Claude Agent SDK with built-in tools and MCP servers. Tests tool selection, codebase exploration, and code generation workflows.
Claude Code for CI/CD
Integrate Claude Code into continuous integration and delivery pipelines. Tests -p flag usage, structured output, batch API, and multi-pass code review.
Test Your Knowledge of Claude Code Config
Practice with scenario-based questions covering this domain.