Doramagic Project Pack · Human Manual

claude-code

Related topics: Installation and Setup, Slash Commands, Plugin System Architecture

Claude Code Overview

Related topics: Installation and Setup, Slash Commands, Plugin System Architecture

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Directory Structure

Continue reading this section for the full explanation and source context.

Section Plugin Components

Continue reading this section for the full explanation and source context.

Section Plugin Manifest (plugin.json)

Continue reading this section for the full explanation and source context.

Related topics: Installation and Setup, Slash Commands, Plugin System Architecture

Claude Code Overview

Claude Code is Anthropic's official command-line interface for coding with Claude AI. It provides a terminal-based development environment where Claude can read and modify files, execute commands, git operations, browse the web, and use tools to assist with software development tasks.

What is Claude Code?

Claude Code extends Claude's capabilities into a full-featured coding assistant that integrates directly into your terminal workflow. The tool enables AI-assisted development by combining:

  • Natural language understanding for interpreting developer requests
  • File system access for reading, writing, and modifying code
  • Command execution for running build tools, tests, and scripts
  • Git operations for version control workflows
  • Web browsing for research and documentation lookup
  • Tool orchestration for coordinated multi-step tasks

Source: plugins/README.md:1-8

Plugin System Architecture

Claude Code features an extensible plugin system that allows developers to create custom commands, agents, skills, and integrations. The plugin architecture follows a standardized directory structure with auto-discovery capabilities.

Directory Structure

plugin-name/
├── plugin.json          # Plugin manifest
├── commands/            # Slash commands
├── agents/              # Specialized AI agents
├── skills/              # Domain knowledge bases
├── hooks/               # Event-driven automation
├── mcp/                 # MCP server configurations
├── examples/            # Example files
└── README.md            # Plugin documentation

Source: plugins/plugin-dev/skills/plugin-structure/README.md:15-22

Plugin Components

ComponentPurposeFile Type
CommandsSlash commands invoked by usersMarkdown with YAML frontmatter
AgentsAutonomous AI agents for specific tasksMarkdown files with system prompts
SkillsKnowledge bases with references and examplesMarkdown with progressive disclosure
HooksEvent-driven automation (PreToolUse, etc.)JSON configuration + optional scripts
MCPModel Context Protocol server integrationJSON configuration

Source: plugins/plugin-dev/README.md:28-34

Plugin Manifest (plugin.json)

The plugin.json manifest defines plugin metadata and component discovery:

{
  "name": "plugin-name",
  "version": "1.0.0",
  "description": "What this plugin does",
  "author": "Author Name",
  "components": {
    "commands": ["commands/*.md"],
    "agents": ["agents/*.md"],
    "skills": ["skills/*/SKILL.md"]
  }
}

Source: plugins/plugin-dev/skills/plugin-structure/README.md:24-32

Portable Path References

Plugins use ${CLAUDE_PLUGIN_ROOT} for portable path references, allowing plugins to be distributed without hardcoded paths:

# Example in a hook script
cd ${CLAUDE_PLUGIN_ROOT}
./scripts/validate.sh

Source: plugins/plugin-dev/skills/plugin-structure/README.md:34-36

Official Plugins

Claude Code ships with several official plugins in the plugins/ directory.

Plugin Development Toolkit

A comprehensive toolkit for building Claude Code plugins with seven specialized skills:

SkillFocus AreaTrigger Phrases
Hook DevelopmentAdvanced hooks API and event-driven automation"create a hook", "add a hook", "hook configuration"
MCP IntegrationModel Context Protocol server integration"add MCP server", "integrate MCP", "MCP configuration"
Plugin StructurePlugin organization and manifest configuration"plugin structure", "plugin layout", "manifest file"
Plugin SettingsConfiguration patterns using .claude files"add settings", "user preferences", "plugin configuration"
Command DevelopmentCreating slash commands with frontmatter"create a slash command", "add a command"
Agent DevelopmentCreating autonomous agents"create an agent", "add an agent", "write a subagent"
Skill DevelopmentCreating skills with progressive disclosure"create a skill", "add knowledge", "skill structure"

Source: plugins/plugin-dev/README.md:12-21

Feature Development Plugin

The /feature-dev command provides a systematic 7-phase approach to building features:

graph TD
    A[Phase 1: Discovery] --> B[Phase 2: Codebase Exploration]
    B --> C[Phase 3: Clarifying Questions]
    C --> D[Phase 4: Architecture Design]
    D --> E[Phase 5: Implementation]
    E --> F[Phase 6: Quality Review]
    F --> G[Phase 7: Completion]

Phase Overview:

PhaseGoalKey Activities
1. DiscoveryUnderstand what needs to be builtClarify requirements, identify constraints
2. Codebase ExplorationUnderstand existing code and patternsLaunch code-explorer agents in parallel
3. Clarifying QuestionsFill gaps and resolve ambiguitiesAsk specific questions before proceeding
4. Architecture DesignDesign elegant solutionsPresent architecture for approval
5. ImplementationBuild the featureTrack progress with TodoWrite
6. Quality ReviewEnsure code qualityVerify correctness and patterns
7. CompletionFinalize and summarizePresent final implementation

Source: plugins/feature-dev/README.md:30-60

PR Review Toolkit

The pr-review-toolkit plugin bundles 6 expert review agents for comprehensive pull request analysis:

AgentFocusTriggers
comment-analyzerComment accuracy and maintainability"Check if the comments are accurate"
pr-test-analyzerTest coverage quality"Review test coverage for this PR"
silent-failure-hunterError handling and silent failures"Find silent failures"
type-design-analyzerType design and usage"Review type safety"
code-reviewerGeneral code quality"Review my recent changes"
code-simplifierCode refactoring"Simplify this code"

Source: plugins/pr-review-toolkit/README.md:10-40

Agent SDK Development Plugin

The agent-sdk-dev plugin streamlines Claude Agent SDK application development:

Command: /new-sdk-app

Interactive workflow that:

  1. Asks clarifying questions about project requirements
  2. Checks for and installs the latest SDK version
  3. Creates project files and configuration
  4. Sets up environment files (.env.example, .gitignore)
  5. Runs type checking or syntax validation
  6. Verifies setup using verifier agents

Supported Languages: TypeScript, Python

Source: plugins/agent-sdk-dev/README.md:20-45

Commit Commands Plugin

The commit-commands plugin provides git workflow automation:

CommandPurpose
/commitAnalyze and commit changes with descriptive messages
/commit-push-prCommit, push, and create PR with full history analysis
/clean_goneRemove local branches whose remote counterparts are deleted

Source: plugins/commit-commands/README.md:1-25

Frontend Design Plugin

Automatically used for frontend work, creating production-ready code with:

  • Bold aesthetic choices
  • Distinctive typography and color palettes
  • High-impact animations
  • Context-aware implementation

Source: plugins/frontend-design/README.md:1-18

Commands Development

Slash commands are Markdown files with YAML frontmatter that define user-invokable actions.

Command File Structure

Source: https://github.com/anthropics/claude-code / Human Manual

Installation and Setup

Related topics: Claude Code Overview, Configuration and Settings

Section Related Pages

Continue reading this section for the full explanation and source context.

Related topics: Claude Code Overview, Configuration and Settings

