CClaude Cert Prep
D320% of exam

CCA-F Domain 3 Study Guide: Claude Code Configuration & Workflows

Configure Claude Code the way it actually behaves — knowing when guidance is a suggestion the model may follow and when it is a rule the harness enforces.

14 min read 8 objectives Reviewed July 25, 2026
On this page

Domain 3 is worth 20% of the CCA-F blueprint, and it is the most hands-on part of the exam. The scenarios rarely ask you to recite a file path in isolation; they hand you a workflow that is misbehaving — a formatting rule the model keeps forgetting, a slash command nobody else on the team can run, a risky refactor that started editing before anyone reviewed the approach — and ask which configuration mechanism fixes it. Answering well means understanding not just what each mechanism is, but the single distinction that runs underneath the whole domain.

That distinction is model discretion versus deterministic enforcement. CLAUDE.md, .claude/rules/, and Skills are guidance: they load text into Claude's context, and Claude decides how to act on it. Settings permissions and hooks are enforcement: the harness runs them regardless of what the model 'decided,' so they hold even when instruction-following slips. Nearly every trap in this domain punishes candidates who put a hard guarantee (security, formatting, blocking a dangerous command) into a discretionary place like CLAUDE.md, or who reach for a heavyweight hook when a one-line preference would do.

This guide walks objectives 12 through 19 in order. Each section gives you the core concept, why it matters, a concrete Claude Code configuration example, and the exam trap most likely to cost you points. Everything here reflects how Claude Code works as of early 2026; where the tool has evolved (custom commands merging into Skills, for example), that is called out so you are not caught by a stale detail.

OBJ 12

Custom Slash Commands: Project vs. User Directory

A custom slash command is a Markdown file whose body is a reusable prompt. Save it and you invoke it on demand by typing /name. Where you save it decides who can use it, and that placement decision is the whole point of this objective.

  • Project commands live in .claude/commands/ inside the repo. They are committed to version control, so every teammate who clones the repo gets them. Use this for shared, project-specific workflows.
  • User (personal) commands live in ~/.claude/commands/ in your home directory. They follow you across every project on your machine but are invisible to teammates. Use this for personal habits.
  • The filename becomes the command name: .claude/commands/deploy.md creates /deploy.

Commands can take arguments. $ARGUMENTS expands to everything typed after the command name; positional placeholders capture individual arguments. Optional frontmatter (description, argument-hint, and tool/model controls) tunes how the command appears and runs.

markdown
---
description: Triage and fix a GitHub issue by number
argument-hint: <issue-number>
---
Fetch issue #$ARGUMENTS with `gh issue view`.
Reproduce it, write a failing test, then implement the fix.
Keep the change minimal and reference the issue in the commit.
.claude/commands/fix-issue.md — a shared project command

