🎓 Claude Certification Prep

Home › CCAR-P › M07

Developer Productivity and Operational Enablement

Domain 7 8% of exam 48 practice questions ~17 min read

Package Claude Code workflows as plugins, marketplaces, and managed settings; configure permission modes, hooks, subagents, and headless/CI operation for a team; and preserve human accountability for AI-generated code.

Skills measured in this domain:
  • Packaging and Distributing Claude Code Workflows: plugins (skills, hooks, subagents, commands, MCP), marketplace, managed settings
  • Agent SDK and Claude Code Configuration: permission modes (default, acceptEdits, plan, auto, dontAsk, bypassPermissions), hooks, subagents, headless/CI
  • Accountability for AI-Generated Code

Domain overview

Domain 7, "Developer Productivity and Operational Enablement", is 8% of the exam (about 5 scored items). Items typically show an artifact (a managed-settings.json file, a hook in .claude/settings.json, a CI step that calls claude -p, a description of a review process) and ask which control is missing, which mode is right, or what must be set at the organization level. Three skills are measured:

  1. Packaging and Distributing Claude Code Workflows: scaling one team's workflow across the organization (plugins, marketplace, managed settings); deciding which controls are enforced centrally and which are left to teams, so the workflow stays safe when it runs unattended.
  2. Agent SDK and Claude Code Configuration: permission modes, hooks, subagents, headless/CI.
  3. Accountability for AI-Generated Code: the control that preserves human ownership of code written by AI.

The key question: which layer does the control live in, and can the thing being controlled remove it on its own?

Layer Examples Nature
Advisory CLAUDE.md, skills Claude usually follows it
Deterministic in-session permission rules, modes, hooks Runs every time, for everyone
Operating system sandbox (filesystem + network) Blocks shell commands too
Repo branch protection, required checks The agent can't push directly to main
Organization managed settings (MDM / admin console) No one can override it

Key point

"A skill is a control, though an advisory one." A skill makes violations rare; a hook makes them nearly impossible. A policy that must always hold needs a deterministic layer behind it: a hook that blocks the action, plus the same check run again on the PR.

(Sources: CCAR-P Exam Guide, Domain 7; Anthropic Academy: The AI-native SDLC playbook — Skills as institutional knowledge)

Packaging and distributing workflows across the organization

Plugins: one install unit, one version

A plugin bundles skills, subagents, hooks, and MCP server configuration (plus commands, and also LSP servers, background monitors, and themes) into a single versioned unit you install once. Nothing needs rewriting; you just copy the pieces of .claude into the plugin structure:

svg-splitter-review/
├── .claude-plugin/plugin.json   ← manifest (optional)
├── skills/<skill-name>/SKILL.md
├── agents/<agent-name>.md
├── hooks/hooks.json             ← "hooks" object moved out of settings.json
└── .mcp.json
  • The manifest is optional and contains name, version, description, author; only name is required. Skills are namespaced as /plugin-name:skill-name. Version it like a dependency.
  • Test with claude --plugin-dir ./svg-splitter-review, then delete the originals in .claude; otherwise every hook runs twice.
  • Plugin hooks stack with your hooks; they don't replace them.

Exam trap

Installing a plugin "just for the skill" still brings in its hooks and MCP servers, which run code with your permissions; a Stop hook can call out to the network every turn without any warning. "Listed isn't the same as trusted": the community marketplace accepts author submissions, while the official marketplace is curated. Read the hooks, agents, and MCP servers before enabling a plugin.

Marketplaces and skill distribution paths

A team adds its own marketplace once (/plugin marketplace add your-org/claude-plugins); every /plugin install <name>@<marketplace> after that gets discovery, version tracking, and centralized updates.

Distribution path Scope When
Commit .claude/skills/ Anyone who clones the repo Project-specific standards
Plugin via marketplace Many repos, many teams Reusable workflows that need versioning
Managed settings (e.g., /etc/claude-code/.claude/skills/) Every machine it is deployed to Mandatory standards (security, compliance)

Name collisions: Enterprise (managed) → Personal → Project; plugin skills are namespaced, so they don't conflict. On Claude Enterprise, admins choose a posture: Open build, reviewed spread (Publishing = Requires review), Centralized (Owner provisioning), or Fully open.

(Sources: Anthropic Academy: Claude Code in action — Plugins; Anthropic Academy: Introduction to agent skills — Sharing skills; Anthropic Academy: Deploying Claude Enterprise with confidence — Governing customizations)