Installation and Setup

Overview

This page covers all methods for installing Claude Code and configuring your development environment, including global installation via npm, containerized development using Dev Containers, and enterprise deployment through Mobile Device Management (MDM) systems.

Claude Code is distributed as a Node.js package and can be installed on macOS, Linux, and Windows systems. The installation process differs slightly between platforms, with support for both interactive terminal usage and headless/server deployment scenarios.

Source: https://github.com/anthropics/claude-code / Human Manual

Configuration and Settings

Related topics: Claude Code Overview, Managed Settings Reference

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Project-Level Configuration

Continue reading this section for the full explanation and source context.

Section User-Level Configuration

Continue reading this section for the full explanation and source context.

Section Managed Settings (Enterprise)

Continue reading this section for the full explanation and source context.

Related topics: Claude Code Overview, Managed Settings Reference

Configuration and Settings

Claude Code provides a flexible configuration system that allows users and organizations to customize behavior through multiple configuration layers. This system supports per-project settings via files, per-user settings in the home directory, and enterprise-wide managed settings deployed through MDM (Mobile Device Management) solutions.

Overview

The configuration system in Claude Code operates across three distinct layers:

graph TD
    A[Configuration Layers] --> B[Project Level<br/>CLAUDE.md + .claude/settings.json]
    A --> C[User Level<br/>~/.claude/settings.json]
    A --> D[Enterprise Level<br/>Managed Settings via MDM]
    
    B --> E[Project-specific rules<br/>Custom commands<br/>Local plugin configs]
    C --> F[Default model<br/>Permission modes<br/>Global preferences]
    D --> G[Organizational policies<br/>Disabled features<br/>Security enforcement]

Each layer has a specific scope and purpose. Project-level settings take precedence for local customization, while enterprise managed settings enforce organizational policies that cannot be overridden by individual users.

Source: examples/settings/README.md:1-15

Configuration Files

Project-Level Configuration

#### CLAUDE.md

The CLAUDE.md file in a project root provides project-specific instructions that Claude Code reads at the start of each session. This file defines:

  • Project purpose and context
  • Coding standards and conventions
  • Build and test commands
  • Important file locations
  • Development workflows
# Project Name

This is a Next.js application with TypeScript.

## Development
- Run `npm run dev` to start development server
- Use `npm test` for testing

## Code Standards
- All components must use TypeScript
- Follow the existing component patterns in /components

Note: CLAUDE.md rules are not propagated to Agent subagents, and rule adherence may degrade after context compaction. Source: Community Issue #59309

#### Local Settings (.claude/settings.json)

The .claude/settings.json file in a project contains local configuration overrides:

{
  "permissions": {
    "allowGdp": true,
    "autoApprove": false
  },
  "resume": true,
  "dangerouslySkipUriPermissionsPrompt": false
}

Source: examples/settings/README.md:20-30

User-Level Configuration

Located at ~/.claude/settings.json, user-level settings provide defaults that apply across all projects:

{
  "permissions": {
    "defaultMode": "auto"
  },
  "model": "claude-opus-4-5",
  "maxTokens": 8192
}

Known Issue: The permission mode "auto" is not inherited in new sessions and cannot be set mid-session. Source: Community Issue #55558

Managed Settings (Enterprise)

Enterprise deployments use managed settings to enforce organizational policies. These settings are deployed through MDM solutions and cannot be overridden by users.

#### Deployment Methods

PlatformMethodFile Location
Jamf / KandjiCustom Settings payloadcom.anthropic.claudecode.plist
IntunePlatform scriptsSet-ClaudeCodePolicy.ps1
Group PolicyJSON configurationSystem config directory
Any platformDirect JSONSystem config directory

Source: examples/mdm/README.md:1-25

#### Example Managed Settings

{
  "permissions": {
    "disableBypassPermissionsMode": true
  }
}

Source: examples/mdm/managed-settings.json:1-5

Settings Configuration Options

Permission Settings

Permissions control what actions Claude Code can perform without explicit user confirmation:

graph LR
    A[Permission Modes] --> B[auto<br/>Confirm dangerous ops]
    A --> C[full<br/>All operations allowed]
    A --> D[restricted<br/>Read-only by default]
    
    B --> E[Ask before bypass]
    C --> F[No restrictions]
    D --> G[Explicit approval needed]
SettingTypeDescription
defaultModestringDefault permission mode: auto, full, or restricted
allowGdpbooleanAllow GDP operations
autoApprovebooleanAutomatically approve safe operations
disableBypassPermissionsModebooleanPrevent users from bypassing permission mode (managed only)

Source: examples/settings/settings-strict.json:1-15

Behavior Settings

These settings control Claude Code's operational behavior:

| outputFormat | string | "text" | Output format: text or stream

SettingTypeDefaultDescription
resumebooleanfalseResume previous session automatically
dangerouslySkipUriPermissionsPromptbooleanfalseSkip URI permission prompts
gitPromptReplacementstring"y"Default response for git prompts

Source: examples/settings/settings-strict.json:1-20

Preset Configuration Profiles

Claude Code includes preset configuration profiles for common use cases:

Strict Profile

Designed for security-conscious environments:

{
  "permissions": {
    "defaultMode": "restricted",
    "allowGdp": false,
    "autoApprove": false
  },
  "resume": false,
  "dangerouslySkipUriPermissionsPrompt": false
}

Source: examples/settings/settings-strict.json:1-10

Lax Profile

Provides maximum convenience with minimal friction:

{
  "permissions": {
    "defaultMode": "auto",
    "allowGdp": true,
    "autoApprove": true
  },
  "resume": true
}

Source: examples/settings/settings-lax.json:1-10

Bash Sandbox Profile

Restricts command execution to sandboxed environments:

{
  "permissions": {
    "defaultMode": "restricted",
    "allowGdp": false,
    "autoApprove": false
  },
  "sandbox": {
    "enabled": true,
    "allowedPaths": ["/tmp/sandbox"],
    "deniedCommands": ["rm", "dd", "mkfs"]
  }
}

Source: examples/settings/settings-bash-sandbox.json:1-15

Plugin Settings

Plugins can define their own configuration system using per-project settings files. This follows a standardized pattern:

Configuration File Pattern

Plugin settings are stored in .claude/plugin-name.local.md files with YAML frontmatter:

Source: https://github.com/anthropics/claude-code / Human Manual

Slash Commands

Related topics: Claude Code Overview, Agents and Subagents, Hooks System

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Core Characteristics

Continue reading this section for the full explanation and source context.

Related topics: Claude Code Overview, Agents and Subagents, Hooks System

Slash Commands

Slash Commands are user-defined shortcuts that trigger Claude to execute predefined workflows, prompts, or actions. They provide a way to encapsulate common development tasks, automate repetitive workflows, and extend Claude Code's capabilities beyond its built-in commands.

Overview

Slash Commands serve as a trigger mechanism that invokes Claude with a specific prompt and context. When invoked with /command-name, Claude executes the command's defined workflow, which can include argument handling, file references, bash execution, and integration with other Claude Code components like agents and skills.

Core Characteristics

