From claude-config
Essential knowledge about Claude Code's internal operations, configuration system, and behavior. Use this whenever understanding Claude Code's functionality is relevant to completing a task - including when planning implementations that involve Claude Code features, debugging issues that might relate to Claude configuration, analyzing how settings affect behavior, understanding tool availability, checking what's possible within Claude Code, evaluating existing setups, or when any knowledge of how Claude Code works would help accomplish the user's goals. Covers all aspects: settings.json, mcp.json, CLAUDE.md, plugins, marketplaces, skills, agents, hooks, commands, file organization, .claude folders, precedence rules, .local conventions, tool permissions, and Claude Code's operational behavior.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-config:claude-configThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
I'm your comprehensive guide to Claude Code configuration. I understand the complete hierarchy and precedence system, from enterprise policies down to local project settings.
I'm your comprehensive guide to Claude Code configuration. I understand the complete hierarchy and precedence system, from enterprise policies down to local project settings.
~/.claude/settings.json under enabledPluginsls -la ~/.claude/plugins/claude plugin validate <path>Precedence order (highest to lowest):
.claude/settings.local.json (project, personal).claude/settings.json (project, shared)~/.claude/settings.json (user, global)Loading order (highest precedence first):
/Library/Application Support/ClaudeCode/CLAUDE.md (macOS)./CLAUDE.md or ./.claude/CLAUDE.md~/.claude/CLAUDE.mdFiles load automatically at launch. Use /memory to verify loaded content.
The Real Config File:
~/.claude/mcp.json exists but IS IGNORED by Claude Code~/.claude.json (in home directory) is the actual config Claude Code readsprojects['/path/to/project']['mcpServers']How to properly add MCPs:
# Use the CLI - it knows the correct file
cd /path/to/project
claude mcp add --transport stdio my-mcp --env KEY=value -- /path/to/binary --args
# Verify it was added
claude mcp list
# Test without restarting session (headless)
claude -p "what MCP tools are available?"
.claude/ folder.claude/agents/ (project) or ~/.claude/agents/ (user).claude/skills/skill-name/SKILL.md.claude/commands/ or ~/.claude/commands//command to trigger/commit or /review"hooks"Files ending in .local are automatically gitignored and used for personal preferences:
.claude/settings.local.json - Personal project settingsCLAUDE.local.md (deprecated)~/ # Home directory
└── .claude.json # ⚠️ THE ACTUAL CONFIG FILE (MCP + settings + projects)
~/.claude/ # User-level (global)
├── settings.json # Global settings (deprecated location)
├── mcp.json # IGNORED - do not use!
├── CLAUDE.md # Global instructions
├── agents/ # Global subagents
├── skills/ # Global skills
├── commands/ # Global slash commands
└── plugins/ # Installed plugins (usually symlinks)
./.claude/ # Project-level (shared via git)
├── settings.json # Team settings
├── settings.local.json # Personal settings (gitignored)
├── CLAUDE.md # Project instructions
├── agents/ # Project subagents
├── skills/ # Project skills
└── commands/ # Project slash commands
⚠️ Critical: All MCP configurations are stored in ~/.claude.json (in home directory) under the projects key, organized by project directory path.
Claude Code stores MCP configurations in ~/.claude.json in your home directory (NOT ~/.claude/mcp.json):
{
"projects": {
"/path/to/project": {
"mcpServers": {
"my-mcp": {
"type": "stdio",
"command": "/path/to/binary",
"args": ["--stdio"],
"env": {"KEY": "value"}
}
}
}
}
}
Per-Project Configuration:
mcpServers configclaude mcp add from within project directory# Always use CLI to add MCPs (it handles the complex .claude.json format)
claude mcp add --transport stdio memory \
--env STORAGE_PATH=/tmp/memory \
-- npx @anthropic/memory-mcp-server
# For MCPs with multiple env vars
claude mcp add --transport stdio looker-toolbox \
--env LOOKER_BASE_URL=https://your.looker.com \
--env LOOKER_CLIENT_ID=your_id \
--env LOOKER_CLIENT_SECRET=your_secret \
-- /path/to/looker-toolbox --stdio --prebuilt looker
Step 1: Verify MCP is registered
claude mcp list # Shows connected MCPs
claude mcp get <name> # Show specific MCP config
Step 2: Test MCP without restarting 🚀
# Test in headless mode to avoid losing context
claude chat "list all available MCP tools"
claude chat "call mcp__<server-name>__<tool-name>"
# Test specific MCP server directly
LOOKER_BASE_URL=... /path/to/binary --stdio <<< '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}'
Step 3: Common issues
~/.claude/mcp.json - it's ignoredclaude mcp add writes to correct location (.claude.json)env object# Add marketplace
claude plugin marketplace add owner/repo
# Install plugin
claude plugin install plugin-name@marketplace
# Create symlink if missing
ln -s /path/to/plugin ~/.claude/plugins/plugin@marketplace
plugin-root/
├── .claude-plugin/
│ ├── plugin.json # Required manifest (metadata only)
│ └── marketplace.json # Required for marketplaces
├── commands/ # Slash commands (at root) - auto-discovered
├── skills/ # Skills (at root) - auto-discovered
├── agents/ # Subagents (at root) - auto-discovered
└── hooks/
└── hooks.json # Hook configuration file
CRITICAL: Plugin.json Schema
The plugin.json file should contain metadata only. Commands, skills, agents, and hooks are auto-discovered from their directories:
{
"name": "my-plugin",
"version": "1.0.0",
"description": "Plugin description",
"author": {
"name": "Author Name",
"email": "[email protected]"
},
"repository": "https://github.com/...",
"license": "MIT",
"keywords": ["tag1", "tag2"]
}
What NOT to include in plugin.json:
commands array - Commands auto-discovered from commands/*.mdskills array - Skills auto-discovered from skills/*/SKILL.mdagents array - Agents auto-discovered from agents/*.mdhooks object - Hooks defined in hooks/hooks.json file insteaddisplayName field - Not part of schemarequirements object - Not part of schemaAuthor field must be an object:
"author": {
"name": "Your Name",
"email": "[email protected]", // optional
"url": "https://..." // optional
}
How Auto-Discovery Works:
*.md files in commands/ become slash commandsSKILL.md file in skills/skill-name/ becomes a skill*.md files in agents/ become agentshooks/hooks.jsonclaude plugin marketplace remove <name>claude plugin marketplace listclaude plugin validate <path>{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "./validate-bash.sh"
}]
}]
}
}
{
"mcpServers": {
"db": {
"type": "stdio",
"command": "psql-mcp",
"env": {
"DATABASE_URL": "${DATABASE_URL:-postgresql://localhost/dev}"
}
}
}
}
# View actual config file (where MCPs really live)
cat ~/.claude.json | python3 -c "import sys, json; d=json.load(sys.stdin); print(json.dumps(d.get('projects', {}).get('$(pwd)', {}), indent=2))"
# View settings
cat ~/.claude/settings.json
cat .claude/settings.local.json
# Check loaded memories
/memory # In Claude Code
# List plugins
ls -la ~/.claude/plugins/
# Validate configurations
claude plugin validate .
claude mcp list
claude mcp get <server-name>
# Test if new MCPs are working without restarting current session
claude -p "what MCP servers are available?"
claude -p "list all tools from looker-toolbox"
claude -p "use the claude-config skill"
# Test MCP directly
LOOKER_BASE_URL=... /path/to/mcp-binary --stdio <<< '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Test skills/commands in fresh session
claude -p "/commit" # Test slash command
claude -p "invoke the graphite-workflow skill" # Test skill
# Clean debug logs
find ~/.claude/debug -mtime +7 -delete
.claude/settings.json in gitsettings.local.json~/.claude/commands/❌ Editing ~/.claude/mcp.json (file is ignored!)
❌ Manually editing .claude.json (use CLI instead)
❌ Forgetting environment variables in MCP config
✅ Use claude mcp add CLI for all MCP operations
✅ Use claude mcp list to verify MCP is connected
✅ Test MCPs headlessly: claude -p "list MCP tools"
✅ All MCPs live in .claude.json under projects['/path']['mcpServers']
❌ Multiple marketplaces pointing to same directory
❌ Manually editing enabledPlugins without installing
❌ Putting marketplace.json at plugin root (must be in .claude-plugin/)
❌ Putting commands/skills/agents/hooks in .claude-plugin/ (must be at plugin root)
✅ One marketplace per source
✅ Use CLI for plugin management
✅ Keep plugin.json AND marketplace.json in .claude-plugin/
✅ Keep commands/skills/agents/hooks at plugin root level
❌ Using CLAUDE.local.md (deprecated)
❌ Editing .claude.json manually (use CLI)
✅ Use settings.local.json for local config
✅ Use claude mcp add for MCP config
✅ Test changes headlessly to avoid restarts
Need deeper information? Ask me about specific topics like "MCP scope hierarchy", "hook event types", or "CLAUDE.md import syntax".
npx claudepluginhub stoke-gh/max-skill-market --plugin claude-configCovers Claude Code artifact conventions: plugin.json schema, command/agent/skill frontmatter, CLAUDE.md, hooks, settings.json, LSP, monitors, memory files, and the built-in tool catalog.
Claude Code extensibility and configuration reference: plugins, hooks, skills, subagents, MCP servers, output styles, memory, settings, and model configuration. Invoke whenever Claude Code itself is the subject — questions, configuration, building extensions, debugging, or understanding internals.
Provides official documentation for Claude Code CLI, plugins, hooks, MCP servers, skills, configuration, and features. Use for setup, development, troubleshooting, and integrations.