Managed settings: the part no one can turn off

The platform team deploys them via MDM or the admin console; engineers can't edit or override any key. An excerpt of the configuration for a tightly managed enterprise, from the SDLC playbook:

{
  "permissions": {
    "deny": ["Read(.env*)", "Read(./secrets/**)", "WebFetch", "Bash(curl *)"],
    "allow": ["Bash(git *)", "Bash(make test)", "Bash(make lint)"],
    "disableBypassPermissionsMode": "disable"
  },
  "allowManagedPermissionRulesOnly": true,
  "sandbox": { "enabled": true, "failIfUnavailable": true, "allowUnsandboxedCommands": false,
               "network": { "allowedDomains": ["git.internal.example.com"] } },
  "allowManagedHooksOnly": true,
  "disableSideloadFlags": true,
  "allowManagedMcpServersOnly": true,
  "strictKnownMarketplaces": [{ "source": "github", "repo": "example-corp/approved-plugins" }],
  "requiredMinimumVersion": "2.1.193"
}
  • deny keeps secrets out of the context; allow pre-approves the build/test loop to avoid prompt fatigue.
  • disableBypassPermissionsMode + allowManagedPermissionRulesOnly: no project file or CLI flag can loosen the rules.
  • sandbox: denying WebFetch does not block curl in the shell; an OS-level network allowlist does. failIfUnavailable + allowUnsandboxedCommands: false make the sandbox a prerequisite. The sandbox.credentials block stops the shell from reading ~/.ssh, because permissions.deny applies only to Claude's file tools.
  • allowManagedHooksOnly: only managed hooks run. disableSideloadFlags + strictKnownMarketplaces: every plugin must come from an approved marketplace. allowManagedMcpServersOnly: the tool surface is the platform team's allowlist. requiredMinimumVersion: Claude Code won't start below the evaluated version.

Enforce centrally or leave to teams?

Control Where it lives
Secret/egress denies, mandatory sandbox, no bypass Managed
Non-negotiable gates (production release) Managed hooks
Plugin/MCP sources, minimum version, OpenTelemetry destination Managed
CLAUDE.md, REVIEW.md, team skills and subagents Repo, reviewed like code
Formatter/linter hooks, hooks that block test edits .claude/settings.json in Git
Default model, effort cap, spend cap Admin console, by group/role

Exam trap

If you turn on allowManagedHooksOnly while the release gate is still in .claude/settings.json, the gate stops running: it must move into the hooks block of the managed file. Likewise, with allowManagedMcpServersOnly, the deploy server must be on the managed allowlist.

Scenario example

The Claims team has a secure-api-review skill, an endpoint-checking hook, a verifier subagent, a deploy MCP server, and a release gate. The CTO wants to scale this to 40 teams, including nightly jobs. Good answer: a versioned plugin on a private marketplace; managed settings enforce strictKnownMarketplaces, disableSideloadFlags, secret/egress denies, the sandbox, and no bypass, and keep the release gate in managed hooks; teams keep CLAUDE.md and REVIEW.md in their repos. Distractors: copying .claude via a wiki (no versioning), writing only a skill (advisory), letting nightly jobs run with bypassPermissions.

Configuring Claude Code and the Agent SDK for a team

Permission mode matrix

Mode Runs without asking Use when
Manual (default) Reads only Sensitive work with someone watching
acceptEdits Reads, file edits, common filesystem commands Iterating on code, reviewing afterward
plan Reads only; no file edits until the engineer accepts the plan Designing first
auto Everything, with a separate classifier model screening most actions first Hands-off work, including unattended work tasks
dontAsk Reads in the working directory + pre-approved tools; everything else is automatically denied CI, cron, overnight batches
bypassPermissions Skips every check (= --dangerously-skip-permissions) Only in an isolated container/VM
  • Shift+Tab cycles Manual → Accept edits → Plan → Auto. CLI: --permission-mode; SDK: permission_mode; settings: permissions.defaultMode (the values auto and bypassPermissions have no effect from project/local settings).
  • The auto-mode classifier blocks production deploys, migrations, force pushes, piping downloaded code into the shell, sending sensitive data outside, and deleting files that predate the session; it lets through local edits, lock-file installs, and pushes to branches that aren't deploy targets.

Key point

For unattended work runs, choose auto over bypass, paired with a Stop hook that runs the tests, because the classifier checks intent, not correctness. A pipeline needs a fixed, auditable tool surface: dontAsk + an allowlist.