CharacteristicDescription
FormatMarkdown files with optional YAML frontmatter
Location.claude/commands/ (project) or plugin command directories
Invocation/command-name followed by optional arguments
ArgumentsSupport for positional ($1, $2) and $ARGUMENTS
Tool AccessConfigurable via allowed-tools frontmatter field

Source: plugins/plugin-dev/skills/command-development/SKILL.md

File Structure

Slash Commands are stored as Markdown (.md) files with a specific structure:

Source: https://github.com/anthropics/claude-code / Human Manual

Agents and Subagents

Related topics: Slash Commands, Plugin System Architecture

Section Related Pages

Continue reading this section for the full explanation and source context.

Section YAML Frontmatter Fields

Continue reading this section for the full explanation and source context.

Section System Prompt Structure

Continue reading this section for the full explanation and source context.

Related topics: Slash Commands, Plugin System Architecture

Agents and Subagents

Agents are specialized AI subagents that Claude Code uses to perform focused, autonomous tasks. They operate as independent problem-solving units that can analyze code, generate implementations, validate outputs, and orchestrate complex workflows. The agent system enables Claude to delegate specific responsibilities to purpose-built agents, improving task specialization and reducing context overhead.

Architecture Overview

Agents in Claude Code are defined as Markdown files with YAML frontmatter that configure their behavior, capabilities, and triggering conditions. Each agent consists of:

  1. YAML Frontmatter — Metadata that defines the agent's identity, model preferences, available tools, and trigger conditions
  2. System Prompt — Detailed instructions that guide the agent's behavior and decision-making process
  3. Resources — Optional references, examples, and scripts that provide additional context
graph TD
    A[Main Claude Session] -->|launches| B[Agent]
    B --> C[YAML Frontmatter]
    B --> D[System Prompt]
    B --> E[Resources]
    B --> F{Tools}
    F --> G[Read]
    F --> H[Write]
    F --> I[Bash]
    F --> J[Edit]
    F --> K[Grep]

Agent File Structure

Agents are stored as .md files in either user-level (~/.claude/agents/) or project-level (.claude/agents/) directories.

YAML Frontmatter Fields

FieldTypeRequiredDescription
namestringYesUnique identifier for the agent
descriptionstringYesHuman-readable description of the agent's purpose
modelstringNoPreferred model for this agent (defaults to main session model)
colorstringNoUI color indicator for agent output
toolsarrayNoList of tools the agent can use
triggersarrayNoPhrases that should activate this agent

Source: plugins/plugin-dev/skills/agent-development/SKILL.md

System Prompt Structure

The system prompt defines what the agent actually does. Effective system prompts follow these patterns:

  • Analysis — Code review, pattern identification, architecture assessment
  • Generation — Code creation, file scaffolding, template population
  • Validation — Quality checking, error detection, compliance verification
  • Orchestration — Coordinating multiple tasks, managing workflows

Source: https://github.com/anthropics/claude-code / Human Manual

Hooks System

Related topics: Slash Commands, Plugin System Architecture

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Hook Execution Model

Continue reading this section for the full explanation and source context.

Section Hook Types

Continue reading this section for the full explanation and source context.

Section hooks.json Structure

Continue reading this section for the full explanation and source context.

Related topics: Slash Commands, Plugin System Architecture

Hooks System

The Hooks System in Claude Code provides event-driven automation that intercepts and responds to specific actions during Claude's execution. Hooks enable developers to validate operations, enforce policies, trigger notifications, and modify behavior at key points in the tool-use lifecycle.

Overview

Hooks serve as middleware between Claude Code and tool execution, allowing custom logic to run before tools are invoked, after tools complete, or when specific events occur. This system is fundamental to building security-conscious plugins, implementing workflow automation, and customizing Claude Code behavior.

The Hooks System supports multiple programming languages for hook implementations, with primary support for Python and Bash scripts. Hooks are configured through a declarative hooks.json file that defines which hooks to activate and their execution parameters.

Key capabilities:

  • Intercept tool execution for validation and modification
  • Enforce security policies and best practices
  • Automate workflows based on conversation events
  • Provide warnings and阻止 potentially dangerous operations
  • Enable custom logging and analytics

Source: plugins/plugin-dev/skills/hook-development/SKILL.md

Architecture

Hook Execution Model

graph TD
    A[User Request] --> B[Tool Selection]
    B --> C{PreToolUse Hooks}
    C -->|Allow| D[Execute Tool]
    C -->|Block| E[Show Warning]
    C -->|Modify| F[Modified Tool Call]
    D --> G[Tool Result]
    G --> H{PostToolUse Hooks}
    H --> I[Process Result]
    I --> J[Continue Conversation]
    
    K[Stop Event] --> L[Stop Hooks]
    L --> M[Continue/Cancel Decision]

Hook Types

Hook TypeTriggerPurpose
PreToolUseBefore tool executionValidate, modify, or block tool calls
PostToolUseAfter tool executionLog, transform results, or trigger actions
StopWhen conversation attempts to endContinue iteration or allow termination
PreConversationBefore conversation startsInitialize context or settings
PostConversationAfter conversation endsCleanup or final reporting

Source: plugins/plugin-dev/skills/hook-development/SKILL.md

Configuration

hooks.json Structure

Hooks are configured in hooks/hooks.json within a plugin or project's .claude directory:

{
  "hooks": [
    {
      "name": "security-reminder",
      "description": "Warns about potentially dangerous operations",
      "events": ["PreToolUse"],
      "parallel": false
    }
  ]
}

Configuration fields:

FieldTypeRequiredDescription
namestringYesUnique identifier for the hook
descriptionstringYesHuman-readable description of hook purpose
eventsarrayYesArray of event types to listen for
parallelbooleanNoExecute hooks in parallel when true (default: false)

Source: plugins/security-guidance/hooks/hooks.json

Event Mapping

EventDescriptionAvailable Data
PreToolUseBefore any tool is usedTool name, arguments, session context
PostToolUseAfter any tool completesTool name, result, error status
StopConversation termination requestedExit reason, session state

Source: plugins/hookify/hooks/hooks.json

PreToolUse Hooks

PreToolUse hooks execute before tool invocation, allowing validation, modification, or blocking of tool calls.

Execution Flow

graph TD
    A[PreToolUse Event] --> B{Continue?}
    B -->|No| C[Return Continue: false]
    B -->|Yes| D{Should Modify?}
    D -->|No| E[Execute Original Tool Call]
    D -->|Yes| F[Return Modified Tool Call]
    F --> G[Execute Modified Tool Call]
    
    style B fill:#f9f,color:#000
    style D fill:#ff9,color:#000

Return Values

A PreToolUse hook can return one of the following:

ReturnEffect
{ continue: true }Proceed with original tool call
{ continue: false, response: "message" }Block tool, show message
{ continue: true, toolCall: modifiedCall }Execute modified tool call

Source: plugins/hookify/hooks/pretooluse.py

Example: Security Reminder Hook

#!/usr/bin/env python3
"""Security reminder hook for dangerous operations."""

SECURITY_PATTERNS = [
    ("rm -rf", "Recursive removal can permanently delete files"),
    ("eval", "Dynamic code execution is a security risk"),
    ("chmod 777", "World-writable permissions are insecure"),
    # ... additional patterns
]

