Save or restore the permission baseline in settings.json
Manages Claude Code's permission baselines to maintain consistent settings across sessions.
/plugin marketplace add l3ocho/mktpl-claude-datasaas/plugin install claude-config-maintainer@mktpl-claude-datasaasManage the permission baseline stored in .claude/settings.json. The baseline contains optimized permissions that persist across sessions, immune to Claude Code's session-approval overwrites.
Before executing, load:
skills/visual-header.mdskills/settings-optimization.md+-----------------------------------------------------------------+
| CONFIG-MAINTAINER - Permission Baseline |
+-----------------------------------------------------------------+
/claude-config baseline save # Save current optimized permissions to settings.json
/claude-config baseline restore # Reset settings.local.json to baseline-only
/claude-config baseline show # Display current baseline contents
/claude-config baseline diff # Show difference between baseline and current local
saveWrites the current optimized permission set to .claude/settings.json:
/claude-config optimize-settings was just run: Use the optimized output as the baselinesettings.jsonsettings.json if it exists: .claude/backups/settings.json.{YYYYMMDD-HHMMSS}.claude/settings.jsonsettings.local.json — remove any patterns now covered by the baselineOutput:
Baseline saved to .claude/settings.json
Contents:
allow: [XX patterns]
deny: [X patterns]
This baseline will persist across sessions regardless of
interactive approval changes to settings.local.json.
Recommendation: Commit .claude/settings.json to version control.
restoreResets settings.local.json to contain only machine-specific patterns not in the baseline:
.claude/settings.jsonsettings.local.jsonPatterns in settings.local.json not covered by baseline:
- Bash(conda activate *) [machine-specific]
- Write(/home/leo/custom/*) [machine-specific]
These will be KEPT. All other patterns will be removed
(they're already in the baseline).
Remove XX redundant patterns from settings.local.json?
[1] Yes, clean up
[2] No, keep as-is
[3] Remove ALL local patterns (baseline-only)
settings.local.jsonshowDisplay the current baseline:
Current Permission Baseline (.claude/settings.json):
allow: [list of patterns]
deny: [list of patterns]
Last modified: YYYY-MM-DD HH:MM:SS
Committed to git: Yes/No
If no baseline exists, report that and suggest running baseline save.
diffShow what's different between the baseline and current local settings:
Baseline vs. Current Local Settings
====================================
In baseline but NOT in local (always active via settings.json):
[These patterns are still in effect — no action needed]
+ Edit
+ Write
+ Bash(git *)
...
In local but NOT in baseline (session drift or machine-specific):
+ Bash(/home/leo/scripts/custom.sh) [likely machine-specific]
+ Write(/tmp/test/**) [likely session drift]
+ Bash(pip install pandas) [likely session approval]
Overlap (in both files — redundant in local):
~ Bash(grep *) [safe to remove from local]
~ Bash(cat *) [safe to remove from local]
Recommendation: Run `/claude-config baseline restore` to clean up XX redundant patterns.
restore cleans local, not settings.json.claude/backups/ with timestamps