Note that Claude Code has merged custom commands into Skills: a file at .claude/skills/deploy/SKILL.md also creates /deploy and works the same way when invoked. Existing .claude/commands/*.md files keep working. The difference is that a Skill can also be loaded autonomously by Claude when relevant, whereas a plain command is invoked on demand.

OBJ 13

Iterative Refinement: Examples, Targeted Feedback, and Batched Issues

When Claude's first attempt misses, how you ask for changes matters more than how many times you ask. Effective refinement is structured, not a stream of vague 'still not right' replies.

  • Concrete input-output examples anchor the target better than adjectives. 'For input 2026-07-24, output Jul 24, 2026' removes ambiguity that 'format the date nicely' leaves open.
  • Targeted feedback on specific failures — 'the null case on line 42 throws' — lets Claude fix the actual defect instead of rewriting working code and introducing new regressions.
  • Batched issue descriptions consolidate several problems into one message so Claude can evaluate them together, weigh interactions, and fix them in a single coherent pass.

Batching matters because fixing issues one at a time can make Claude 'whack-a-mole' — re-fix A while breaking B. Presenting the full set lets it reason about them holistically. It also spends fewer turns and less context than a long back-and-forth.

OBJ 14

Plan Mode vs. Direct Execution

Plan mode is a read-only mode: Claude investigates and proposes an approach but does not edit files, run mutating commands, or commit until you approve the plan. Direct execution lets it act immediately. Choosing between them is a risk judgment across four axes.

AxisFavors plan modeFavors direct execution
ScopeLarge, multi-file, cross-cuttingSmall, localized change
ReversibilityHard to undo (migrations, deletes, deploys)Trivially reversible / version-controlled
Architectural certaintyUncertain — several viable designsOne obvious approach
Stakeholder reviewA human must sign off on the approach firstNo review needed

Plan mode shines when the cost of a wrong direction is high: a database migration, a broad refactor, or work where a reviewer needs to approve how before any code is written. For a one-line typo fix or a well-scoped, reversible edit, plan mode is overhead that slows the loop.

OBJ 15

Enforcement vs. Guidance: Permissions/Hooks vs. CLAUDE.md

This is the conceptual heart of Domain 3. CLAUDE.md is auto-loaded guidance — memory the model reads and usually follows, but may not, especially in a long or distracted session. Settings permissions and hooks are deterministic: the harness applies them mechanically, independent of the model's cooperation.

So the test for where an instruction belongs is: what happens if the model ignores it? If the answer is 'mild annoyance' (a naming preference, a tone, a conventions reminder), CLAUDE.md is right. If the answer is 'security breach, data loss, or a broken build' — anything that must hold every single time — it belongs in permissions or a hook.

json
{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./secrets/**)",
      "Bash(git push:*)"
    ],
    "ask": ["Bash(rm:*)"],
    "allow": ["Bash(npm run test:*)"]
  }
}
.claude/settings.json — deny is absolute; rules evaluate deny > ask > allow
  • 'Never read the .env file' in CLAUDE.md is a request; as a deny rule it is a guarantee the tool call cannot even fire.
  • 'Always run the formatter after editing' in CLAUDE.md will be forgotten eventually; as a PostToolUse hook it runs every time.
  • Rules are evaluated deny first, then ask, then allow — the first match wins, so a deny always overrides a matching allow.
OBJ 16

Choosing the Right Configuration Mechanism

Claude Code offers several places to put guidance, and objective 16 is about matching the mechanism to the kind of guidance and when it should apply.

MechanismNatureBest for
CLAUDE.mdGuidance, always loadedProject-wide facts, conventions, preferences that apply to every session
.claude/rules/ (glob-scoped)Guidance, conditionally loadedInstructions that apply only to matching files/paths (e.g. .test.ts, migrations/*)
SkillsGuidance, loaded on useMulti-step procedures/checklists that cost nothing until invoked (on demand or when relevant)
HooksDeterministic actionAutomated steps that must run on an event (format/lint/test after edits)
Settings permissionsDeterministic gateHard allow/deny/ask boundaries on tools and commands

Two axes disambiguate: scope (does this apply always, or only to certain files?) and enforcement (is this a suggestion or a rule?). Always-on convention → CLAUDE.md. Path-specific convention → .claude/rules/ with a glob. A long procedure you do not want bloating every prompt → a Skill. A step that must happen mechanically → a hook. A boundary that must never be crossed → permissions.

OBJ 17

PostToolUse Hooks for Automatic Quality Enforcement

A PostToolUse hook runs a shell command after a tool completes. Scoped to the file-editing tools with a matcher like "Edit|Write", it becomes your enforcement point for code quality: format, lint, or test after every edit, no matter whether the model 'remembered' to.

This is the practical payoff of objective 15's principle. Telling Claude in CLAUDE.md to 'run Prettier after editing' is discretionary. A PostToolUse hook makes it structural — the formatter runs on the edited file every single time, independent of instruction-following.

json
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
          }
        ]
      }
    ]
  }
}
.claude/settings.json — auto-format edited files after every Edit/Write
  • The matcher filters on tool name; "Edit|Write" targets file modifications.
  • The hook receives JSON on stdin (including tool_input.file_path), so it can act on exactly the file that changed.
  • A hook that exits non-zero (or returns blocking feedback) can surface a lint/test failure back to Claude, prompting it to fix the issue rather than move on.
OBJ 18

Systematic Codebase Exploration with Grep, Glob, and Read

Understanding an unfamiliar codebase is a context-budget problem. The built-in tools form a funnel: Glob finds files by name pattern, Grep finds content across many files, and Read pulls the full contents of a specific file into context. The skill is ordering them to build understanding incrementally without flooding the window.

  1. Glob to map structure — Glob **/*.test.ts shows where tests live before you read any of them.
  2. Grep to locate — search for a symbol, route, or error string across the repo to find which files matter. Grep returns matching lines/files, not whole files, so it is cheap.
  3. Read to understand — open only the handful of files Grep pointed you to, and read targeted line ranges rather than 2,000-line files wholesale.

The anti-pattern is reading many large files up front 'to get oriented.' That burns the context window fast and buries the relevant detail. Search first to narrow, then read narrowly. Delegating a broad search to a subagent is another way to keep raw file dumps out of your main context — you keep the conclusion, not the noise.

OBJ 19

Providing Context: @-References, CLAUDE.md, or Inline

There are three ways to get project context in front of Claude, and they differ on reusability, specificity, and whether the context is needed across sessions.