def pretoolusehook(tool_name, tool_input):
    """Check for potentially dangerous commands."""
    if tool_name == "Bash":
        command = tool_input.get("command", "")
        for pattern, warning in SECURITY_PATTERNS:
            if pattern in command:
                return {
                    "continue": True,
                    "response": f"Warning: {warning}\n\nCommand: {command}"
                }
    return {"continue": True}

Source: plugins/security-guidance/hooks/security_reminder_hook.py

PostToolUse Hooks

PostToolUse hooks execute after tool completion, enabling result processing, logging, and follow-up actions.

Execution Flow

graph TD
    A[Tool Execution Complete] --> B[PostToolUse Hook Called]
    B --> C{Process Result?}
    C -->|Log| D[Write to Log/Analytics]
    C -->|Transform| E[Modify Response]
    C -->|Trigger| F[Execute Follow-up Action]
    B --> G[Return Processed Result]

Return Values

ReturnEffect
{ continue: true }Return original result
{ continue: true, response: modified }Return modified result
{ continue: false }Block result propagation

Source: plugins/hookify/hooks/posttooluse.py

Stop Hooks

Stop hooks intercept conversation termination, enabling autonomous iteration loops and workflow continuation.

Example: Ralph-Wiggum Iteration Hook

The Ralph-Wiggum plugin demonstrates Stop hooks for iterative development:

{
  "name": "continue-iteration",
  "description": "Intercept stop to continue iteration loop",
  "events": ["Stop"]
}
#!/bin/bash
# Continue iteration if work remains
if [ -f "$HOOK_STATE_FILE" ]; then
    echo "Work remains, continuing iteration..."
    exit 0  # Allow continuation
fi
exit 1  # Allow stop

Source: plugins/hookify/hooks/stop.py

Stop Event Data

FieldTypeDescription
reasonstringReason for stop request
hasErrorbooleanWhether an error triggered the stop
sessionStateobjectCurrent session context

Development Workflow

Creating a Hook

  1. Plan hook behavior:
  • Identify which event to hook (PreToolUse, PostToolUse, Stop)
  • Define validation criteria or modifications
  • Determine return values
  1. Create hook implementation:
  • Python scripts for complex logic
  • Bash scripts for simple operations
  • Include proper shebang for execution
  1. Register in hooks.json:
  • Add hook configuration with name, description, events
  • Set parallel execution if needed
  1. Test and validate:

Best Practices

PracticeRationale
Use Python for complex logicBetter string parsing, regex, data structures
Use Bash for simple checksFaster startup, system command access
Return quickly when possibleMinimize latency impact on tool execution
Log errors gracefullyPrevent hook failures from breaking tools
Document pattern matchingHelp maintainers understand validation rules

Source: plugins/plugin-dev/skills/hook-development/SKILL.md

Hookify Plugin

The Hookify plugin provides a simplified interface for creating hooks without editing complex JSON files.

Features

  • Pattern-based rules: Define hooks through markdown configuration
  • Automatic analysis: Detects unwanted behaviors from conversation history
  • Quick enable/disable: Toggle rules without restart
  • Regex support: Powerful pattern matching capabilities

Usage

# Create rule from explicit instruction
/hookify Warn me when I use rm -rf commands

# Analyze conversation for patterns
/hookify

# List all rules
/hookify:list

# Configure rules interactively
/hookify:configure

Hookify Rule Format

# .claude/hookify.warn-rm.local.md

Source: https://github.com/anthropics/claude-code / Human Manual

Plugin System Architecture

Related topics: Official Plugins Reference, Slash Commands, Agents and Subagents, Hooks System

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Directory Organization Patterns

Continue reading this section for the full explanation and source context.

Section Manifest Fields

Continue reading this section for the full explanation and source context.

Section Example Manifest

Continue reading this section for the full explanation and source context.

Related topics: Official Plugins Reference, Slash Commands, Agents and Subagents, Hooks System

Plugin System Architecture

Claude Code's plugin system provides an extensible framework for customizing and extending the CLI's behavior through a modular architecture. Plugins can add commands, agents, skills, hooks, and MCP server integrations that integrate seamlessly with Claude Code's core functionality.

Overview

The plugin architecture is designed around several core principles:

  • Auto-discovery: Plugins are automatically discovered and loaded from standard locations
  • Component-based: Plugins compose functionality from reusable components
  • Portable paths: All file references use ${CLAUDE_PLUGIN_ROOT} for portability
  • Progressive disclosure: Documentation layers allow for incremental complexity
  • Validation-first: Components are validated before deployment

Source: plugins/plugin-dev/skills/plugin-structure/SKILL.md

Directory Structure

Plugins follow a standardized directory structure that enables Claude Code to discover and load components automatically.

plugin-name/
├── plugin.json              # Plugin manifest
├── README.md                # Documentation
├── commands/                # Slash commands
│   ├── command-name.md
│   └── ...
├── agents/                  # Subagent definitions
│   ├── agent-name.md
│   └── ...
├── skills/                  # Skill definitions
│   ├── skill-name/
│   │   ├── SKILL.md
│   │   ├── README.md
│   │   ├── references/
│   │   └── examples/
│   └── ...
├── hooks/                   # Hook configurations
│   ├── hooks.json
│   └── scripts/
├── mcp/                     # MCP server configurations
│   └── .mcp.json
└── scripts/                 # Utility scripts
    └── ...

Source: plugins/plugin-dev/skills/plugin-structure/references/component-patterns.md

Directory Organization Patterns

PatternUse CaseStructure
MinimalSingle-purpose pluginsFlat structure with plugin.json and one component
StandardProduction pluginsOrganized directories per component type
AdvancedEnterprise pluginsMulti-level organization, shared libraries, MCP servers

Source: plugins/plugin-dev/skills/plugin-structure/references/component-patterns.md

Plugin Manifest

The plugin.json manifest is the entry point for every plugin. It declares metadata, dependencies, and the components available in the plugin.

Manifest Fields

FieldTypeRequiredDescription
namestringYesUnique identifier for the plugin
versionstringYesSemantic version string
descriptionstringYesHuman-readable description
authorsstring[]NoList of author names or emails
homepagestringNoURL to plugin homepage
readmestringNoPath to README file (default: README.md)
licensestringNoSPDX license identifier
commandsstring[]NoPaths to command files
agentsstring[]NoPaths to agent files
skillsstring[]NoPaths to skill directories
hooksstringNoPath to hooks.json file
mcpServersstring[]NoPaths to MCP server configurations
conditionsobjectNoRuntime conditions for plugin activation

Source: plugins/plugin-dev/skills/plugin-structure/references/manifest-reference.md

Example Manifest

{
  "name": "pr-review-toolkit",
  "version": "1.0.0",
  "description": "Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification",
  "authors": ["Claude Team <[email protected]>"],
  "readme": "README.md",
  "license": "MIT",
  "commands": [
    "commands/pr-review.md"
  ],
  "agents": [
    "agents/comment-analyzer.md",
    "agents/pr-test-analyzer.md",
    "agents/silent-failure-hunter.md",
    "agents/type-design-analyzer.md",
    "agents/code-reviewer.md",
    "agents/code-simplifier.md"
  ]
}

Source: .claude-plugin/marketplace.json

Component Types