Rules, precedence, and setting_sources

  • SDK: tools decides which built-ins exist; allowed_tools (--allowedTools) is only an allow rule and does not restrict tools; disallowed_tools removes them entirely. If you allow only mcp__github without removing Bash, the agent can still use gh.
  • MCP rules name the server and tool, not parameters, so split into one server per environment (deploy-staging, deploy-prod).
  • Precedence from highest to lowest: Managed → --settings (CLI) → .claude/settings.local.json → .claude/settings.json → ~/.claude/settings.json. Lists such as permissions.allow are merged across scopes unless allowManagedPermissionRulesOnly is set. Telemetry records rule_source (policySettings, projectSettings, cliArg…).
  • Since claude-agent-sdk 0.2, leaving setting_sources unset loads the machine's user and project settings. Set setting_sources=[] so the job behaves the same on every machine, so the repo under review can't configure its own reviewer, or when isolating tenants.

Hooks: the deterministic layer

  • PreToolUse is the enforcement primitive: it returns permissionDecision = allow/deny/ask, optionally with updatedInput (which replaces the entire input). PostToolUse handles format/lint; Stop refuses to finish while tests fail; SessionStart with the compact matcher re-injects context.
  • Exit 0 means success, 2 blocks (stderr is sent to Claude), and any other code doesn't block, including 1.
  • An Edit|Write hook doesn't fire when the shell edits a file, so the same script must be a required check on the PR.
{ "hooks": { "PreToolUse": [ { "matcher": "mcp__deploy-.*__release",
  "hooks": [ { "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/release-gate.sh", "args": [] } ] } ] } }

Gates by environment: in dev the hook returns allow; in staging ask, or allow when the pipeline runs from main; in production only status/rollback are on the allowlist, and release is denied unless the hook returns allow because an approved change ticket exists.

Exam trap

In a non-interactive run, no one answers an ask, so the call is denied. Under dontAsk, a call that a hook allows still runs; for release, which is outside the production allowlist, the hook is the only way through, so if the hook fails, the release is blocked (fail closed). The deny reason is shown to Claude, so it must state the path to approval. A gate is trustworthy only if the agent cannot write to the system of record the gate reads.