MethodScopeBest when
@-reference (e.g. @src/config.ts)One turn, this sessionYou need a specific file's exact contents inline, right now, for a one-off task
CLAUDE.mdEvery session, persistentThe context is reusable and needed repeatedly across sessions (conventions, architecture, env quirks)
Inline descriptionThis message onlyA one-off detail easier to type than to point at (a preference or fact just for this request)

Decision rule: if you will need it again next session, it belongs in CLAUDE.md. If you need one particular file's real contents this time, @-reference it — that is more precise and current than describing it from memory. If it is a throwaway detail, just say it inline.

Key takeaways

  • 01The master distinction: CLAUDE.md, .claude/rules/, and Skills are model discretion; settings permissions and hooks are deterministic enforcement. Hard guarantees never belong in CLAUDE.md.
  • 02Project slash commands go in .claude/commands/ (shared via the repo); user commands go in ~/.claude/commands/ (personal, cross-project). Custom commands are now unified with Skills (.claude/skills/<name>/SKILL.md).
  • 03Choose plan mode when work is large-scope, hard to reverse, architecturally uncertain, or needs stakeholder sign-off before edits; use direct execution for small, reversible, obvious changes.
  • 04PostToolUse hooks with an "Edit|Write" matcher enforce formatting/linting/testing after every file change, independent of whether the model followed instructions.
  • 05Match the mechanism to the guidance: always-on facts → CLAUDE.md; path-specific rules → .claude/rules/ globs; on-demand procedures → Skills; mechanical steps → hooks; hard boundaries → permissions.
  • 06Explore codebases with a funnel — Glob to map, Grep to locate, Read selectively — to build understanding while protecting the context window.
  • 07Permission rules evaluate deny first, then ask, then allow; a deny always overrides a matching allow.

Common mistakes

Putting a hard security or compliance rule (never read .env, never git push) in CLAUDE.md and expecting it to be guaranteed.

CLAUDE.md only asks. Encode absolute rules as settings permissions deny rules or blocking hooks, which the harness enforces regardless of the model.

Placing a team-wide slash command in ~/.claude/commands/ where only you can see it.

Shared commands belong in the project's .claude/commands/ directory so they are committed and available to everyone who clones the repo.

Relying on a CLAUDE.md note to run the formatter after edits.

Use a PostToolUse hook matched to Edit|Write so the formatter runs deterministically on every file change.

Reading many large files up front to 'get oriented,' exhausting the context window.

Use Glob and Grep to locate the relevant files first, then Read only those, in targeted line ranges.

Treating plan mode as either mandatory ceremony or reserved only for giant projects.

Trigger plan mode by risk: irreversibility, large scope, architectural uncertainty, or a needed review — any one is enough; skip it for small reversible edits.

Frequently asked

If CLAUDE.md can't guarantee behavior, why use it at all?

Because most guidance does not need a hard guarantee. Conventions, preferences, architecture notes, and env quirks are exactly what CLAUDE.md is for — it steers the model well in the common case. Reserve hooks and permissions for the smaller set of rules that must hold every single time.

What's the difference between a PreToolUse and a PostToolUse hook?

PreToolUse runs before a tool executes and can block or validate the action (e.g., stop a dangerous command). PostToolUse runs after the tool completes and is ideal for reacting to a change — formatting, linting, or testing a file that was just edited.

When should I use a Skill instead of a slash command or CLAUDE.md?

Custom commands and Skills are now unified — both create /name. Reach for a Skill (SKILL.md) when you have a multi-step procedure or long reference material: its body loads only when used, so it stays out of your context until needed and can even be invoked autonomously by Claude when relevant, unlike a plain on-demand command.

@-reference or CLAUDE.md for giving Claude a file?

Use an @-reference when you need one specific file's exact, current contents for this task — it is precise and fresh. Use CLAUDE.md for stable context you will need across many sessions. Avoid pinning large, frequently-changing files into CLAUDE.md, where they bloat every session and go stale.

How are permission rules resolved when several match?

They are evaluated in order: deny first, then ask, then allow, and the first match wins. That means a deny rule always overrides an allow, which is why deny is the right tool for absolute boundaries.

Independent, unofficial study material. Not affiliated with, endorsed by, or authorized by Anthropic. Every example is original and written to teach the public exam objectives — no real exam questions are reproduced. Technical details reflect Claude, the Anthropic API, Claude Code, and MCP as of July 25, 2026; always confirm specifics against current official documentation.

Test yourself

Turn what you just read into answers you can check.

Take the mock exam

Keep studying

All guides

These guides are free and never paywalled. Keep Claude Cert Prep free ♥