Files
claude-howto/09-advanced-features/config-examples.json
T
Luong NGUYEN c10d54c0d7 docs: sync to Claude Code v2.1.217
Bumps tutorial coverage from the v2.1.212 baseline (2026-07-18 sync) to
v2.1.217 (v2.1.213 was skipped upstream), plus a repo-internal accuracy
audit.

Fixed:
- Nested-subagent-spawning claim reversed (v2.1.217): 04-subagents/README.md
  and CATALOG.md stated nesting up to 5 levels as current behavior; as of
  v2.1.217 it's off by default, opt in via CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH
- Stale --enable-auto-mode flag (removed in v2.1.111) replaced with
  --permission-mode auto across 10-cli/README.md and QUICK_REFERENCE.md
- Import-depth contradiction in 02-memory/README.md: two remaining "5 levels"
  instances corrected to "4 hops", matching the rest of the file
- Sonnet 5 added to claude_concepts_guide.md's models/reasoning-effort table
- config-examples.json's fabricated settings schema (fake "unrestricted"/
  "confirm" modes, undocumented keys) rewritten to real settings.json keys
- brand-voice skill (name/user-invocable) aligned to its README worked example
- CLAUDE.md length guidance unified across 03-skills/claude-md/SKILL.md and
  02-memory/README.md

Added:
- New subagent caps (v2.1.217): CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS
- --max-budget-usd now also halts running background subagents (v2.1.217)
- Hook if: glob scope narrowed to <cwd>/dir (v2.1.214), documented in
  06-hooks/README.md along with SessionStart's new "fork" source
- sandbox.filesystem.disabled setting (v2.1.216)
- /rewind symlink/hard-link protection (v2.1.216)
- Auto-memory modified timestamp (v2.1.214) and non-blocking /memory editor
  (v2.1.216)
- CLI/settings batch (v2.1.214-217): emojiCompletionEnabled,
  FORCE_HYPERLINK=0, CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH, --settings 2 MiB
  cap, permission hardening notes, /context and /compact notes
- /verify and /code-review explicit-invocation-only note (v2.1.215)

Mirrored applicable P0/P1 fixes into vi/ja/zh/uk translations where the
same claim existed.
2026-07-22 21:47:38 +07:00

213 lines
5.8 KiB
JSON

{
"description": "Example Claude Code settings.json configurations for different use cases",
"examples": {
"development": {
"name": "Development Environment",
"description": "Configuration for active development work: auto-accept edits, prompt for commands, format/lint on write",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "acceptEdits",
"allow": ["Bash(npm run *)", "Bash(git diff:*)", "Bash(git status:*)"]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-and-lint.sh" }
]
}
]
}
}
},
"code_review": {
"name": "Code Review Mode",
"description": "Configuration for reviewing code without modifications",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "plan"
},
"env": {
"CLAUDE_CODE_EFFORT_LEVEL": "high"
}
}
},
"learning": {
"name": "Learning Mode",
"description": "Configuration for learning and experimentation: prompt before every action, checkpoint often",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "default"
},
"env": {
"CLAUDE_CODE_EFFORT_LEVEL": "high"
},
"fileCheckpointingEnabled": true
}
},
"production": {
"name": "Production Deployment",
"description": "Configuration for production operations with safety checks",
"config": {
"model": "claude-opus-4-8",
"permissions": {
"defaultMode": "default",
"deny": ["Bash(git push --force*)", "Bash(rm -rf*)"]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/pre-commit.sh" }
]
}
]
},
"fileCheckpointingEnabled": true
}
},
"ci_cd": {
"name": "CI/CD Pipeline",
"description": "Configuration for automated CI/CD operations, run non-interactively via `claude -p`",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "acceptEdits",
"allow": ["Bash(npm test:*)", "Bash(npm run build:*)", "Bash(npm run lint:*)"]
},
"env": {
"CI": "true"
}
}
},
"security_audit": {
"name": "Security Audit",
"description": "Configuration for security-focused code analysis",
"config": {
"model": "claude-opus-4-8",
"permissions": {
"defaultMode": "plan"
},
"env": {
"CLAUDE_CODE_EFFORT_LEVEL": "max"
},
"hooks": {
"PostToolUse": [
{
"matcher": "Read",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/security-scan.sh" }
]
}
]
}
}
},
"performance_optimization": {
"name": "Performance Optimization",
"description": "Configuration for performance analysis and optimization",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "acceptEdits"
},
"fileCheckpointingEnabled": true
}
},
"pair_programming": {
"name": "Pair Programming",
"description": "Configuration for collaborative development",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "default"
},
"env": {
"CLAUDE_CODE_EFFORT_LEVEL": "high"
}
}
},
"refactoring": {
"name": "Large Refactoring",
"description": "Configuration for major refactoring work: backup before edits, run related tests after",
"config": {
"model": "claude-opus-4-8",
"permissions": {
"defaultMode": "default",
"allow": ["Bash(npm test -- --findRelatedTests *)"]
},
"fileCheckpointingEnabled": true,
"hooks": {
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/backup-file.sh" }
]
}
],
"PostToolUse": [
{
"matcher": "Edit",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/run-related-tests.sh" }
]
}
]
}
}
},
"autonomous": {
"name": "Autonomous Development",
"description": "Configuration for autonomous work with auto mode's background safety classifier plus a filesystem/network sandbox",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "auto"
},
"sandbox": {
"enabled": true,
"failIfUnavailable": false
}
}
},
"documentation": {
"name": "Documentation Writing",
"description": "Configuration for writing documentation",
"config": {
"model": "claude-sonnet-5",
"permissions": {
"defaultMode": "acceptEdits",
"allow": ["Write(**/*.md)"]
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/markdownlint.sh" }
]
}
]
}
}
}
}
}