Subagents and headless/CI

  • Subagents: .claude/agents/*.md files (project) or ~/.claude/agents/; frontmatter name, description ("proactively" for automatic delegation), tools, model (alias, full ID, inherit), skills. Commit them to Git. The SDK uses AgentDefinition via agents={...} and needs "Agent" in allowed_tools; there is no time deadline, so cap runs with maxTurns. Subagents don't see skills invoked in the main session. Verifier pattern: tools: Bash, Read, report only.
  • claude -p loads the same hooks, skills, plugins, MCP, and CLAUDE.md as interactive mode; --bare skips all of them (requires ANTHROPIC_API_KEY). --output-format json --json-schema returns structured_output; --resume <session_id> chains steps; --max-turns caps the loop.
  • GitHub: managed Code Review (enabled by an Owner) posts findings by severity and never approves or blocks a PR; anthropics/claude-code-action@v1 is for custom CI (prompt, claude_args, trigger_phrase, use_bedrock/use_vertex/use_foundry).
  • Unattended SDK: permission_mode="dontAsk", max_turns, max_budget_usd (error_max_turns/error_max_budget_usd), strict_mcp_config=True, a pinned model, setting_sources=[].
claude -p "Release ${SHA} to staging, roll back if 5xx > 1%." \
  --allowedTools "mcp__deploy-staging__release,mcp__deploy-staging__status,mcp__deploy-staging__rollback" \
  --permission-mode dontAsk

Scenario example

An eval suite runs in CI whenever CLAUDE.md, .claude/**, or evals/** changes. An engineer wants to add --bare to speed it up. Reject it: --bare skips exactly CLAUDE.md, skills, and hooks, which is what is being tested. The suite also fails any run that edits files outside may_change, so the agent can't "pass" by editing the check itself.

(Sources: Anthropic Academy: Claude Code in action — Permission modes, Hooks, Scheduled tasks and headless, GitHub Actions and Code Review; Anthropic Academy: The AI-native SDLC playbook — Continuous evals in CI, Hooks as approval gates, CI/CD integration and deployment; Claude Cookbooks: Claude Agent SDK; Claude Code Docs: Settings)

Accountability for AI-generated code

Humans are accountable for every judgment call

The AI-native SDLC uses several layers of agent review; human review is reserved for tightly governed or critical code. The principle: "Humans remain accountable for every decision that requires judgment." Human attention moves up a level: does the change match the plan's intent, and is the risk acceptable?

Control What it preserves
Branch protection + code owner approval The approver is a named person
Separation of duties: the agent that writes the code has no way to approve it Author and approver are separate
Every agent change goes through a PR The PR is the audit record
plan.md committed along with who accepted it Intent is approved before code is generated
REVIEW.md (bugs/security/compliance, Important vs Nit) Consistent criteria
A hook that blocks test edits during fixes; an eval that blocks edits outside may_change The agent can't weaken the checks

Shadow mode first, merge gating later

The safe path: run AI review as advisory and non-blocking (shadow) alongside human review; the tech lead grades the findings monthly, caps Nits, and excludes generated paths. Only once the findings are trustworthy does a platform engineer gate merges on the per-severity finding counts that the check run publishes, and branch protection still requires code owner approval. Findings are input to a human decision, not a replacement for it.

Exam trap

Three answers that sound reasonable but are wrong: (1) "auto-merge once there are no Important findings", because you lose the named approver; (2) "have the session that wrote the code review it", because it carries the same assumptions that produced the code, so you need a clean context (/code-review, a subagent, a new session); (3) "the auto classifier let it through, so the code is correct".

Identity, evidence, and level of verification

  • An interactive session is attributed to the engineer running it; a non-interactive run executes under the agent's own identity, so logs can tell the agent apart from people.
  • CISO guide: at the two ends are service accounts (one job, least privilege) and human credentials; the middle ground (an agent carrying a person's delegated identity) blurs accountability. "Deliberately accepting risk is an act performed by humans."
  • Evidence comes from the toolchain (test output, check runs, hook logs via OpenTelemetry), not from Claude's summary.

Key point

Scale verification to how unsupervised the run was: read the diff, not the summary, turn tests into a gate with a Stop hook, check the JSON result and exit code of headless runs, and get a second opinion from a cold context. Look for out-of-scope changes, weakened tests, new packages, and hard-coded values.

Scenario example

After three months, review time is down but incidents are up: the agent's PRs are auto-merged by a bot once there are no findings, and some fixes also edited the assertions. Controls to add: mandatory code owner approval and a hook that blocks test-file edits during fixes, with the same script run as a required check; then re-measure defects caught before merge versus those that reach production. Adding a "don't edit tests" skill is not enough because skills are only advisory.

(Sources: Anthropic Academy: The AI-native SDLC playbook — What changes and where to start, Claude Code plan mode as the default starting point, Give Claude a feedback loop, AI in the PR review loop, CI/CD integration and deployment; Anthropic Academy: Claude Code in action — GitHub Actions and Code Review, Trust it: Verifying unsupervised runs; Anthropic Academy: Claude Code 101 — Code review; Claude Blog: CISO's guide to agentic AI)

Quick summary

  • A plugin bundles skills, subagents, hooks (hooks/hooks.json), MCP (.mcp.json), and commands; the manifest is optional, and only name is required.
  • Plugin hooks stack and run with your permissions; "listed" is not "trusted".
  • Skill distribution: repo, plugin/marketplace, managed (mandatory). Name collisions: Enterprise → Personal → Project.
  • Precedence: Managed → --settings → local → project → user; lists are merged unless allowManagedPermissionRulesOnly is set.
  • Managed settings hold the non-negotiables: secret/egress denies, sandbox, no bypass, managed hooks/MCP, strictKnownMarketplaces, requiredMinimumVersion.
  • allowManagedHooksOnly blocks project hooks: gates must live in managed hooks.
  • Denying WebFetch doesn't block curl; only the sandbox network allowlist does.
  • dontAsk: anything not pre-approved is automatically denied; use it for CI. bypassPermissions: only in an isolated container/VM.
  • Unattended work runs: auto + a Stop hook that runs the tests, not bypass.
  • allowed_tools doesn't restrict tools; MCP rules ignore parameters, so split servers by environment.
  • Hooks: exit 2 blocks, exit 1 doesn't; an ask in a non-interactive run is denied.
  • --bare skips CLAUDE.md/skills/hooks: don't use it when testing that very configuration.
  • Managed Code Review doesn't approve/block PRs; merges need a human code owner, and the agent that wrote the code can't approve it.
  • Run AI review in shadow (advisory) mode first, gate on finding counts later, and keep a named human approver.