The plugin system supports five primary component types, each serving a distinct purpose in extending Claude Code's functionality.

graph TD
    A[Plugin] --> B[Commands]
    A --> C[Agents]
    A --> D[Skills]
    A --> E[Hooks]
    A --> F[MCP Servers]
    
    B --> B1[User-initiated actions]
    C --> C1[Autonomous subagents]
    D --> D1[Specialized knowledge]
    E --> E1[Event-driven automation]
    F --> F1[External service integration]

Source: plugins/plugin-dev/README.md

Commands

Commands are slash-prefixed actions that users invoke directly. They are defined as markdown files with YAML frontmatter.

Frontmatter Fields:

FieldTypeDescription
descriptionstringHelp text shown in command list
argument-hintstringPlaceholder text for arguments
allowed-toolsstring[]Tools the command may use

Source: plugins/plugin-dev/skills/plugin-structure/references/manifest-reference.md

Example Command Structure:

Source: https://github.com/anthropics/claude-code / Human Manual

Official Plugins Reference

Related topics: Plugin System Architecture, MDM and Enterprise Deployment

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Component Types

Continue reading this section for the full explanation and source context.

Section plugin-dev

Continue reading this section for the full explanation and source context.

Section feature-dev

Continue reading this section for the full explanation and source context.

Related topics: Plugin System Architecture, MDM and Enterprise Deployment

Official Plugins Reference

This reference documents the official plugins bundled with Claude Code, designed to extend and enhance the development workflow. These plugins provide specialized capabilities for feature development, code review, security analysis, plugin creation, and autonomous task execution.

Overview

Official plugins are pre-installed components that Claude Code automatically loads to provide domain-specific expertise and automation. Each plugin is self-contained with its own commands, agents, skills, and hooks that activate based on user interactions.

PluginPrimary Purpose
plugin-devBuild new Claude Code plugins
feature-devSystematic feature development workflow
pr-review-toolkitComprehensive PR review agents
code-reviewGeneral code quality review
commit-commandsGit commit generation and management
security-guidanceSecurity vulnerability detection
agent-sdk-devAgent SDK application development
frontend-designProduction-grade frontend generation
hookifyCustom hook creation from patterns
ralph-wiggumAutonomous iterative development loops

Source: plugins/README.md

Plugin Architecture

Claude Code plugins follow a standardized structure with auto-discovery mechanisms. Each plugin can contain multiple component types that integrate seamlessly with the core Claude Code experience.

graph TD
    A[Claude Code] --> B[Plugin Directory]
    B --> C[plugin.json Manifest]
    B --> D[commands/]
    B --> E[agents/]
    B --> F[skills/]
    B --> G[hooks/]
    B --> H[.mcp.json]
    
    C --> I[Metadata & Auto-discovery]
    D --> J[Slash Commands]
    E --> K[Autonomous Subagents]
    F --> L[Specialized Knowledge]
    G --> M[Event-driven Automation]
    H --> N[External MCP Servers]

Component Types

ComponentDescriptionActivation
CommandsSlash commands prefixed with /User invocation
AgentsAutonomous subagents with specialized promptsTrigger phrases
SkillsProgressive disclosure documentationContext matching
HooksEvent-driven automation scriptsTool use, prompts, exits
MCPModel Context Protocol server integrationsService configuration

Source: plugins/plugin-dev/skills/plugin-structure/README.md

Development Plugins

plugin-dev

The plugin development toolkit provides comprehensive guidance for building Claude Code plugins. It offers a guided 8-phase workflow command and seven specialized skills covering all aspects of plugin creation.

Main Command: /plugin-dev:create-plugin

Supported Skill Areas:

SkillFocus Area
Hook DevelopmentAdvanced hooks API and event-driven automation
MCP IntegrationModel Context Protocol server integration
Plugin StructurePlugin organization and manifest configuration
Plugin Settings.claude/plugin-name.local.md configuration patterns
Command DevelopmentSlash commands with frontmatter and arguments
Agent DevelopmentAutonomous agents with AI-assisted generation
Skill DevelopmentProgressive disclosure and strong trigger phrases

Source: plugins/plugin-dev/README.md

#### Plugin Creation Workflow

The /plugin-dev:create-plugin command guides users through an 8-phase process:

PhaseGoalKey Actions
1DiscoveryUnderstand plugin purpose and requirements
2Component PlanningDetermine skills, commands, agents, hooks, MCP
3Detailed DesignSpecify each component and resolve ambiguities
4Structure CreationSet up directories and manifest
5Component ImplementationCreate each component using AI-assisted agents
6ValidationRun plugin-validator and component checks
7TestingVerify plugin works in Claude Code
8DocumentationFinalize README and prepare for distribution

Source: plugins/plugin-dev/commands/create-plugin.md

feature-dev

The Feature Development Plugin implements a systematic 7-phase workflow that prioritizes codebase understanding before implementation.

Command: /feature-dev

7-Phase Process:

graph LR
    A[Discovery] --> B[Codebase Exploration]
    B --> C[Clarifying Questions]
    C --> D[Architecture Design]
    D --> E[Implementation]
    E --> F[Review & Quality]
    F --> G[Cleanup]
PhaseDescription
DiscoveryClarify what needs to be built, identify constraints
Codebase ExplorationLaunch code-explorer agents to analyze existing patterns
Clarifying QuestionsResolve all ambiguities before implementation
Architecture DesignDesign elegant, maintainable solutions
ImplementationWrite code following project standards
Review & QualityVerify quality and CLAUDE.md compliance
CleanupRemove artifacts and finalize

Source: plugins/feature-dev/README.md

agent-sdk-dev

The Agent SDK Development Plugin streamlines creating Claude Agent SDK applications in Python and TypeScript.

Command: /new-sdk-app

Features:

  • Interactive project scaffolding
  • Latest SDK version detection and installation
  • Environment configuration (.env.example, .gitignore)
  • Working examples tailored to use case
  • Automatic setup verification

Agent: agent-sdk-verifier - Validates applications against best practices

Source: plugins/agent-sdk-dev/README.md

Code Review Plugins

pr-review-toolkit

The PR Review Toolkit bundles six specialized review agents for comprehensive pull request analysis.

AgentFocusTriggers
comment-analyzerCode comment accuracy"Check if comments are accurate"
pr-test-analyzerTest coverage quality"Review test coverage"
silent-failure-hunterError handling"Review error handling"
type-design-analyzerType system design"Check type design"
code-reviewerGeneral guidelines"Review my changes"
code-simplifierCode clarity"Simplify this code"

Command: /pr-review-toolkit:review-pr

Options: comments, tests, errors, types, code, simplify, all

Source: plugins/pr-review-toolkit/README.md

code-review

A lightweight code review plugin for general quality assessment against project guidelines.

commit-commands

Git commit management plugin with commands for generating and managing commit messages.

Automation Plugins

hookify

The Hookify plugin enables creating custom hooks without editing complex hooks.json files. Users create markdown configuration files with regex patterns.

Commands:

  • /hookify - Create rules from instructions or conversation analysis
  • /hookify:list - List all active rules
  • /hookify:configure - Enable/disable rules interactively

Example:

/hookify Warn me when I use rm -rf commands

Creates .claude/hookify.warn-rm.local.md with the specified rule. Rules take effect immediately without restart.

