MockCertMockCert
Menu

Test yourself in exam conditions

A full Claude Certified Architect – Professional mock exam: 70 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.

Start a free mock exam
Domain 7 · 3 topics · about 19 minTopics in this domainTopics

Domain 7 · Overview

Overview

Up next: Packaging and Distributing Claude Code Workflows · 11 steps + check · 7 min

Domain 7 · Topic 1 of 3

Packaging and Distributing Claude Code Workflows

Step 1 of 11

Think first How do you roll out a Claude Code workflow that one team has proven to every team, safely, even when it runs unattended?

Why it matters: Questions describe a workflow ready to spread and ask which plugin part, distribution path or managed control fits.

Package the workflow as a plugin, list it in a marketplace, and install it on every machine through managed settings. Managed settings outrank every other scope, so the controls that must always hold go there.

Step 2 of 11

Term Meaning
Plugin marketplace A directory or repository whose .claude-plugin/marketplace.json lists plugins and where to fetch each one.
Managed settings The policy file or server-delivered policy that every machine in the organization reads.
Plugin hook A hook shipped in the plugin's hooks/hooks.json; use it for a rule that must hold every time.
Side-loading Loading plugins or agents from startup flags such as --plugin-dir instead of from a marketplace.

Step 3 of 11

Hooks and MCP servers each have a set file at the plugin root. Hooks and MCP servers are added at the plugin level. A plugin's agent files cannot add them on their own.

Where plugin parts live and what to watch for

Part Where it goes Watch for
Hooks hooks/hooks.json, under a top-level hooks key Same shape as the hooks object in settings.json
MCP servers .mcp.json at the plugin root Same shape as a project .mcp.json
Subagent files The plugin's agent files permissionMode, hooks, mcpServers and initialPrompt are ignored
CLAUDE.md The plugin root Not loaded as project context

Exam trap A CLAUDE.md at the plugin root is not loaded. A rule that must hold every time belongs in a plugin hook, not a skill.

Step 4 of 11

A marketplace lists plugins and where to fetch each one. Its marketplace.json needs a name, an owner and a plugins array. Each plugin entry needs a name and a source. The install id is the entry's name, an @, and the marketplace name. Pin archive sources with sha256 so a changed download is refused.

Exam trap No marketplace.json field turns on background auto-update. It is off by default, and a user or an admin must enable it.

Step 5 of 11

Set extraKnownMarketplaces and enabledPlugins together. In managed settings, the first registers the marketplace on each machine, and the second names the plugins to install and enable. A plugin force-enabled in managed settings keeps loading even if a user disables it. For one repository's contributors only, set both keys in that repository's .claude/settings.json.

Step 6 of 11

Plugins install in the background in -p and CI runs. So a plugin can be missing from the first turn. Set CLAUDE_CODE_SYNC_PLUGIN_INSTALL=1 to make the run wait for the install. Runners that cannot clone at runtime can use a plugins directory built in, named by CLAUDE_CODE_PLUGIN_SEED_DIR.

Exam trap A CI run does not wait for plugins by default. Without the sync variable, the first query can run before the plugin is installed.

Step 7 of 11

Managed permission rules can override every local rule. Setting allowManagedPermissionRulesOnly to true makes Claude Code ignore permission rules from user, project and local files and from --allowedTools. Without it, users' allow rules merge with yours.

Example: Managed settings that deny two file reads, turn off bypass mode and keep only managed permission rules.

{
  "permissions": {
    "deny": ["Read(./.env)", "Read(./secrets/**)"],
    "disableBypassPermissionsMode": "disable"
  },
  "allowManagedPermissionRulesOnly": true
}
  • "allowManagedPermissionRulesOnly": true: ignores permission rules from user, project and local files
  • "disableBypassPermissionsMode": "disable": turns off bypass mode

Exam trap Managed allow rules do not replace users' allow rules on their own. The two merge unless allowManagedPermissionRulesOnly is set.

Step 8 of 11

By default, anyone can connect any MCP server they choose. Managed keys narrow which sources teams may use. deniedMcpServers also filters managed servers, so a matching one will not load.

Managed controls over MCP servers and plugin sources

Setting What it controls Watch for
managed-mcp.json The only MCP servers users can use Blocks plugin servers and --mcp-config servers
managedMcpServers MCP servers delivered through managed settings No exclusive control
strictKnownMarketplaces Allowlist of marketplace sources [] blocks every source, even the official one
disableSideloadFlags Side-loading at startup Rejects --plugin-dir, --plugin-url and --agents

Exam trap managed-mcp.json cannot be delivered through server-managed settings. It is a standalone file, so use managedMcpServers to deliver servers that way.

Step 9 of 11

Endpoint-managed settings are harder for users to change. On MDM-enrolled devices, the OS can protect the settings file from user changes. But they do not reach cloud sessions, so add server-managed settings too. Those need Claude for Teams or Enterprise, and cached copies expire 24 hours after the last fetch.

Exam trap Group configurations do not merge with each other or the organization-wide one. Each must hold every setting that group needs.

