Domain 3 · Claude Code Configuration & Workflows
This domain covers how a team configures Claude Code: instruction files, commands and skills, path-specific rules, plan mode, iterative prompting, and running Claude Code in CI/CD.
Key terms: Claude Code: Claude's coding assistant for the terminal and your editor. CLAUDE.md: instructions Claude Code reads every session. Skill: a reusable mini-agent kept in a folder. CI/CD: automated checks that run whenever code changes. Glob: a file pattern such as **/*.test.tsx.
3.1 Configure CLAUDE.md files with hierarchy, scoping and modular organization
What it is: CLAUDE.md is a plain text file of instructions that Claude Code reads at the start of every session, such as coding standards and project rules. It can live in three places: your home folder (just for you), the project (shared with the team), or a subfolder (for that part of the code).
The exam tests: the three CLAUDE.md levels, what is shared and what is not, and how to keep instructions modular. Video: Ep 10.
Where Claude Code finds instructions
| Level | Location | Who gets it |
|---|---|---|
| User | ~/.claude/CLAUDE.md | Personal. Not shared with teammates |
| Project | .claude/CLAUDE.md or ./CLAUDE.md | Shared with the team through version control |
| Directory | any-subdir/CLAUDE.md | Applies to that part of the codebase |
| Rules | .claude/rules/*.md | Topic rules; paths: limits them to matching files |
Full notes
Rule: CLAUDE.md loads at three levels: user (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md or a root CLAUDE.md), and directory (a CLAUDE.md inside a subfolder).
Rule: User-level instructions apply only to that user and are not shared through version control. A new teammate who is "not getting the instructions" usually has them in the user-level file instead of the project level.
Rule: Use @import to pull specific standards files into a CLAUDE.md, such as only the standards that matter for each package.
Rule: Split a large CLAUDE.md into focused topic files in .claude/rules/, for example testing.md, api-conventions.md and deployment.md.
Rule: The /memory command shows which memory files are loaded. Use it when behavior differs between sessions.
~/.claude/CLAUDE.md.Deep dive
- Ep 10 at 05:17: the CLAUDE.md hierarchy.
- Ep 10 at 05:36: why a teammate does not see user-level instructions.
- Ep 10 at 15:59: the
@importmechanism. - Ep 10 at 27:30: the
/memorycommand.
3.2 Create and configure custom slash commands and skills
What it is: A slash command is a saved prompt you run by typing its name, like /review. A skill is a more capable version: a small folder with a SKILL.md file that can run in its own isolated context and limit which tools it may use. Both can be shared with the team or kept personal.
The exam tests: where commands and skills live, what the frontmatter options do, and when to use a skill instead of CLAUDE.md. Video: Ep 11.
--- name: <skill name> context: fork allowed-tools: [<tool>, <tool>] argument-hint: "Path to file" --- Markdown body (the prompt) ...
| Location | Shared? | Holds |
|---|---|---|
.claude/commands/ | Yes, through version control | Project slash commands |
~/.claude/commands/ | No, personal | Your own slash commands |
.claude/skills/ | Yes, through version control | Skills, each with a SKILL.md |
~/.claude/skills/ | No, personal | Personal skill variants |
Full notes
Rule: A slash command is a fixed prompt. A skill is a configurable mini-agent whose frontmatter controls how it runs.
Rule: context: fork runs the skill in an isolated sub-agent, so verbose or exploratory output does not pollute the main conversation.
Rule: allowed-tools limits which tools the skill may use, for example only file-write operations to prevent destructive actions.
Rule: argument-hint prompts the developer for required parameters when the skill is run without arguments.
Rule: Skills are for on-demand, task-specific workflows. CLAUDE.md is for universal standards that are always loaded.
Rule: Make a personal variant of a skill under a different name in ~/.claude/skills/, so teammates are not affected.
Deep dive
- Ep 11 at 02:03: custom slash commands.
- Ep 11 at 03:46: skills.
- Ep 11 at 16:51:
context: fork. - Ep 11 at 17:56:
allowed-tools. - Ep 11 at 18:16:
argument-hint.
3.3 Apply path-specific rules for conditional convention loading
What it is: Sometimes a rule should apply only to certain files, for example test files. Rule files in .claude/rules/ can name file patterns (globs), and Claude loads the rule only when it works on a matching file. That saves context and keeps instructions relevant.
The exam tests: how rule files load only for matching files, and when that beats a directory CLAUDE.md. Video: Ep 10.
| Pattern | Matches |
|---|---|
terraform/**/* | All files under the terraform directory |
**/*.test.tsx | Any .test.tsx file anywhere |
src/api/*.ts | .ts files in src/api only |
**/*.{ts,tsx} | Both .ts and .tsx files anywhere |
Full notes
Rule: A rule file in .claude/rules/ with no paths: field applies globally. With a paths: field of glob patterns, it loads only when Claude edits a matching file, which saves tokens.
Rule: ** means any nested directories. * means one directory level.
Rule: Choose glob rules over subdirectory CLAUDE.md files when a convention covers files spread across many directories, such as test files that sit next to the code they test.
Deep dive
- Ep 10 at 20:41: the
pathsfield. - Ep 10 at 22:24: matching test files with a glob.
3.4 Determine when to use plan mode vs direct execution
What it is: Plan mode lets Claude explore the code and propose an approach without changing any file until you approve it. Direct execution just does the task. Use planning when the change is large or has several possible approaches, and direct execution when it is small and clear.
The exam tests: matching the mode to the size and uncertainty of the task. Video: Ep 12.
| Plan mode | Direct execution | |
|---|---|---|
| Best for | Large changes, several valid approaches, architectural decisions, multi-file work | Simple, well-scoped changes with a clear destination |
| Files touched | None until you approve the plan | Task is contained and output is predictable |
| Reverting | Hard, so plan first | Easy |
| Example | Microservice restructuring, a library migration across many files | A single-file bug fix, one validation check |
Full notes
Rule: Plan mode explores the codebase and designs the approach before any change, which prevents costly rework.
Rule: You can combine them: plan mode for the investigation, then direct execution for the implementation.
Rule: The Explore subagent isolates noisy discovery work and returns only a summary, so the main conversation keeps its room for strategy.
Deep dive
- Ep 12 at 02:41: direct execution as the default, and the signals for plan mode.
- Ep 12 at 12:35: using plan mode to plan before writing tests.
- Ep 12 at 21:59: a live demo of planning first, then executing.
- Ep 12 at 38:42: the Explore subagent.
3.5 Apply iterative refinement techniques for progressive improvement
What it is: Iterative refinement means improving Claude's result over several rounds instead of expecting a perfect first try. The most reliable ways are to show concrete examples of the result you want, write tests first and share the failures, and let Claude ask you questions before it starts.
The exam tests: how to steer Claude toward the result you want over several rounds. Video: Ep 12.
Full notes
Rule: When prose descriptions are interpreted inconsistently, give 2 to 3 concrete input and output examples.
Rule: Test-driven iteration: write tests first (expected behavior, edge cases, performance), then iterate by sharing the failures.
Rule: The interview pattern: ask Claude to question you before it starts. It surfaces considerations you may not have thought of, such as cache invalidation or failure modes, especially in an unfamiliar domain.
Rule: If problems interact, put them all in one detailed message. If they are independent, fix them one after another.
Rule: For an edge case such as null values in a migration script, supply specific test cases with example input and expected output.
Deep dive
- Ep 12 at 43:40: test-driven iteration and concrete examples.
- Ep 12 at 47:01: the interview pattern.
3.6 Integrate Claude Code into CI/CD pipelines
What it is: CI/CD is the automated pipeline that checks code whenever it changes. Claude Code can run inside that pipeline without a person, using the -p flag, and return results in a fixed format that other tools can read. It works best when the reviewer is a fresh session, separate from the one that wrote the code.
The exam tests: running Claude Code without a human, getting machine-readable output, and keeping reviews independent. Video: Ep 13.
Production pipeline: project context in, block or alert out
| Flag | Purpose |
|---|---|
-p or --print | Non-interactive mode for pipelines |
--output-format json | Machine-readable output |
--json-schema | Enforces the shape of the output |
Full notes
Rule: Run Claude Code with -p in CI so the job never hangs waiting for input.
Rule: Combine --output-format json with --json-schema to get findings a script can parse, for example to post inline pull request comments.
Rule: CLAUDE.md gives CI-run Claude its project context: testing standards, fixtures and review criteria. Document the conventions once and every automated run inherits them.
Rule: The session that wrote the code is less effective at reviewing it. Use a separate session for review. Generation and review are separate jobs.
Rule: When you re-run a review after new commits, include the prior findings and ask for only new or still-unaddressed issues, so comments are not duplicated.
Rule: Include the existing test files so test generation does not repeat scenarios that are already covered.
claude without -p in a pipeline. Invented flags and environment variables are wrong answers.Deep dive
- Ep 13 at 05:13: the
-pflag for non-interactive runs. - Ep 13 at 12:30:
--output-format jsonwith--json-schemato enforce the output shape. - Ep 13 at 20:41: the deduplication engine, which hands prior findings to the next run.
- Ep 13 at 17:32: fresh eyes review better.
- Ep 13 at 24:20: giving CI Claude context through CLAUDE.md.