Source: plugins/hookify/README.md

security-guidance

Security reminder hook that monitors file edits for potential security vulnerabilities.

Hook Type: PreToolUse

Monitored Patterns (9 total):

  • Command injection
  • Cross-site scripting (XSS)
  • eval() usage
  • Dangerous HTML generation
  • Pickle deserialization
  • os.system calls
  • And additional vulnerability patterns

Source: plugins/security-guidance/README.md

ralph-wiggum

Interactive autonomous iteration plugin where Claude works on the same task repeatedly until completion.

Commands:

  • /ralph-loop - Start autonomous iteration
  • /cancel-ralph - Stop iteration loop

Hook: Stop - Intercepts exit attempts to continue iteration

Design Plugins

frontend-design

Generates production-grade frontend interfaces with distinctive aesthetics that avoid generic AI patterns.

Capabilities:

  • Bold aesthetic choices
  • Distinctive typography and color palettes
  • High-impact animations
  • Context-aware implementation

Usage:

"Create a dashboard for a music streaming app"
"Build a landing page for an AI security startup"
"Design a settings panel with dark mode"

Source: plugins/frontend-design/README.md

Installation

Official plugins are included in the Claude Code repository. To use them in your own projects:

# Install Claude Code globally
npm install -g @anthropic-ai/claude-code

# Navigate to your project
cd your-project

# Run Claude Code
claude

# Install additional plugins from marketplaces
/plugin install <plugin-name>

Plugins can also be configured in your project's .claude/settings.json:

{
  "plugins": ["plugin-dev", "feature-dev", "pr-review-toolkit"]
}

Source: plugins/README.md

Plugin Structure Reference

Directory Layout

plugin-name/
├── plugin.json          # Manifest with metadata
├── commands/            # Slash commands (*.md)
├── agents/              # Autonomous agents (*.md)
├── skills/              # Specialized knowledge
│   └── SKILL.md         # Core skill content
├── hooks/               # Hook configurations
│   └── hooks.json       # Hook definitions
├── .mcp.json            # MCP server configurations
└── README.md            # Plugin documentation

Source: plugins/plugin-dev/skills/plugin-structure/README.md

Command Organization

Commands support namespacing with colons:

Source: https://github.com/anthropics/claude-code / Human Manual

MDM and Enterprise Deployment

Related topics: Managed Settings Reference, Configuration and Settings

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Managed Settings JSON

Continue reading this section for the full explanation and source context.

Section macOS Deployment

Continue reading this section for the full explanation and source context.

Section Windows Deployment

Continue reading this section for the full explanation and source context.

Related topics: Managed Settings Reference, Configuration and Settings

MDM and Enterprise Deployment

Overview

Claude Code supports enterprise deployment through Mobile Device Management (MDM) systems and Group Policy, enabling organizations to centrally manage Claude Code settings across their workforce. This functionality allows IT administrators to deploy managed settings that control user permissions, default behaviors, and operational constraints.

The deployment system leverages Claude Code's managed settings capability, which provides a configuration mechanism for enterprise environments. All deployment templates encode the same minimal example (permissions.disableBypassPermissionsMode), demonstrating how to enforce security policies organization-wide. Source: examples/mdm/README.md

Deployment Architecture

graph TD
    A[Enterprise IT Admin] --> B[MDM Console]
    B --> C[Jamf/Kandji]
    B --> D[Intune]
    B --> E[Group Policy]
    C --> F[macOS Devices]
    D --> G[Windows Devices]
    E --> G
    F --> H[Claude Code Settings]
    G --> H

Supported Deployment Methods

Deployment MethodPlatformMDM SystemConfiguration Format
Custom Settings PayloadmacOSJamf, Kandji (Iru).plist
Configuration ProfilemacOSAny MDM supporting mobileconfig.mobileconfig
Platform ScriptsWindowsIntunePowerShell
Group PolicyWindowsActive Directory/GPO.admx / .adml

Source: examples/mdm/README.md

Configuration Files

Managed Settings JSON

The managed-settings.json file serves as the universal configuration format deployable to any platform. It should be deployed to the system config directory as specified in the settings documentation.

{
    "permissions": {
        "disableBypassPermissionsMode": true
    }
}

Source: examples/mdm/managed-settings.json

This minimal configuration demonstrates the structure for managed settings, which can be extended with additional keys from the settings reference.

macOS Deployment

#### Custom Settings Payload (.plist)

For Jamf or Kandji deployments, use the preference domain com.anthropic.claudecode with a Custom Settings payload.

File: macos/com.anthropic.claudecode.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
    <key>permissions</key>
    <dict>
        <key>disableBypassPermissionsMode</key>
        <true/>
    </dict>
</dict>
</plist>

Source: examples/mdm/macos/com.anthropic.claudecode.plist

#### Configuration Profile (.mobileconfig)

For MDMs that require complete configuration profiles, or for local testing, use the .mobileconfig format:

File: macos/com.anthropic.claudecode.mobileconfig

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadDisplayName</key>
            <string>Claude Code</string>
            <key>PayloadIdentifier</key>
            <string>com.anthropic.claudecode</string>
            <key>PayloadType</key>
            <string>com.apple.ManagedClient.preferences</string>
            <key>PayloadUUID</key>
            <string>UNIQUE-UUID-HERE</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>mcx_preference_settings</key>
            <dict>
                <key>permissions</key>
                <dict>
                    <key>disableBypassPermissionsMode</key>
                    <true/>
                </dict>
            </dict>
        </dict>
    </array>
    <key>PayloadDisplayName</key>
    <string>Claude Code Managed Settings</string>
    <key>PayloadIdentifier</key>
    <string>com.anthropic.claudecode.profile</string>
    <key>PayloadRemovalDisallowed</key>
    <false/>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>UNIQUE-PROFILE-UUID</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
</dict>
</plist>

Source: examples/mdm/macos/com.anthropic.claudecode.mobileconfig

Windows Deployment

#### Intune Platform Scripts

For Microsoft Intune deployments on Windows, use the PowerShell script approach. The script writes managed-settings.json to the system config directory.

File: windows/Set-ClaudeCodePolicy.ps1

# Set-ClaudeCodePolicy.ps1
# Writes managed-settings.json to the Claude Code config directory

$ErrorActionPreference = "Stop"

# Define the settings to deploy
$settings = @{
    permissions = @{
        disableBypassPermissionsMode = $true
    }
}

# Determine config directory path
$configDir = "$env:APPDATA\Claude"
$settingsFile = Join-Path $configDir "managed-settings.json"

# Ensure directory exists
if (-not (Test-Path $configDir)) {
    New-Item -ItemType Directory -Path $configDir -Force | Out-Null
}

# Write settings file
$settings | ConvertTo-Json -Depth 10 | Set-Content -Path $settingsFile -Encoding UTF8

Write-Host "Claude Code policy settings applied successfully."

Source: examples/mdm/windows/Set-ClaudeCodePolicy.ps1

#### Group Policy (ADMX/ADML)

Windows enterprise environments can also leverage Group Policy through ADMX template files.

Files:

  • windows/ClaudeCode.admx - Policy definitions
  • windows/en-US/ClaudeCode.adml - English localization