Step 10 of 11

Fail-closed startup refuses to run without fresh policy. The CLI blocks at startup until server-managed settings are freshly fetched, and exits if the fetch fails. Hooks delivered this way also show interactive users a security approval dialog, because hooks run shell commands.

Step 11 of 11

  • Ship the workflow as a plugin in a marketplace, then install it with extraKnownMarketplaces and enabledPlugins.
  • Managed settings take precedence over every other scope, so central controls belong there.
  • Put a rule that must always hold in a plugin hook, not a skill or a plugin CLAUDE.md.
  • In CI, set CLAUDE_CODE_SYNC_PLUGIN_INSTALL=1 so plugins are ready before the first query.
  • allowManagedPermissionRulesOnly stops user, project and local permission rules from applying.

Sources: Create a marketplace - Claude Code Docs (opens in a new tab) · Manage Claude Code plugins for your organization - Claude Code Docs (opens in a new tab) · Add components to a plugin - Claude Code Docs (opens in a new tab) · Host and maintain a marketplace - Claude Code Docs (opens in a new tab) · Deploy managed settings - Claude Code Docs (opens in a new tab) · Configure server-managed settings - Claude Code Docs (opens in a new tab) · Control MCP server access for your organization - Claude Code Docs (opens in a new tab)

Check

Check: Packaging and Distributing Claude Code Workflows

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Agent SDK and Claude Code Configuration · 9 steps + check · 6 min

Domain 7 · Topic 2 of 3

Agent SDK and Claude Code Configuration

Step 1 of 9

Think first How would you set up Claude Code or the Agent SDK so a team's automation stays fast but inside its safety guardrails?

Why it matters: Questions describe a team workflow and its guardrails and ask which permission mode, hook, subagent or CI setting fits.

Permission modes decide which tool calls run without a prompt, from reads and pre-approved tools up to everything. Deny rules block in every mode, and a PreToolUse hook can allow, deny, ask or defer a call. Setting sources and flags such as --bare decide which settings and hooks a session loads.

Step 2 of 9

Term Meaning
Permission mode The session-wide baseline, such as acceptEdits or dontAsk, for which tool calls run without a prompt.
Deny rule A permission rule that blocks a tool in every mode, even bypassPermissions.
PreToolUse hook A hook that runs before a tool call and can allow, deny, ask or defer it.
canUseTool callback An Agent SDK callback that confirms calls no mode or rule has already approved.
settingSources The Agent SDK option that lists which settings files a session loads.

Step 3 of 9

Each mode trades prompts for automation differently. Match the mode to where the session runs and how much risk it may take.

Claude Code permission modes compared

Mode Runs without asking Note
acceptEdits Reads, file edits, mkdir, touch, mv, cp Calls it approves skip canUseTool
plan No edits until you approve a plan Exploring a codebase before changes
dontAsk Reads in working directories and pre-approved tools Locked-down CI and scripts
bypassPermissions Everything Isolated containers and VMs only

Exam trap dontAsk does not approve everything quietly. It denies any call that would need a prompt, so only pre-approved tools and reads run.

Step 4 of 9

allowedTools skips prompts for listed tools only. Claude can still call unlisted tools, and the permission mode decides those calls. Calls approved by a mode or an allow rule never reach canUseTool, so checks placed there are skipped. A matching ask rule, though, still sends the call to canUseTool, even in bypass mode.

Exam trap Putting a safety check in canUseTool is not enough on its own. Any tool already approved by acceptEdits or an allow rule bypasses it silently.

Step 5 of 9

A hook without a matcher fires for every event of its type. A matcher such as Write|Edit is tested against the tool name. A PreToolUse hook can answer allow, deny, ask or defer; defer ends the turn with tool_deferred for a later resume. Set onFailure to block so a failing hook stops the action. Filesystem hooks also fire inside subagents.

Step 6 of 9

Project rules count only when project settings are enabled. An explicit settingSources must include project for .claude/settings.json rules to count. An empty list loads no user, project or local files. For most single values, the SDK settings option beats those files; only managed policy ranks higher.

Step 7 of 9

--bare skips auto-discovery for a faster, cleaner start. With --bare, claude -p skips hooks, skills, subagents, plugins, MCP servers, memory and CLAUDE.md discovery. Without it, project hooks and .mcp.json servers load even in an untrusted folder, with no trust dialog. Container filesystem state is lost on restart or scale-down.

Exam trap A headless run does not show a workspace trust dialog. Without --bare, a cloned repo's hooks and MCP servers run automatically.

Step 8 of 9

maxTurns of 0 means unlimited; maxBudgetUsd of 0 fails. The CLI rejects a zero budget at startup, so the session never runs. Hitting a cap returns error_max_turns or error_max_budget_usd. A fallbackModel steps in when the primary is overloaded. In TypeScript, env replaces the environment; in Python it merges.

