What you will be able to do
- Decide which plugin component should carry each part of a proven workflow, and put a hard rule in a hook instead of an instruction
- Write plugin hooks and MCP servers that work after updates: use the full MCP tool name in matchers and keep state in ${CLAUDE_PLUGIN_DATA}
- Publish a workflow through a marketplace and choose between project-scope and managed-settings distribution
- Decide which controls managed settings enforce centrally and which ones teams keep, so that unattended and CI runs stay safe
Key concept
Instruction versus enforcement — Some parts of a workflow are text that the model reads and usually follows: CLAUDE.md, skills, commands and agent prompts. Other parts are mechanisms that Claude Code applies whatever the model decides: hooks, permission rules and managed settings. When you package a workflow for an organization, every rule that must hold on every run, including unattended ones, belongs in the second group.
1.What a plugin carries, and which parts enforce anything
A plugin is the unit you ship when a Claude Code workflow that works for one team has to work for everyone. Its files sit under one directory, the plugin root: skills in skills/, subagent definitions in agents/, hooks in hooks/hooks.json, and MCP server declarations in .mcp.json. A manifest at .claude-plugin/plugin.json names the plugin. That name becomes a prefix on every skill and agent the plugin provides, such as /my-plugin:hello, so two plugins can each ship a hello skill without colliding.
The components do two different kinds of work. Skills, commands and agents enter Claude's context as instructions. They change what Claude decides to do with the tools it already has, but they guarantee nothing. Hooks are shell commands that Claude Code runs at fixed points in its lifecycle, such as before or after a tool call, whatever the model decided. MCP servers add tools. Calls to those tools are still tool calls, so your permission rules apply to them.
A rule that cannot have exceptions goes in a hook. A PreToolUse hook with the matcher Write|Edit runs before every edit and can reject a protected path, whether the session is interactive or a headless CI run. Moving the paragraph into a different instruction-bearing file only changes where the model reads the rule. Delegating every edit to a subagent with a strict prompt fails the same way, and adds a weakness: plugin agent files ignore the permissionMode, hooks and mcpServers frontmatter fields, so a plugin agent cannot bring its own enforcement. Declare hooks and MCP servers at the plugin level.
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "\"${CLAUDE_PLUGIN_ROOT}/scripts/format.sh\""
}
]
}
]
}
}Every component has a cost even when it never runs. For each skill, agent and command that Claude can invoke on its own, the name and description stay in context on every turn. A plugin that bundles everything the pilot team ever wrote costs every adopting team context window, so ship only what the workflow needs.
Checkpoint 1 of 9· Match them up
A pilot team's workflow is being packaged as a plugin. Match each plugin component to the kind of work it does once teams install it.
Tap a term, then the definition that fits it.
Skills and agents only change what the model decides to do. Hooks run whatever the model decides, and MCP tool calls still go through permission rules. That is why rules that must always hold go in hooks declared at the plugin level, not in an agent's frontmatter.
“Skills, commands, and agents: these enter Claude’s context as instructions, so they influence what Claude does with the tools it already has.”Source: code.claude.com
Checkpoint 2 of 9· Exam question
A platform team piloted a Claude Code workflow with one team. Its core rule, never edit files under migrations/ or infra/prod/, lives as a paragraph in that team's CLAUDE.md, and unattended CI runs have occasionally ignored it. The workflow is being packaged as a plugin for the whole organization. How should the plugin carry this rule so that it holds on every run?
Correct answer: B — Add a PreToolUse hook in hooks/hooks.json matching Write|Edit that rejects protected paths, so the check runs on every edit.
- A. A plugin-root
CLAUDE.mdis not loaded as project context, so the rule would never reach the session. Instructions a plugin must ship go in a skill, and even then they are advisory rather than enforced. - B. A
PreToolUsehook registered by the plugin fires before each matching edit and can block it, so the rule holds even in unattended runs where nobody reads a prompt. Plugin hooks register when the plugin loads, so no skill has to be invoked first. - C. A skill is loaded only when Claude judges its description relevant, and its text is guidance the model can still overlook. That is the same failure the team saw with
CLAUDE.md, so it does not make the rule hold every time. - D. A subagent prompt is still an instruction, and nothing forces the main session to delegate edits to it. The main session can write to the protected folders directly, so the rule is not enforced.
2.Paths and MCP tool names that survive distribution
Something that works in the author's checkout can break once the plugin is installed and updated somewhere else. Two variables reach every hook process: CLAUDE_PLUGIN_ROOT and CLAUDE_PLUGIN_DATA. They look interchangeable, but they behave differently across updates.
| Variable | Points at | Across updates | Put here |
|---|---|---|---|
| ${CLAUDE_PLUGIN_ROOT} | cache/<marketplace>/<plugin>/<version>/ | Each new version gets a new directory | The scripts and files the plugin ships |
| ${CLAUDE_PLUGIN_DATA} | data/<plugin-id>/ | Kept across updates; deleted by default when the plugin is uninstalled from its last scope | Installed dependencies, caches, anything generated at runtime |
Two tempting fixes make things worse. Committing caches into the plugin folder under ${CLAUDE_PLUGIN_ROOT} bloats every release and still ties state to a single version. An absolute path to the author's own checkout does not exist on anyone else's machine.
Hook matchers on plugin MCP tools have a similar trap. A tool from an MCP server that the plugin declares is named mcp__plugin_<plugin>_<server>__<tool>. The matcher is compared against that full tool name, so a hook meant to block write queries to a server called db must name the server's tools in that form. A matcher written against the server name alone never fires, and the guard looks installed while it checks nothing.
Checkpoint 3 of 9· Check yourself
Teams report that your plugin's SessionStart hook rebuilds its Python virtualenv after each plugin release. Which change stops the rebuilds, and what should the plugin owner expect when the plugin is uninstalled?
${CLAUDE_PLUGIN_ROOT} points at the directory for one installed version, so anything built there is left behind when the plugin updates. ${CLAUDE_PLUGIN_DATA} is the plugin's persistent data directory. It is kept across updates and, by default, deleted when the plugin is uninstalled from its last scope. Committing the virtualenv makes every release bigger and still ties it to one version. The author's absolute path does not exist on other machines.
“Persistent data: by default, when that was the last scope the plugin was installed at, uninstalling also deletes the plugin’s persistent data directory.”Source: code.claude.com
Checkpoint 4 of 9· Exam question
A platform team packages a database MCP server and a pre-tool-use hook that blocks write queries, which the security owner requires before rollout. In testing the hook never triggers, and each plugin update wipes the server's installed dependencies. Which two changes resolve both problems? Choose two.(Select 2)
Correct answers: A, C — Set the hook's matcher to the namespaced tool name that a plugin's MCP server exposes, with its plugin and server prefix, instead of the bare server name from the config file.; Move the server's installed dependencies and caches into the plugin's persistent data directory, instead of the plugin's install directory, and point the server at that location.
- A. Tools from a plugin's MCP server carry a namespaced name that includes the plugin, the server and the tool. A matcher on the bare server name never matches, so the write-blocking hook never fires. Matching the namespaced name fixes that.
- B. The label in the MCP status view is a display name for the server. Hook matchers are compared against tool names, not that label, so reloading the plugin changes nothing. The hook still never fires and the required write blocking stays inactive.
- C. Each plugin version gets its own install directory, so anything written there is lost on update. The persistent data directory survives updates, so the server's dependencies and caches belong there, with the server pointed at that path.
- D. Vendored dependencies still sit in the per-version install directory, so the underlying problem of where state lives is untouched. Native dependencies built on one OS or architecture also break on other machines, and the repository bloats with generated files.
- E. An absolute path into one author's checkout does not exist on other machines, so the hook and the server would fail for every other installer. That defeats packaging the plugin for rollout, and it still does not fix the hook's matcher.
3.Publishing through a marketplace
A marketplace is a catalog that lists plugins and where to fetch each one. It is a marketplace.json file under .claude-plugin/, and it can live in a git repository. Each entry's name is what people type before the @ when they install, as in claude plugin install my-first-plugin@my-marketplace. Run claude plugin validate on the marketplace before anyone adds it.
{
"name": "my-marketplace",
"description": "Plugins for my team",
"owner": {
"name": "Your Name"
},
"plugins": [
{
"name": "my-first-plugin",
"source": "./plugins/my-first-plugin",
"description": "A greeting plugin to learn the basics"
}
]
}Claude Code sorts every marketplace into one of three tiers, and the tier decides how its plugins are reported. The official tier is Anthropic's own marketplace names, such as claude-plugins-official. The community tier is claude-community, claude-plugins-community and healthcare. The third-party tier is every other marketplace, and a marketplace your organization publishes is third-party. That does not stop it from loading or installing plugins. The consequence shows up in telemetry: the plugin loaded event (whose plugin.name and marketplace.name fields say what loaded) and the Claude Code Analytics API both report your company plugins as the literal string third-party, so a usage dashboard cannot tell them apart. Set OTEL_LOG_TOOL_DETAILS=1 to get real names in the loaded event. The event's plugin.scope field still says where a plugin came from, such as org for a plugin your managed settings enable and user-local for any other third-party plugin, which lets you separate required plugins from ones people added themselves. Never give your marketplace an official or community name: if its source is outside github.com/anthropics/, Claude Code stops loading the marketplace and the plugins installed from it.
After installation, the files on disk can change unless you control updates. If auto-update is on for a marketplace, Claude Code updates its plugins in the background, so the hooks you reviewed may not be the hooks that run tomorrow. You have three ways to hold the content still. Setting version in the manifest keeps users on that version until you change it. Pinning an archive source to a sha256 digest makes Claude Code refuse an install whose download doesn't match. For CI images, you can install plugins into a seed directory at build time with CLAUDE_CODE_PLUGIN_CACHE_DIR. Claude Code never writes to the seed and forces autoUpdate off for seed marketplaces.
Project scope is the lightest way to roll out a plugin to one team. A committed .claude/settings.json enables the plugin for everyone who works in the repository, but each collaborator still installs it on their own machine. Project scope also leaves an opt-out: users can turn the plugin off with claude plugin disable.
Checkpoint 5 of 9· Check yourself
Security signed off on the hooks in your company plugin. The plugin is installed from a marketplace with auto-update on. Which step makes sure the reviewed files are the ones that get installed?
With auto-update on, plugins update in the background, so the hooks on disk can change after the review. A sha256 digest pinned to an archive source makes Claude Code refuse any download that doesn't match the reviewed content. Project scope only controls who has the plugin enabled. OTEL_LOG_TOOL_DETAILS only changes how plugins are reported. Background updates do not run claude plugin validate.
“when a marketplace entry pins an archive source to a sha256 digest and the downloaded file’s digest doesn’t match it, Claude Code refuses the install”Source: code.claude.com
4.Requiring a plugin everywhere with managed settings
Managed settings are how an organization makes a plugin mandatory. You put extraKnownMarketplaces and enabledPlugins in managed settings, not in a repository or a user's home directory. In managed settings, enabledPlugins: true force-enables a plugin and false blocks it at every scope.
{
"extraKnownMarketplaces": {
"your-marketplace": {
"source": { "source": "github", "repo": "your-org/your-marketplace" },
"autoUpdate": true
}
},
"enabledPlugins": {
"code-formatter@your-marketplace": true,
"deploy-helper@your-marketplace": true
}
}Where you put the same two keys decides whether the plugin loads on every run. A repository's .claude/settings.json registers its marketplace only after the contributor accepts the workspace trust dialog. In a non-interactive -p run, its marketplace entry applies only in a folder whose trust was already accepted interactively, which a fresh CI runner usually doesn't have. An onboarding script that writes to ~/.claude/settings.json reaches only the users it ran for, and they can edit the file afterwards. Managed extraKnownMarketplaces and enabledPlugins apply at session start on every machine that receives the settings, including -p and CI runs, where installs run in the background. Agent SDK sessions load managed settings even when settingSources excludes the user, project and local files.
| Mechanism | How it arrives | When Claude Code reads it | Use it when |
|---|---|---|---|
| Server-managed settings | claude.ai admin console or a self-hosted Claude apps gateway | Fetched at startup and polled hourly | You want one place to change policy for a claude.ai organization |
| MDM or OS-level policy | macOS configuration profile or Windows HKLM registry value, via Jamf, Intune or Group Policy | At startup, then checked for changes every 30 minutes | You already manage devices with MDM or Group Policy |
| File-based | managed-settings.json in the system directory on each machine | At startup, and reloaded when the file changes | Machines without MDM, Linux hosts, images you build yourself |
Choose the mechanism by where sessions run. An Anthropic-hosted cloud session doesn't read a device's MDM profile or managed file, so its policy has to come from server-managed settings. When several sources exist, the default first-wins behaviour picks one by rank and ignores the rest without a warning. The order, highest first, is server-managed settings, then MDM or OS-level policy, then the managed settings files (managed-settings.json and managed-settings.d/*.json merged together). The Windows HKCU registry value ranks below all three: it is user-writable, so Claude Code reads it only when no admin source sits above it. A source counts only if it delivers at least one policy key, so a file holding nothing but wslInheritsWindowsSettings or managedSourcesBehavior is passed over. In practice, a managed-settings.json on a laptop is ignored once server-managed settings deliver any policy key, apart from a few keys that Claude Code reads from every admin source. Setting managedSourcesBehavior to merge (Claude Code v2.1.242 or later) combines every admin source instead. /status names the source it used and the ones it skipped. To confirm a rollout on a CI runner, run claude -p with --output-format stream-json --verbose and read the loaded plugins in the init event.
Checkpoint 6 of 9· Fill the gap
This managed settings file must make two plugins load on every machine that receives it. Which key belongs in the blank?
{
"extraKnownMarketplaces": {
"your-marketplace": {
"source": { "source": "github", "repo": "your-org/your-marketplace" },
"autoUpdate": true
}
},
" ? ": {
"code-formatter@your-marketplace": true,
"deploy-helper@your-marketplace": true
}
}In managed settings, enabledPlugins with true force-enables each plugin from the marketplace that extraKnownMarketplaces registers. strictKnownMarketplaces is only an allowlist of marketplace sources. It does not register a marketplace or enable any plugin, so it cannot make a plugin load.
Source: code.claude.comCheckpoint 7 of 9· Check yourself
Nightly jobs run claude -p on freshly provisioned Linux runners. The platform team committed extraKnownMarketplaces and enabledPlugins for the company plugin to each repository's .claude/settings.json. The init event still shows that the plugin is missing. What fixes the rollout?
In -p runs, a repository's marketplace entry applies only in folders whose trust was already accepted interactively, and a fresh runner has no such folders. Managed extraKnownMarketplaces and enabledPlugins apply at session start in -p and CI runs. A file-based managed-settings.json suits images you build yourself. The allowlist registers nothing, laptop scripts never reach the runners, and the stream-json flags only report which plugins loaded.
“-p and CI | Applied at session start, with installs running in the background | extraKnownMarketplaces in trusted folders only”Source: code.claude.com
Checkpoint 8 of 9· Exam question
A security architect must guarantee that every Claude Code installation in the organization, including managed laptops and CI runners, loads the approved review-kit plugin from the company marketplace, and that developers cannot switch it off at their own scope. Which delivery approach meets this requirement?
Correct answer: C — Push extraKnownMarketplaces and enabledPlugins set to true in the managed settings file to each machine, so the plugin installs at the next session start.
- A. Project settings apply only in repositories that carry the file, and the marketplace prompt depends on the contributor trusting the folder. A developer can also override the entry in a local settings file. Installations outside those repositories get nothing, so the plugin is not guaranteed to load organization-wide.
- B. A user-scope file belongs to the developer, who can edit it or disable the plugin there whenever they like. CI runners that never go through an interactive login never run the onboarding script, so nothing is enforced.
- C. Managed settings sit at the top of the precedence order, so a plugin enabled there still loads when a developer disables it in their own settings. Delivered by a managed file, MDM or the admin console, the keys register the marketplace and install the plugin on every covered machine.
- D.
strictKnownMarketplacesis an allowlist that restricts which marketplaces may be added. It does not register the marketplace or enable any plugin, so review-kit is still not installed or loaded, and developers can simply skip it.
5.Which controls to enforce centrally for unattended runs
The question to ask of each control is whether a session with nobody watching stays safe if a team changes the setting. A plugin's hooks, monitors and MCP servers run as the user, with full user permissions, outside the sandbox. A CI run has no human to decline a suspicious prompt. Anything that decides what code executes, or which permissions apply, belongs in managed settings. Everything else can stay with teams.
| Key | What it enforces | What it can't do |
|---|---|---|
| strictKnownMarketplaces | Allowlist of marketplace sources; [] blocks every source | Register a marketplace, restrict entries inside an allowed marketplace, or block --plugin-dir |
| blockedMarketplaces | Blocklist of marketplace sources, checked before the allowlist | Block a marketplace already registered from a source it doesn't match |
| disableSideloadFlags | Rejects --plugin-dir, --plugin-url, --agents and the Agent SDK plugins option at startup | Restrict .mcp.json, claude mcp add, or SDK-provided servers; pair it with allowedMcpServers |
| allowManagedHooksOnly | Restricts which hooks run | Trust hooks from plugins users enable themselves |
| strictPluginOnlyCustomization | Blocks skills, agents, hooks and MCP servers from user and project sources | Restrict which plugins users install, or reject sideloading flags |
Each gap in the last column has a concrete shape:
strictKnownMarketplacesonly filters sources. It installs nothing, it does not look inside an allowed marketplace, and a developer can still load a local plugin with--plugin-dir.blockedMarketplacesmatches on a marketplace's source. A marketplace that was already registered from a different source than the one the blocklist names is not caught, so block the source it actually came from.disableSideloadFlagscloses the command-line routes. A repository's committed.mcp.json, aclaude mcp addrun, or a server an Agent SDK app supplies still adds MCP servers, which is why it is paired withallowedMcpServers.allowManagedHooksOnlylets only managed hooks, Agent SDK hooks and hooks from plugins your managed settings force-enable run. A plugin a team installs on its own is not trusted, so its hooks are blocked. To ship vetted hooks, distribute the plugin through your organization marketplace and force-enable it by its fullplugin@marketplaceID; a same-named plugin from another marketplace stays blocked.strictPluginOnlyCustomizationblocks skills, agents, hooks and MCP servers that come from user and project files, but it says nothing about which plugins people install or which flags sideload them. Pair it withstrictKnownMarketplacesanddisableSideloadFlags.
No single key covers everything, which is why the table's last column matters. A marketplace allowlist doesn't stop --plugin-dir, and disableSideloadFlags doesn't stop a repository's .mcp.json. A central baseline usually combines several keys. Marketplace lists are rechecked at every session start, so a plugin installed from a source that is no longer allowed stops loading.
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./secrets/**)"
],
"disableBypassPermissionsMode": "disable"
},
"allowManagedPermissionRulesOnly": true
}Teams keep real room inside that baseline. With file-based delivery, each team can add its own file to the managed-settings.d/ drop-in directory. Lists such as permissions.deny from different files combine, and for a single value the later file replaces the earlier one. A repository also cannot escalate itself: auto or bypassPermissions as defaultMode in .claude/settings.json doesn't take effect. For CI, teams choose an exact allowlist with --permission-mode dontAsk, which denies anything that would prompt. Fully unattended --dangerously-skip-permissions runs belong only inside a container or VM. Setting each run's mode and scopes is covered in permission modes and headless configuration, and the size of each allowlist in least-privilege tool configuration.
Rollouts take time to reach long-running sessions. Most managed changes reach a running session on the mechanism's polling schedule. requiredMinimumVersion blocks an outdated binary from starting but doesn't end a session that's already running, so a session left open for weeks can still lag a policy change.
Checkpoint 9 of 9· Match them up
Your security team is assembling a central baseline for unattended CI runs out of several managed keys. Match each key to what it enforces, including the gap that another key has to cover.
Tap a term, then the definition that fits it.
Each key closes one path and leaves others open. The allowlist doesn't stop --plugin-dir, and disableSideloadFlags doesn't stop .mcp.json, so a safe unattended baseline combines several keys.
“Doesn’t register a marketplace, restrict entries inside an allowed marketplace, or block --plugin-dir”Source: code.claude.com
Sources
(11)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://code.claude.com/docs/en/plugins/createOfficial docs
“Where the files go: under the plugin’s own directory, called the plugin root, as skills/, agents/, hooks/hooks.json, and .mcp.json.”
↩︎ What a plugin carries, and which parts enforce anything“plugin skills and agents get the plugin name as a prefix, such as /my-plugin:hello”
↩︎ What a plugin carries, and which parts enforce anything“version: optional. Setting it keeps users on that version until you change it”
↩︎ Publishing through a marketplace - 2.https://code.claude.com/docs/en/plugins/securityOfficial docs
“a plugin’s hooks run as shell commands at points in Claude Code’s lifecycle, such as before or after a tool call.”
↩︎ What a plugin carries, and which parts enforce anything“are tool calls, so your permission rules apply to them”
↩︎ What a plugin carries, and which parts enforce anything“Claude Code reports plugins from the official and community tiers by name and reports every other plugin as third-party.”
↩︎ Publishing through a marketplace“the loaded event’s plugin.scope still reports where the plugin came from, such as org for a plugin your managed settings enable”
↩︎ Publishing through a marketplace“Claude Code stops loading the marketplace and the plugins you installed from it.”
↩︎ Publishing through a marketplace“so the files you reviewed can change on disk”
↩︎ Publishing through a marketplace“Claude Code refuses the install.”
↩︎ Publishing through a marketplace“command hooks and monitors are shell commands that run with your full user permissions.”
↩︎ Which controls to enforce centrally for unattended runs“Claude Code runs hooks, monitors, MCP servers, LSP servers, and the processes a mod starts outside the sandbox.”
↩︎ Which controls to enforce centrally for unattended runs“Skills, commands, and agents: these enter Claude’s context as instructions”
↩︎ Exam trap 1“Skills, commands, and agents: these enter Claude’s context as instructions, so they influence what Claude does with the tools it already has.”
↩︎ Checkpoint“Persistent data: by default, when that was the last scope the plugin was installed at, uninstalling also deletes the plugin’s persistent data directory.”
↩︎ Checkpoint“when a marketplace entry pins an archive source to a sha256 digest and the downloaded file’s digest doesn’t match it, Claude Code refuses the install”
↩︎ Checkpoint - 3.https://code.claude.com/docs/en/plugins/componentsOfficial docs
“Ignored fields: permissionMode, hooks, mcpServers, and initialPrompt.”
↩︎ What a plugin carries, and which parts enforce anything“An agent file can’t add hooks or MCP servers on its own, so add those as plugin hooks and MCP servers instead”
↩︎ What a plugin carries, and which parts enforce anything“every hook process receives CLAUDE_PLUGIN_ROOT and CLAUDE_PLUGIN_DATA in its environment”
↩︎ Paths and MCP tool names that survive distribution“a tool from an MCP server this plugin declares is named mcp__plugin_<plugin>_<server>__<tool>, so write that full name in the matcher.”
↩︎ Paths and MCP tool names that survive distribution“a tool from an MCP server this plugin declares is named mcp__plugin_<plugin>_<server>__<tool>, so write that full name in the matcher.”
↩︎ Exam trap 3 - 4.https://code.claude.com/docs/en/plugins/overviewOfficial docs
“the name and description are in Claude’s context on every turn so that Claude knows it exists”
↩︎ What a plugin carries, and which parts enforce anything“A marketplace your coworker or your organization publishes is third-party.”
↩︎ Publishing through a marketplace“Project scope: enabled for everyone who works in this repository, through the committed .claude/settings.json. Each collaborator still installs it on their own machine”
↩︎ Publishing through a marketplace - 5.https://code.claude.com/docs/en/plugins/loadingOfficial docs
“One directory per installed version of a marketplace plugin.”
↩︎ Paths and MCP tool names that survive distribution“Claude Code creates it when a plugin component first uses it and keeps it across updates.”
↩︎ Paths and MCP tool names that survive distribution“Claude Code creates it when a plugin component first uses it and keeps it across updates.”
↩︎ Exam trap 2 - 6.
“name: the identifier people type before @ when they install.”
↩︎ Publishing through a marketplace - 7.https://code.claude.com/docs/en/plugins/orgOfficial docs
“Read-only: Claude Code never writes to the seed and forces autoUpdate off for seed marketplaces.”
↩︎ Publishing through a marketplace“users opt out with claude plugin disable, not by removing the marketplace.”
↩︎ Publishing through a marketplace“true force-enables, false blocks at every scope and hides the plugin”
↩︎ Requiring a plugin everywhere with managed settings“Interactive sessions: Claude Code registers the marketplace only after the contributor accepts the workspace trust dialog for that folder.”
↩︎ Requiring a plugin everywhere with managed settings“Applied at session start, with installs running in the background”
↩︎ Requiring a plugin everywhere with managed settings“The init event lists the loaded plugins under plugins.”
↩︎ Requiring a plugin everywhere with managed settings“Doesn’t trust hooks from plugins users enable themselves”
↩︎ Which controls to enforce centrally for unattended runs“Doesn’t block a marketplace already registered from a source it doesn’t match”
↩︎ Which controls to enforce centrally for unattended runs“Doesn’t restrict .mcp.json, claude mcp add, or SDK-provided servers. Pair it with allowedMcpServers”
↩︎ Which controls to enforce centrally for unattended runs“the lists apply again to plugins that are already installed, so an installed plugin whose marketplace source no longer matches doesn’t load.”
↩︎ Which controls to enforce centrally for unattended runs“Doesn’t register a marketplace, restrict entries inside an allowed marketplace, or block --plugin-dir”
↩︎ Exam trap 4“the entries apply only in a folder whose trust the user already accepted interactively”
↩︎ Exam trap 5“a managed enabledPlugins entry that force-enables it”
↩︎ Prediction“-p and CI | Applied at session start, with installs running in the background | extraKnownMarketplaces in trusted folders only”
↩︎ Checkpoint“Doesn’t register a marketplace, restrict entries inside an allowed marketplace, or block --plugin-dir”
↩︎ Checkpoint - 8.https://code.claude.com/docs/en/managed-settingsOfficial docs
“Agent SDK sessions load managed settings even when settingSources excludes the user, project, and local files.”
↩︎ Requiring a plugin everywhere with managed settings“a session in an Anthropic-hosted environment doesn’t read a device’s MDM profile or file, so policy for it has to come from server-managed settings.”
↩︎ Requiring a plugin everywhere with managed settings“Claude Code uses the highest-ranked source that delivers at least one policy key and ignores the rest rather than merging them”
↩︎ Requiring a plugin everywhere with managed settings“MDM or OS-level policies: the macOS plist or the HKLM registry key”
↩︎ Requiring a plugin everywhere with managed settings“Claude Code reads it only when no admin document is present above it”
↩︎ Requiring a plugin everywhere with managed settings“Policy key: any settings key other than the two control keys, wslInheritsWindowsSettings and managedSourcesBehavior.”
↩︎ Requiring a plugin everywhere with managed settings“Lists, such as permissions.deny or sandbox.network.allowedDomains: the two lists combine, with duplicates removed”
↩︎ Which controls to enforce centrally for unattended runs“requiredMinimumVersion blocks an outdated binary from starting and doesn’t end a session that’s already running.”
↩︎ Which controls to enforce centrally for unattended runs - 9.https://code.claude.com/docs/en/settings-referenceOfficial docs
“Claude Code matches on the full plugin@marketplace ID, so a plugin with the same name from a different marketplace stays blocked.”
↩︎ Which controls to enforce centrally for unattended runs“This lets you distribute vetted hooks through an organization marketplace while blocking everything else.”
↩︎ Which controls to enforce centrally for unattended runs - 10.https://code.claude.com/docs/en/permission-modesOfficial docs
“If you set "bypassPermissions" in those two files, it doesn’t take effect either”
↩︎ Which controls to enforce centrally for unattended runs“anything that would prompt is denied”
↩︎ Which controls to enforce centrally for unattended runs
Also cited
- https://code.claude.com/docs/en/best-practicesOfficial docs
“Non-deterministic: you write the instruction, and Claude (the model) reads it. This can be your prompt, CLAUDE.md, or a skill.”
↩︎ Key concept“A prompt alone can’t guarantee either of those.”
↩︎ Prediction