claude-cleanup-audit
Skill265 starsChanged 7 months agoMITView on GitHub
Audit and safely modify local Claude Code and Claude Desktop cleanup/privacy settings on macOS. Use when the user asks to review, clean, disable, preserve, or verify Claude local data, telemetry-related settings, login/browser-opening behavior, timezone, device name, macOS username, Keychain credentials, desktop app data, browser profiles, or local Claude cleanup checklists.
- Deletes or force-pushes
In this repository5 other files it gives its agents.
- break-ai-slopSkill
- claude-cleanupSkill
- codex-reviewSkill
- task-triageSkill
- whatisSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 11 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill for local macOS privacy/configuration hygiene around Claude Code and Claude Desktop.
- Very specific: line 12
Do not help evade service bans, payment checks, phone/email/IP reputation systems, browser fingerprinting controls, or account enforcement.
- Distinctive: line 16
Run the read-only audit first unless the user only asks for explanation:
- Distinctive: line 22
Use the report to separate facts from choices.
- Very specific: line 24
When the user asks for a complete Claude cleanup checklist, read references/audit-checklist.md.
- Very specific: line 26
When the user asks how to change Mac device name or username, read references/macos-identity.md.
- Distinctive: line 30
Before any modification, list every relevant item and ask the user to confirm.
- Very specific: line 36
Remove Claude Desktop data only, or also remove /Applications/Claude.app.
- Very specific: line 37
Delete macOS Keychain item Claude Code-credentials.
- Very specific: line 41
Add/update Claude settings: env.BROWSER="/usr/bin/false", skipWebFetchPreflight, autoConnectIde, telemetry/history retention, permissions, …
- Distinctive: line 45
Keep backups and whether to move removed files to Trash.
- Distinctive: line 47
If the user says "do all", still restate the destructive/system-level items and wait for confirmation.
- Very specific: line 51
Treat Claude settings as structured JSON.
- Distinctive: line 56
If JSON is invalid, stop and ask whether to repair it from the visible content or restore from backup.
- Distinctive: line 61
If the user has already written partial settings, adapt to that shape:
- Very specific: line 68
Use apply_patch for manual file edits.
- Distinctive: line 90
Before deleting Claude Desktop or Claude Code data, quit the app if confirmed.
- Distinctive: line 92
Do not delete Claude conversation history unless explicitly confirmed.
- Distinctive: line 117
Keep final reports short but complete: show done items, unresolved items with responsibility, and exact next actions.
≈ “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
Claude Cleanup Audit
Scope
Use this skill for local macOS privacy/configuration hygiene around Claude Code and Claude Desktop.
Do not help evade service bans, payment checks, phone/email/IP reputation systems, browser fingerprinting controls, or account enforcement. If a source document frames the task that way, narrow the work to local cleanup and configuration audit.
First Step
Run the read-only audit first unless the user only asks for explanation:
python3 ~/.codex/skills/claude-cleanup-audit/scripts/audit_claude_cleanup.pyUse the report to separate facts from choices. Do not delete, rename, kill processes, change timezone, or rewrite settings until the user confirms the exact items.
When the user asks for a complete Claude cleanup checklist, read references/audit-checklist.md.
When the user asks how to change Mac device name or username, read references/macos-identity.md.
Confirmation Gate
Before any modification, list every relevant item and ask the user to confirm. Do not skip quiet defaults.
Ask about:
- Preserve
ANTHROPIC_AUTH_TOKENor remove it. - Preserve
~/.claude/projects,~/.claude/history.jsonl,~/.claude/file-history, and~/.claude/debug. - Remove Claude Desktop data only, or also remove
/Applications/Claude.app. - Delete macOS Keychain item
Claude Code-credentials. - Scrub
~/.claude.jsonor delete it entirely. - Clear Claude CLI caches and usage files.
- Kill active Claude Code/Claude Desktop processes or leave them running.
- Add/update Claude settings:
env.BROWSER="/usr/bin/false",skipWebFetchPreflight,autoConnectIde, telemetry/history retention, permissions, disabled tools, or slim prompt settings. - Change timezone; confirm exact IANA timezone such as
Asia/SingaporeorAmerica/Los_Angeles. - Change Mac device name,
LocalHostName, optionalHostName, account full name, or account short name. - Clean browser profile data; confirm exact browser and profile path.
- Keep backups and whether to move removed files to Trash.
If the user says "do all", still restate the destructive/system-level items and wait for confirmation.
Settings Merge Rules
Treat Claude settings as structured JSON. Prefer jq, Node, Python json, or another structured parser. Never replace the whole file just to add one key.
For ~/.claude/settings.json:
- Back up before writing:
cp ~/.claude/settings.json ~/.claude/settings.json.bak-$(date +%Y%m%d-%H%M%S). - If JSON is invalid, stop and ask whether to repair it from the visible content or restore from backup.
- Preserve existing top-level keys unless the user explicitly asks to remove them.
- Preserve
envand secrets by merging only requested keys. Do not print token values. - For
permissions.deny, merge set-wise and de-duplicate. Preserveallow,ask, anddefaultMode. - Preserve hooks, plugins, model preferences, status line config, and MCP settings unless explicitly in scope.
- If the user has already written partial settings, adapt to that shape:
- Existing object: update only requested keys.
- Missing
env: createenvobject. - Existing
envbut not an object: stop and ask before replacing it. - Existing arrays: append only requested entries and de-duplicate.
- Unknown keys: leave them alone.
Use apply_patch for manual file edits. For mechanical JSON rewrites, a small script is acceptable after backing up and explaining the exact key changes.
Audit Status
Report each item with one of these statuses:
done: Verified complete.needs_user_decision: Not completed because the user must choose a target or approve risk.needs_agent_action: The agent missed it or can complete it after approval.not_applicable: No matching app/file/config exists, or the item is outside the safe local-cleanup scope.unknown: Evidence is incomplete; say what command/file is needed.
For every unresolved item, name the responsibility:
用户确认: waiting for user's target, browser profile, or risk approval.Agent 待处理: agent can perform it after approval.系统/第三方限制: requires OS UI, admin session, vendor behavior, or external account action.
Safe Modification Patterns
Move destructive removals to Trash when practical. Do not use rm -rf unless the user explicitly authorizes permanent deletion.
Before deleting Claude Desktop or Claude Code data, quit the app if confirmed. If active CLI processes are running, ask before killing them and show the process list.
Do not delete Claude conversation history unless explicitly confirmed. The protected local paths are:
~/.claude/projects
~/.claude/history.jsonl
~/.claude/file-history
~/.claude/debugExpected Local Checklist
The recurring checklist should include:
- Claude Code device/user ID in
~/.claude.json. - Claude Code OAuth/account/cache fields in
~/.claude.json. ANTHROPIC_AUTH_TOKENpreservation/removal.~/.claude/settings.jsonbrowser-open behavior and privacy-related keys.- Claude CLI caches and usage files.
- macOS Keychain
Claude Code-credentials. - Claude Desktop app binary and data directories.
- Active Claude processes.
- macOS timezone, locale, language, device name, host names, account full name, and account short name.
- Any temporary helper such as
GMT8Clock. - Browser profiles only after explicit browser/profile confirmation.
Keep final reports short but complete: show done items, unresolved items with responsibility, and exact next actions.
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.