Step 9 of 9

  • Deny rules block a tool in every permission mode, including bypassPermissions.
  • allowedTools pre-approves listed tools but never restricts Claude to them.
  • Auto-approved calls never reach canUseTool, so do not rely on it alone.
  • Use dontAsk for locked-down CI and keep bypassPermissions for isolated containers.
  • A non-fork subagent sees only its prompt string, so pass every needed detail.

Sources: Choose a permission mode - Claude Code Docs (opens in a new tab) · Intercept and control agent behavior with hooks - Claude Code Docs (opens in a new tab) · Configure permissions - Claude Code Docs (opens in a new tab) · Run Claude Code programmatically - Claude Code Docs (opens in a new tab) · Configure your agent - Claude Code Docs (opens in a new tab) · Use Claude Code features in the SDK - Claude Code Docs (opens in a new tab) · Hosting the Agent SDK - Claude Code Docs (opens in a new tab) · Subagents in the SDK - Claude Code Docs (opens in a new tab)

Check

Check: Agent SDK and Claude Code Configuration

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Accountability for AI-Generated Code · 9 steps + check · 5 min

Domain 7 · Topic 3 of 3

Accountability for AI-Generated Code

Step 1 of 9

Think first When a team lets Claude write and review code, which controls keep a person accountable for what gets merged?

Why it matters: Questions describe a team's AI-assisted review process and ask which control keeps human ownership of the code.

Claude Code Review informs the merge decision but never makes it. It cannot approve, block or push, and a clean review is no guarantee. Branch protection can require each finding's thread to be resolved before merging, and only an Owner turns the service on or changes its scope.

Step 2 of 9

Term Meaning
Finding severity Important should be fixed before merging, Nit is minor and non-blocking, Pre-existing was not caused by the pull request.
REVIEW.md A file of review instructions read from the base or default branch, not the pull request.
Branch protection Repository rules, such as required conversation resolution, that gate what can merge.
Ultrareview A review that runs only when a user starts it with /code-review ultra; every finding is reproduced and verified.

Step 3 of 9

Code Review never approves or blocks a pull request. Its check run never ends as a failure, so it cannot fail a required check. Inside a review, repository access is read-only and no commits are pushed. The merge decision stays with the team.

Step 4 of 9

Findings can be ignored unless branch protection says otherwise. A pull request can merge with open findings unless conversation resolution is required. Replying to a finding does not dismiss it. Dismissing one without a code change means resolving the thread on GitHub.

Exam trap Answering a finding with a comment does not close it. The thread must be resolved, and only required resolution forces anyone to act.

Step 5 of 9

REVIEW.md is read from the base branch, never the pull request. So an author cannot weaken the rules in their own change. Rules that lower severity, exclude paths or cap nits apply only from a protected default branch. A ruleset counts as protection when it restricts updates or requires a fresh approval.

Step 6 of 9

Only an Owner turns on Code Review and sets its scope. Other developers must ask an Owner to adjust the level, when reviews run, or which repositories are covered. A comment command starts a review only from someone with write access.

Step 7 of 9

The managed service and local commands behave differently. Know which one a team relies on before trusting its output.

Managed Code Review and local review commands compared

Feature Managed Code Review Local /code-review
Instructions read CLAUDE.md and REVIEW.md CLAUDE.md only
Where it runs Anthropic infrastructure; no workflow files A Claude Code session on the user's own machine
Edits None: read-only, no commits Through the user's permission mode

Step 8 of 9

By default it hunts correctness bugs, not style. Formatting and missing tests are out of scope by default. Breaking a CLAUDE.md rule becomes a finding. Automatic reviews skip draft and fork pull requests. Organizations with Zero Data Retention or HIPAA settings cannot use it.

Step 9 of 9

  • Code Review never approves or blocks a pull request; the team decides the merge.
  • Require conversation resolution in branch protection so findings cannot be ignored.
  • REVIEW.md comes from the base branch, so a pull request cannot rewrite its own rules.
  • A review with no findings does not prove the code is correct or secure.

Sources: Code Review - Claude Code Docs (opens in a new tab) · Read and request reviews on a pull request - Claude Code Docs (opens in a new tab) · Set up Code Review - Claude Code Docs (opens in a new tab) · Customize Code Review - Claude Code Docs (opens in a new tab) · Find bugs with ultrareview - Claude Code Docs (opens in a new tab) · Review locally with /code-review - Claude Code Docs (opens in a new tab)

Check

Check: Accountability for AI-Generated Code

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Domain 7 · after the last topic

Domain 7 review

Each topic's Check tested it on its own; this mixes them.

Mixed quiz

Take the Domain 7 quiz

6 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.

Flashcards

Domain 7 flashcards

6 cards with this domain's key facts. Flip each one and check what you knew. No account needed.

Test yourself in exam conditions

A full Claude Certified Architect – Professional mock exam: 70 questions in 120 minutes, scored against the real exam's pass mark. Your first one is free.

Start a free mock exam
All domains studiedTry a timed mock exam

Report a problem

On “”. Tell us what looks wrong; we read every report.

What is the problem?

Optional.