Developer Productivity and Operational Enablement
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.
- 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:
- 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.
- Agent SDK and Claude Code Configuration: permission modes, hooks, subagents, headless/CI.
- 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; onlynameis 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"
}
denykeeps secrets out of the context;allowpre-approves the build/test loop to avoid prompt fatigue.disableBypassPermissionsMode+allowManagedPermissionRulesOnly: no project file or CLI flag can loosen the rules.sandbox: denyingWebFetchdoes not blockcurlin the shell; an OS-level network allowlist does.failIfUnavailable+allowUnsandboxedCommands: falsemake the sandbox a prerequisite. Thesandbox.credentialsblock stops the shell from reading~/.ssh, becausepermissions.denyapplies 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 valuesautoandbypassPermissionshave 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:
toolsdecides which built-ins exist;allowed_tools(--allowedTools) is only an allow rule and does not restrict tools;disallowed_toolsremoves them entirely. If you allow onlymcp__githubwithout removing Bash, the agent can still usegh. - 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 aspermissions.alloware merged across scopes unlessallowManagedPermissionRulesOnlyis set. Telemetry recordsrule_source(policySettings,projectSettings,cliArg…). - Since claude-agent-sdk 0.2, leaving
setting_sourcesunset loads the machine's user and project settings. Setsetting_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
PreToolUseis the enforcement primitive: it returnspermissionDecision=allow/deny/ask, optionally withupdatedInput(which replaces the entire input).PostToolUsehandles format/lint;Stoprefuses to finish while tests fail;SessionStartwith thecompactmatcher re-injects context.- Exit
0means success,2blocks (stderr is sent to Claude), and any other code doesn't block, including1. - An
Edit|Writehook 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/*.mdfiles (project) or~/.claude/agents/; frontmattername,description("proactively" for automatic delegation),tools,model(alias, full ID,inherit),skills. Commit them to Git. The SDK usesAgentDefinitionviaagents={...}and needs"Agent"inallowed_tools; there is no time deadline, so cap runs withmaxTurns. Subagents don't see skills invoked in the main session. Verifier pattern:tools: Bash, Read, report only. claude -ploads the same hooks, skills, plugins, MCP, andCLAUDE.mdas interactive mode;--bareskips all of them (requiresANTHROPIC_API_KEY).--output-format json --json-schemareturnsstructured_output;--resume <session_id>chains steps;--max-turnscaps 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@v1is 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 pinnedmodel,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 onlynameis 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 unlessallowManagedPermissionRulesOnlyis set. - Managed settings hold the non-negotiables: secret/egress denies, sandbox, no bypass, managed hooks/MCP,
strictKnownMarketplaces,requiredMinimumVersion. allowManagedHooksOnlyblocks project hooks: gates must live in managed hooks.- Denying
WebFetchdoesn't blockcurl; 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_toolsdoesn't restrict tools; MCP rules ignore parameters, so split servers by environment.- Hooks: exit
2blocks, exit1doesn't; anaskin a non-interactive run is denied. --bareskipsCLAUDE.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.