mirror of
https://github.com/Piebald-AI/claude-code-system-prompts.git
synced 2026-06-13 14:43:33 +08:00
95 lines
2.5 KiB
Markdown
95 lines
2.5 KiB
Markdown
<!--
|
|
name: 'Skill: Update config settings file locations'
|
|
description: Where Claude Code stores settings.json across scopes
|
|
ccVersion: 2.1.173
|
|
-->
|
|
## 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
|
|
```json
|
|
{
|
|
"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 *)"` - matches `git`, `git status`, `git commit`, etc.
|
|
- Tool only: `"Read"` - allows all Read operations
|
|
|
|
### Environment Variables
|
|
```json
|
|
{
|
|
"env": {
|
|
"DEBUG": "true",
|
|
"MY_API_KEY": "value"
|
|
}
|
|
}
|
|
```
|
|
|
|
### Model & Agent
|
|
```json
|
|
{
|
|
"model": "sonnet", // or "fable", "opus", "haiku", full model ID
|
|
"agent": "agent-name",
|
|
"alwaysThinkingEnabled": true
|
|
}
|
|
```
|
|
|
|
### Attribution (Commits & PRs)
|
|
```json
|
|
{
|
|
"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
|
|
```json
|
|
{
|
|
"enableAllProjectMcpServers": true,
|
|
"enabledMcpjsonServers": ["server1", "server2"],
|
|
"disabledMcpjsonServers": ["blocked-server"]
|
|
}
|
|
```
|
|
|
|
### Plugins
|
|
```json
|
|
{
|
|
"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 spinner
|
|
- `spinnerVerbs`: Customize spinner verbs (`{ "mode": "append" | "replace", "verbs": [...] }`)
|
|
- `spinnerTipsOverride`: Override spinner tips (`{ "excludeDefault": true, "tips": ["Custom tip"] }`)
|
|
- `syntaxHighlightingDisabled`: Disable diff highlighting
|