The ADMX template defines policy settings that map to managed settings keys, enabling IT administrators to configure Claude Code through standard Group Policy management tools.

Source: examples/mdm/windows/ClaudeCode.admx Source: examples/mdm/windows/en-US/ClaudeCode.adml

Deployment Workflow

graph LR
    A[Test Settings Locally] --> B[Select MDM System]
    B --> C{Platform?}
    C -->|macOS| D[Choose Format]
    C -->|Windows| E[Choose Format]
    D --> F[.plist or .mobileconfig]
    E --> G[PowerShell or ADMX]
    F --> H[Upload to MDM Console]
    G --> H
    H --> I[Assign to Devices/Users]
    I --> J[Settings Applied]

Settings Reference

The templates demonstrate permissions.disableBypassPermissionsMode, which prevents users from bypassing permission mode. For the complete list of available managed settings keys, refer to the official settings documentation at code.claude.com/docs/en/settings#available-settings.

Source: examples/mdm/README.md

Best Practices

Template Validation

[!WARNING]
These examples are community-maintained templates which may be unsupported or incorrect. You are responsible for the correctness of your own deployment configuration.

Source: examples/mdm/README.md

  1. Test locally first - Validate settings before MDM deployment
  2. Start with minimal configuration - Use the provided templates as starting points
  3. Adjust for your environment - Modify paths, UUIDs, and settings as needed
  4. Verify deployment - Confirm settings are applied correctly to target devices
  5. Document your configuration - Maintain records of deployed settings versions

macOS-Specific Considerations

  • Ensure the .mobileconfig profile is signed if your MDM requires it
  • Verify the payload UUIDs are unique within your environment
  • Test with a pilot group before organization-wide deployment

Windows-Specific Considerations

  • PowerShell scripts require appropriate execution policy
  • For Intune, ensure the script runs under the correct user context
  • Group Policy requires proper ADMX template installation in the Central Store

Extending Configuration

The minimal examples demonstrate the foundation for managed settings. Organizations can extend these templates to include additional settings:

{
    "permissions": {
        "disableBypassPermissionsMode": true
    },
    "defaultMode": "auto",
    "claudeCodeOptions": {
        // Additional settings per documentation
    }
}

Consult the settings reference and the ../settings directory for more complete example configurations.

Community Support

These MDM templates are maintained by the Claude Code community. For issues, questions, or improvements, consider contributing to the repository or engaging with the community through GitHub Discussions.

For issues specific to Claude Code behavior with managed settings, report bugs through the official GitHub issues page.

Source: https://github.com/anthropics/claude-code / Human Manual

Managed Settings Reference

Related topics: MDM and Enterprise Deployment, Configuration and Settings

Section Related Pages

Continue reading this section for the full explanation and source context.

Section Basic Structure

Continue reading this section for the full explanation and source context.

Section Available Setting Categories

Continue reading this section for the full explanation and source context.

Section Strict Configuration

Continue reading this section for the full explanation and source context.

Related topics: MDM and Enterprise Deployment, Configuration and Settings

Managed Settings Reference

Managed Settings provide enterprise administrators with the ability to deploy and enforce configuration policies across their organization using standard Mobile Device Management (MDM) tools. This reference documents the configuration format, available settings, and deployment patterns for enterprise Claude Code installations.

Overview

Managed Settings allow organizations to control Claude Code behavior centrally without requiring end-users to modify their local configurations. Settings deployed via MDM are read-only and cannot be overridden by individual users, providing administrators with guaranteed enforcement of organizational policies.

Key characteristics:

  • Read-only configuration enforced at the system level
  • Deployed via standard MDM platforms (Jamf, Kandji, Intune, Group Policy)
  • Takes precedence over user-level settings
  • Supports both macOS and Windows deployments
  • JSON-based configuration format

Source: examples/mdm/README.md:1-8

Configuration Format

Managed settings use a JSON configuration file that can be deployed through various MDM platforms. The primary format is managed-settings.json, which contains key-value pairs defining the enforced configuration.

Basic Structure

{
  "permissions.disableBypassPermissionsMode": true,
  "permissions": {
    "disableBypassPermissionsMode": true
  }
}

Source: examples/mdm/managed-settings.json:1-6

Available Setting Categories

CategoryDescription
permissionsPermission mode controls and restrictions
limitsUsage limits and rate limiting
networkNetwork and proxy configuration
updatesAuto-update behavior
telemetryData collection preferences

Source: examples/settings/README.md

Settings Examples

The repository includes example configurations demonstrating different policy enforcement levels.

Strict Configuration

A strict configuration enforces maximum security and control:

{
  "permissions.disableBypassPermissionsMode": true,
  "permissions": {
    "disableBypassPermissionsMode": true,
    "defaultMode": "review"
  }
}

This configuration prevents users from bypassing permission mode, ensuring all potentially sensitive operations require explicit approval.

Source: examples/settings/settings-strict.json

Lax Configuration

A lax configuration allows more user flexibility:

{
  "permissions.disableBypassPermissionsMode": false,
  "permissions": {
    "disableBypassPermissionsMode": false,
    "defaultMode": "auto"
  }
}

This configuration permits users to use auto mode and bypass permission checks as appropriate.

Source: examples/settings/settings-lax.json

MDM Deployment Templates

The repository provides deployment templates for major MDM platforms.

Platform Support Matrix

MDM PlatformFile FormatConfiguration Method
Jamf.plistCustom Settings payload
Kandji (Iru).plistCustom Settings payload
IntunePowerShell scriptPlatform scripts
Group PolicyJSONSystem config directory
Genericmanaged-settings.jsonAny platform

Source: examples/mdm/README.md:14-21

Deployment File Locations

PlatformFile Path
macOS (plist)/Library/Preferences/com.anthropic.claudecode.plist
macOS (mobileconfig)Full configuration profile
WindowsC:\ProgramData\Claude\managed-settings.json
GenericSystem config directory

Source: examples/mdm/README.md:14-21

macOS Deployment

Using Jamf or Kandji

For Jamf and Kandji deployments, use the macOS Preference Domain format.

Preference domain: com.anthropic.claudecode

Payload structure:

<plist version="1.0">
<dict>
    <key>permissions</key>
    <dict>
        <key>disableBypassPermissionsMode</key>
        <true/>
    </dict>
</dict>
</plist>

Source: examples/mdm/macos/com.anthropic.claudecode.plist

Configuration Profile

For MDMs that require complete configuration profiles, use the .mobileconfig format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "...">
<plist version="1.0">
<dict>
    <key>PayloadContent</key>
    <array>
        <dict>
            <key>PayloadType</key>
            <string>com.apple.MCX</string>
            <key>permissions</key>
            <dict>
                <key>disableBypassPermissionsMode</key>
                <true/>
            </dict>
        </dict>
    </array>
</dict>
</plist>

Source: examples/mdm/macos/com.anthropic.claudecode.mobileconfig

Windows Deployment

Using Intune

For Intune deployments, use the PowerShell script method:

# Set-ClaudeCodePolicy.ps1
# Intune Platform Script for Claude Code Managed Settings

$configPath = "$env:ProgramData\Claude\managed-settings.json"
$config = @{
    "permissions" = @{
        "disableBypassPermissionsMode" = $true
    }
}

