calibrate-settings
Skill1 starsChanged 6 months agoMITView on GitHub
Audits and tunes every `settings.json` Claude Code reads — user (`~/.claude/settings.json`), user-local (`~/.claude/settings.local.json`), project (`.claude/settings.json`), project-local (`.claude/settings.local.json`), and plugin-self when the project is itself a plugin. Flags committed secrets, `--dangerously-skip-permissions` references, blanket-destructive `permissions.allow` entries (`Bash(*)`, `Bash(rm *)`, `Bash(sudo *)`), model pins in committed files, oversized `env` blocks, empty allow-lists (every prompt approved manually), invalid JSON, and project values silently overridden by managed policy. Also handles the `create` row when recurring `settings:permissions-empty` across projects calls for a baseline allow-list scaffold. Invoked by the calibration orchestrator (`/calibrate`) and standalone via `/claude-calibration:calibrate-settings`.
In this repository25 other files it gives its agents.
- agents/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- rules/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- docs-statusSkill
- docs-updateSkill
- plugin-updateSkill
- calibrate-claude-mdSkill
- calibrate-generalSkill
- calibrate-hooksSkill
- calibrate-mcpSkill
- calibrate-pluginsSkill
- calibrate-rulesSkill
- calibrateSkill
- calibrate-skillsSkill
- calibrate-subagentsSkill
- calibration-auditSkill
- calibration-diffSkill
- calibration-doctorSkill
- calibration-flowSkill
- calibration-onboardingSkill
- calibrationSkill
- calibration-trackSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 80
When the planner detects a recurrence that this bundle owns (per rules/dispatch.md):
- Very specific: line 87
After every edit or create, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record verify: ✓ if the signature no longer fires (or …
- Very specific: line 92
Never write a secret into a committed settings.json.
- Very specific: line 94
Never add --dangerously-skip-permissions to any settings layer.
- Very specific: line 95
Don't widen permissions.allow beyond what the user explicitly approved — narrow entries only.
- Distinctive: line 96
Don't reformat unrelated keys in a settings file when applying a fix.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
calibrate-settings — per-feature bundle
You audit and tune settings.json files across every scope Claude Code reads. You receive one of
two kinds of work:
- Direct invocation (
/claude-calibration:calibrate-settings) — audit everything, report findings, propose fixes inline. The user drives the conversation. - Dispatch from the calibrator — one approved plan row at a time, applied surgically.
In both cases the workflow is the same; only the framing differs.
1. Enumerate
bash <BUNDLE>/scripts/enumerate.sh "$PROJECT_DIR"Yields TSV scope\tpath. Scope is user (~/.claude/settings.json), user-local
(~/.claude/settings.local.json), project (<PROJECT_DIR>/.claude/settings.json),
project-local (<PROJECT_DIR>/.claude/settings.local.json), or plugin-self
(<plugin-root>/.claude/settings.json when the project is itself a plugin).
2. Lint
bash <BUNDLE>/scripts/lint.sh <path …>Yields TSV path\tsignature\tseverity\tdetail. The signatures this bundle owns
(see reference.md):
settings:invalid-json(HIGH)settings:secret-in-committed(CRITICAL)settings:dangerously-skip-permissions(CRITICAL)settings:permissions-blanket-destructive(HIGH)settings:model-pinned-in-committed(LOW)settings:env-bloated(LOW)settings:permissions-empty(LOW)settings:precedence-surprise(LOW)
3. Fix — kind: edit rows
For each finding, the remediation pattern is in examples/<case>/:
settings:secret-in-committed→ move the secret to.local.json(or an env-var reference); rotate the exposed credential.settings:dangerously-skip-permissions→ remove the reference; if a workflow needed it, surface the underlying tool calls and add narrowpermissions.allowentries instead.settings:permissions-blanket-destructive→ replaceBash(*)/Bash(rm *)/Bash(sudo *)with the smallest set of narrowBash(<tool> *)entries that covers real usage.settings:model-pinned-in-committed→ move themodel:pin to.local.json(per-machine) or drop it (let Claude pick).settings:env-bloated→ move per-machine values to.local.json; keep committedenvminimal.settings:permissions-empty→ seeexamples/permissions-empty/{before,after}.md; copy the baseline allow-list fromtemplates/settings.json.tmpl.settings:invalid-json→ fix the parse error reported in the detail.settings:precedence-surprise→ reconcile: either accept the managed override or surface the conflict to the policy owner.
4. Create — kind: create rows
When the planner detects a recurrence that this bundle owns (per rules/dispatch.md):
settings:permissions-empty×N projects → scaffold a baseline.claude/settings.jsonfromtemplates/settings.json.tmpl— narrow read-onlyBash(...)entries that are universally safe.
5. Verify
After every edit or create, re-run bash <BUNDLE>/scripts/lint.sh <changed path> and record
verify: ✓ if the signature no longer fires (or verify: ✗ <signature> if it still does).
Hard rules
- Never write a secret into a committed
settings.json. If a secret is needed, the only correct place is.local.json(git-ignored) or an${ENV_VAR}reference. - Never add
--dangerously-skip-permissionsto any settings layer. - Don't widen
permissions.allowbeyond what the user explicitly approved — narrow entries only. - Don't reformat unrelated keys in a settings file when applying a fix.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

