Agent skill

Claude Cleanup Audit

by suyuan2022 in suyuan2022/suyuan-skill

Audit and safely modify local Claude Code and Claude Desktop cleanup/privacy settings on macOS.

MITAuto-check passed

Install Claude Cleanup Audit

skills CLI
$ npx skills add suyuan2022/suyuan-skill --skill claude-cleanup-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install suyuan2022/suyuan-skill claude-cleanup-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/suyuan2022/suyuan-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/claude-cleanup-audit .claude/skills/claude-cleanup-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claude-cleanup-audit
GitHub stars
308
Token cost
~1.5k tokens
SKILL.md length
712 words
Files
5 (incl. scripts, references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Audit and safely modify local Claude Code and Claude Desktop cleanup/privacy settings on macOS.

  • Works in 12 steps: Preserve ANTHROPIC_AUTH_TOKEN or remove… → Preserve ~/.claude/projects,… → Remove Claude Desktop data only, or also… → …
  • The user asks to review
  • SKILL.md covers Scope, First Step, Confirmation Gate and Settings Merge Rules, plus 3 more sections
  • Runs Python scripts from its folder; calls claude and python3; needs ANTHROPIC_AUTH_TOKEN

What it does

Claude Cleanup Audit is an agent skill from suyuan2022/suyuan-skill. 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.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/audit-checklist.md` and `references/macos-identity.md`).

It works with macOS. The repository describes itself as: Claude Code Skills by Suyuan — AI-native productivity tools for real practitioners. The licence is MIT.

When your agent uses it

  • The user asks to review
  • Verify Claude local data
  • Telemetry-related settings
  • Login/browser-opening behavior

Example prompts

  • “/claude-cleanup-audit”

Requirements

  • Python 3
  • A credential in ANTHROPIC_AUTH_TOKEN

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Preserve ANTHROPIC_AUTH_TOKEN or remove it.
  2. Preserve ~/.claude/projects, ~/.claude/history.jsonl, ~/.claude/file-history, and ~/.claude/debug.
  3. Remove Claude Desktop data only, or also remove /Applications/Claude.app.
  4. Delete macOS Keychain item Claude Code-credentials.
  5. Scrub ~/.claude.json or delete it entirely.
  6. Clear Claude CLI caches and usage files.
  7. Kill active Claude Code/Claude Desktop processes or leave them running.
  8. Add/update Claude settings: env.BROWSER="/usr/bin/false", skipWebFetchPreflight, autoConnectIde, telemetry/history retention, permissions…
  9. Change timezone; confirm exact IANA timezone such as Asia/Singapore or America/Los_Angeles.
  10. Change Mac device name, LocalHostName, optional HostName, account full name, or account short name.
  11. Clean browser profile data; confirm exact browser and profile path.
  12. Keep backups and whether to move removed files to Trash.

What it can do on your machine

Read from SKILL.md and the folder at commit 423473d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • claude
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ANTHROPIC_AUTH_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claude Cleanup Audit loads about 1.5k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 100 tokens; SKILL.md has 712 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~100
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from suyuan2022/suyuan-skill at commit 423473d, republished under its MIT licence (© suyuan2022). 712 words, ~1,484 tokens.

Download SKILL.mdSave it as .claude/skills/claude-cleanup-audit/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
claude-cleanup-audit
description
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.

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:

bash
python3 ~/.codex/skills/claude-cleanup-audit/scripts/audit_claude_cleanup.py

Use 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:

  1. Preserve ANTHROPIC_AUTH_TOKEN or remove it.
  2. Preserve ~/.claude/projects, ~/.claude/history.jsonl, ~/.claude/file-history, and ~/.claude/debug.
  3. Remove Claude Desktop data only, or also remove /Applications/Claude.app.
  4. Delete macOS Keychain item Claude Code-credentials.
  5. Scrub ~/.claude.json or delete it entirely.
  6. Clear Claude CLI caches and usage files.
  7. Kill active Claude Code/Claude Desktop processes or leave them running.
  8. Add/update Claude settings: env.BROWSER="/usr/bin/false", skipWebFetchPreflight, autoConnectIde, telemetry/history retention, permissions, disabled tools, or slim prompt settings.
  9. Change timezone; confirm exact IANA timezone such as Asia/Singapore or America/Los_Angeles.
  10. Change Mac device name, LocalHostName, optional HostName, account full name, or account short name.
  11. Clean browser profile data; confirm exact browser and profile path.
  12. 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 env and secrets by merging only requested keys. Do not print token values.
  • For permissions.deny, merge set-wise and de-duplicate. Preserve allow, ask, and defaultMode.
  • 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: create env object.
    • Existing env but 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.

Show full SKILL.md (254 more words)Show less

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:

text
~/.claude/projects
~/.claude/history.jsonl
~/.claude/file-history
~/.claude/debug

Expected 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_TOKEN preservation/removal.
  • ~/.claude/settings.json browser-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.

© suyuan2022, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in claude-cleanup-audit of suyuan2022/suyuan-skill.

  • SKILL.md
  • agents/openai.yaml
  • references/audit-checklist.md
  • references/macos-identity.md
  • scripts/audit_claude_cleanup.py

Open the folder on GitHubat commit 423473d

Compare with similar skills

Claude Cleanup Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claude Cleanup Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claude Cleanup Audit this skillsuyuan2022/suyuan-skill308—~1.5kAutomated safety check: PassMIT
Site ArchitectureAvdLee/RocketSimApp80611 repos~3.3kAutomated safety check: PassCustom licence
Engine Whats Newflutter/flutter180k—~978Automated safety check: PassBSD-3-Clause
macOS Spm App PackagingDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Orca iOS Simulator Controlstablyai/orca89k1 repos~584Automated safety check: PassApache-2.0

Similar skills

  • Site Architecture

    AvdLee/RocketSimApp

    When the user wants to plan, map, or restructure their website's page hierarchy, navigation, URL structure, or internal linking.

    806 GitHub starsUsed in 11 repos~3.3k tokens
    Marketing & SEOAuto-check passed
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    180k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • macOS Spm App Packaging

    Dimillian/Skills

    Scaffold, build, and package SwiftPM-based macOS apps without an Xcode project.

    4k GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    89k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed

More from suyuan2022/suyuan-skill

  • Claude Cleanup

    suyuan2022/suyuan-skill

    在 macOS 上安全审计、完整备份、清理或重置 Claude Code 与 Claude Desktop 本机状态。适用于清理可再生缓存和日志、轮换本地 ID、重置桌面端登录态、移除应用、继承现有遥测状态、启用最小提示词模式或修改台北时区;不用于规避封禁或平台风控。

    308 GitHub stars~634 tokensUpdated 1 mo ago
    Auto-check: notes
  • Task Triage

    suyuan2022/suyuan-skill

    Task triage with position-based thinking. An agent skill from suyuan2022/suyuan-skill.

    308 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Codex Review

    suyuan2022/suyuan-skill

    Dual-model code review via Codex CLI. An agent skill from suyuan2022/suyuan-skill.

    308 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check: warnings
  • Break AI Slop

    suyuan2022/suyuan-skill

    Break AI Slop — force the AI to think like a real expert before doing anything.

    308 GitHub stars~981 tokensUpdated 1 mo ago
    Auto-check passed
  • Whatis

    suyuan2022/suyuan-skill

    What Is This — explain anything as a picture-first HTML page.

    308 GitHub stars~606 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Claude Cleanup Audit

What does Claude Cleanup Audit do?

Audit and safely modify local Claude Code and Claude Desktop cleanup/privacy settings on macOS. Claude Cleanup Audit is an agent skill from suyuan2022/suyuan-skill. Audit and safely modify local Claude Code and Claude Desktop cleanup/privacy settings on macOS.

When should I use Claude Cleanup Audit?

Claude Cleanup Audit fits situations like: the user asks to review; verify Claude local data; telemetry-related settings; login/browser-opening behavior.

How do I install Claude Cleanup Audit in Claude Code?

Run `npx skills add suyuan2022/suyuan-skill --skill claude-cleanup-audit -a claude-code`. Or copy the skill folder (claude-cleanup-audit in suyuan2022/suyuan-skill) into .claude/skills/claude-cleanup-audit in your project. Claude Code loads it when a task matches its description.

How do I install Claude Cleanup Audit in Codex?

Run `npx skills add suyuan2022/suyuan-skill --skill claude-cleanup-audit -a codex`. Or copy the skill folder (claude-cleanup-audit in suyuan2022/suyuan-skill) into .agents/skills/claude-cleanup-audit in your project. Codex loads it when a task matches its description.

Can I use Claude Cleanup Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add suyuan2022/suyuan-skill --skill claude-cleanup-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claude-cleanup-audit, .gemini/skills/claude-cleanup-audit, .github/skills/claude-cleanup-audit and .opencode/skills/claude-cleanup-audit in your project.

What does Claude Cleanup Audit need to run?

Going by SKILL.md and its folder, Claude Cleanup Audit needs Python for the scripts in its folder, the command-line tools its instructions call (claude and python3) and credentials named ANTHROPIC_AUTH_TOKEN. Our summary lists: Python 3; A credential in ANTHROPIC_AUTH_TOKEN.

Does Claude Cleanup Audit access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Claude Cleanup Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Claude Cleanup Audit use?

Claude Cleanup Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claude Cleanup Audit use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Claude Cleanup Audit?

Skills that share tags, products or a category with Claude Cleanup Audit: Site Architecture (AvdLee/RocketSimApp, 806 stars), Engine Whats New (flutter/flutter, 180k stars), macOS Spm App Packaging (Dimillian/Skills, 4k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claude Cleanup Audit?

suyuan2022 (a GitHub user) maintains it in suyuan2022/suyuan-skill, which has 308 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 24, 2026.

Source: suyuan2022/suyuan-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.