if (-not (Test-Path (Split-Path $configPath -Parent))) {
    New-Item -ItemType Directory -Path (Split-Path $configPath -Parent) -Force
}

$config | ConvertTo-Json -Depth 10 | Set-Content -Path $configPath -Encoding UTF8

Source: examples/mdm/windows/Set-ClaudeCodePolicy.ps1

Settings Precedence

Understanding how managed settings interact with other configuration sources is critical for enterprise deployments.

graph TD
    A[Configuration Sources] --> B[Managed Settings<br/>MDM Deployed]
    A --> C[User Settings<br/>~/.claude/settings.json]
    A --> D[Environment Variables]
    A --> E[Project Settings<br/>.claude/settings.json]
    
    B --> F[Effective Configuration]
    C --> F
    D --> F
    E --> F
    
    style B fill:#e1f5fe
    style F fill:#c8e6c9

Precedence order (highest to lowest):

  1. Managed Settings (MDM) - Read-only, enforced
  2. Project Settings (.claude/settings.json)
  3. User Settings (~/.claude/settings.json)
  4. Environment Variables

Source: examples/settings/README.md

Common Deployment Scenarios

Restricting Permission Bypass

Organizations requiring strict audit trails should enable disableBypassPermissionsMode:

{
  "permissions.disableBypassPermissionsMode": true
}

This ensures all operations that could modify the system require explicit user approval, regardless of the active permission mode.

Setting Default Permission Mode

Control the default permission mode for new sessions:

{
  "permissions.defaultMode": "review"
}

Valid modes include:

  • auto - Automatically approve safe operations
  • review - Require approval for potentially risky operations
  • bypass - Allow all operations (not recommended)
Note: The auto permission mode may not be inherited in new sessions as expected. This is a known issue in certain Claude Code versions. See GitHub Issue #55558 for details.

Validation

Before deploying managed settings, validate the JSON format:

# Validate JSON syntax
cat managed-settings.json | python3 -m json.tool > /dev/null && echo "Valid JSON"

# Check for known settings keys
jq 'keys' managed-settings.json

Community Considerations

When deploying managed settings in enterprise environments, note the following community-reported behaviors:

  • Permission mode inheritance: The auto permission mode may not be properly inherited by new sessions and cannot be set mid-session. See Issue #55558.
  • Weekly limits: Rate limiting behavior may not perfectly align with documented cycles. See Issue #52921.

These issues may affect organizations relying on specific permission or rate-limiting behaviors.

Source: https://github.com/anthropics/claude-code / Human Manual

Doramagic Pitfall Log

Source-linked risks stay visible on the manual page so the preview does not read like a recommendation.

high Installation risk requires verification

May increase setup, validation, or first-run risk for the user.

high Installation risk requires verification

May increase setup, validation, or first-run risk for the user.

high Configuration risk requires verification

May increase setup, validation, or first-run risk for the user.

high Configuration risk requires verification

May increase setup, validation, or first-run risk for the user.

Doramagic Pitfall Log

Found 39 structured pitfall item(s), including 16 high/blocking item(s). Top priority: Installation risk - Installation risk requires verification.

1. Installation risk: Installation risk requires verification

  • Severity: high
  • Finding: Project evidence flags a installation risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_6fd2423d8dd840ad898450c124291027 | https://github.com/anthropics/claude-code/issues/63335

2. Installation risk: Installation risk requires verification

  • Severity: high
  • Finding: Project evidence flags a installation risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_abbd745212d743c6b17ef3e919d49b0d | https://github.com/anthropics/claude-code/issues/64109

3. Configuration risk: Configuration risk requires verification

  • Severity: high
  • Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_cd5af4117b394f29bd45302db852a9e9 | https://github.com/anthropics/claude-code/issues/61298

4. Configuration risk: Configuration risk requires verification

  • Severity: high
  • Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_e75af4578a6c41e8820a88e1e8b8d617 | https://github.com/anthropics/claude-code/issues/64111

5. Configuration risk: Configuration risk requires verification

  • Severity: high
  • Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_262f6cbca571401884333f86087e0ddd | https://github.com/anthropics/claude-code/issues/64095

6. Configuration risk: Configuration risk requires verification

  • Severity: high
  • Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_9c64894658eb475f9ad68245eed8d2f5 | https://github.com/anthropics/claude-code/issues/64094

7. Capability evidence risk: Capability evidence risk requires verification

  • Severity: high
  • Finding: Project evidence flags a capability evidence risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_e0c0e16324d045f38cb9237f7f4dfff6 | https://github.com/anthropics/claude-code/issues/64115

8. Runtime risk: Runtime risk requires verification

  • Severity: high
  • Finding: Project evidence flags a runtime risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_a1a5923e7779438ca2f53dafbaf38d00 | https://github.com/anthropics/claude-code/issues/13354

9. Security or permission risk: Security or permission risk requires verification

  • Severity: high
  • Finding: Developers should check this security_permissions risk before relying on the project: Remote Control (/remote-control) disconnects frequently
  • User impact: Developers may expose sensitive permissions or credentials: Remote Control (/remote-control) disconnects frequently
  • Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: Remote Control (/remote-control) disconnects frequently. Context: Observed when using windows, macos, linux
  • Evidence: failure_mode_cluster:github_issue | fmev_9c4c7261c368bad5ca3425e0acae9cca | https://github.com/anthropics/claude-code/issues/33041

10. Security or permission risk: Security or permission risk requires verification

  • Severity: high
  • Finding: Developers should check this security_permissions risk before relying on the project: [BUG] VS Code extension doesn't load Chrome browser tools in chat panel despite docs stating @browser should work (Linux)
  • User impact: Developers may expose sensitive permissions or credentials: [BUG] VS Code extension doesn't load Chrome browser tools in chat panel despite docs stating @browser should work (Linux)
  • Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: [BUG] VS Code extension doesn't load Chrome browser tools in chat panel despite docs stating @browser should work (Linux). Context: Observed when using node, linux
  • Evidence: failure_mode_cluster:github_issue | fmev_8458acfcfab9d6641fe4696ba1202131 | https://github.com/anthropics/claude-code/issues/50423

11. Security or permission risk: Security or permission risk requires verification

  • Severity: high
  • Finding: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_1448fd32254e42c7a13bb07c4d4b376e | https://github.com/anthropics/claude-code/issues/63538

12. Security or permission risk: Security or permission risk requires verification

  • Severity: high
  • Finding: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
  • User impact: May increase setup, validation, or first-run risk for the user.
  • Recommended check: Reproduce the official install and quickstart path in an isolated environment.
  • Evidence: community_evidence:github | cevd_88549375cbdc40f5b59125e4fbda8e11 | https://github.com/anthropics/claude-code/issues/33041

Source: Doramagic discovery, validation, and Project Pack records

Community Discussion Evidence

These external discussion links are review inputs, not standalone proof that the project is production-ready.

Sources 12

Count of project-level external discussion links exposed on this manual page.

Use Review before install

Open the linked issues or discussions before treating the pack as ready for your environment.

Community Discussion Evidence

Doramagic exposes project-level community discussion separately from official documentation. Review these links before using claude-code with real data or production workflows.

Source: Project Pack community evidence and pitfall evidence