mirror of
https://github.com/Piebald-AI/claude-code-system-prompts.git
synced 2026-06-13 14:43:33 +08:00
2.5 KiB
2.5 KiB
Settings File Locations
Choose the appropriate file based on scope:
| File | Scope | Git | Use For |
|---|---|---|---|
~/.claude/settings.json |
Global | N/A | Personal preferences for all projects |
.claude/settings.json |
Project | Commit | Team-wide hooks, permissions, plugins |
.claude/settings.local.json |
Project | Gitignore | Personal overrides for this project |
Settings load in order: user → project → local (later overrides earlier).
Settings Schema Reference
Permissions
{
"permissions": {
"allow": ["Bash(npm *)", "Edit(.claude)", "Read"],
"deny": ["Bash(rm -rf *)"],
"ask": ["Write(/etc/*)"],
"defaultMode": "default" | "plan" | "acceptEdits" | "dontAsk",
"additionalDirectories": ["/extra/dir"]
}
}
Permission Rule Syntax:
- Exact match:
"Bash(npm run test)" - Prefix wildcard:
"Bash(git *)"- matchesgit,git status,git commit, etc. - Tool only:
"Read"- allows all Read operations
Environment Variables
{
"env": {
"DEBUG": "true",
"MY_API_KEY": "value"
}
}
Model & Agent
{
"model": "sonnet", // or "fable", "opus", "haiku", full model ID
"agent": "agent-name",
"alwaysThinkingEnabled": true
}
Attribution (Commits & PRs)
{
"attribution": {
"commit": "Custom commit trailer text",
"pr": "Custom PR description text"
}
}
Set commit or pr to empty string "" to hide that attribution.
MCP Server Management
{
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": ["server1", "server2"],
"disabledMcpjsonServers": ["blocked-server"]
}
Plugins
{
"enabledPlugins": {
"formatter@anthropic-tools": true
}
}
Plugin syntax: plugin-name@source where source is claude-code-marketplace, claude-plugins-official, or builtin.
Other Settings
language: Preferred response language (e.g., "japanese")cleanupPeriodDays: Days to keep transcripts before automatic cleanup (default: 30; minimum 1)respectGitignore: Whether to respect .gitignore (default: true)spinnerTipsEnabled: Show tips in spinnerspinnerVerbs: Customize spinner verbs ({ "mode": "append" | "replace", "verbs": [...] })spinnerTipsOverride: Override spinner tips ({ "excludeDefault": true, "tips": ["Custom tip"] })syntaxHighlightingDisabled: Disable diff highlighting