with one click
ai-tools-management
Scan, clean, back up, and uninstall AI dev tools on macOS.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Scan, clean, back up, and uninstall AI dev tools on macOS.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
| name | ai-tools-management |
| description | Scan, clean, back up, and uninstall AI dev tools on macOS. |
| author | Henri |
| created | 2026-03-12 |
| last_updated | 2026-05-13 |
ๅไธๆฅๆบ๏ผๆฌ skill ็ๅฏไธๅฎไฝๅจ
henri_skillsไปๅบไธญ๏ผ~/.claude/skills/็ญๅไธบ่ฝฏ้พๆฅใ็ผ่พๆถ่ฏท็ดๆฅไฟฎๆนhenri_skillsไธญ็ๆไปถใ
Scan, back up, clean, and uninstall AI development tools on macOS.
Non-negotiable. Violating any rule risks permanent data loss.
pgrep -f <process> โ warn user to close running tools first. Warn about sensitive data (API tokens, internal URLs) in backups.trash helper below. Only use sudo rm -rf for /Applications/*.app bundles, never with variable paths. Validate dynamically constructed paths are non-empty and under known tool directories.trash() {
for path in "$@"; do
if [ -e "$path" ]; then
osascript -e "tell application \"Finder\" to delete POSIX file \"$path\"" 2>/dev/null || \
mv "$path" ~/.Trash/ 2>/dev/null || \
rm -rf "$path"
fi
done
}
| Tool | ID | Detect App | Detect Data | Process Name |
|---|---|---|---|---|
| VS Code | vscode | /Applications/Visual Studio Code.app | ~/Library/Application Support/Code/ | Electron (Code) |
| Cursor | cursor | /Applications/Cursor.app | ~/.cursor/ | Cursor |
| Windsurf | windsurf | /Applications/Windsurf.app | ~/.windsurf/, ~/.codeium/ | Windsurf |
| Tool | ID | Install Method | Detect Data | Process Name |
|---|---|---|---|---|
| Claude Code | claude-code | ็ฌ็ซไบ่ฟๅถ ~/.local/bin/claude | ~/.claude/ | claude |
| OpenCode | opencode | brew: anomalyco/tap/opencode | ~/.local/share/opencode/ | opencode |
| GitHub Copilot CLI | copilot | npm: @github/copilot | ~/.copilot/ | copilot |
| OpenAI Codex | codex | npm: @openai/codex | ~/.codex/ | codex |
| Cline | cline | npm: cline | ~/.cline/ | cline |
| Gemini CLI | gemini | brew: gemini-cli | ~/.gemini/ | gemini |
| Amp | amp | ็ฌ็ซไบ่ฟๅถ ~/.local/bin/amp | ~/.amp/, ~/.local/share/amp/, ~/.config/amp/ | amp |
| Droid | droid | npm: @factory/cli ๆ็ฌ็ซไบ่ฟๅถ | ~/.factory/ | droid |
echo "=== AI Tool Detection ==="
echo "--- IDE Tools ---"
for p in \
"/Applications/Visual Studio Code.app" \
"/Applications/Cursor.app" \
"/Applications/Windsurf.app"; do
if [ -e "$p" ]; then
size=$(du -sh "$p" 2>/dev/null | cut -f1)
echo " โ
Found: $p ($size)"
fi
done
echo "--- CLI Tools ---"
for p in \
"$HOME/.claude" \
"$HOME/.local/share/opencode" \
"$HOME/.opencode" \
"$HOME/.copilot" \
"$HOME/.codex" \
"$HOME/.cline" \
"$HOME/.gemini" \
"$HOME/.amp" \
"$HOME/.factory"; do
if [ -e "$p" ]; then
size=$(du -sh "$p" 2>/dev/null | cut -f1)
echo " โ
Found: $p ($size)"
fi
done
/Applications/Visual Studio Code.app # App bundle (~715M)
~/.vscode/extensions/ # Installed extensions (~2G+)
~/Library/Application Support/Code/
โโโ User/settings.json # โ CONFIG
โโโ User/keybindings.json # โ CONFIG
โโโ User/workspaceStorage/<hash>/
โ โโโ state.vscdb # SQLite: workspace state
โ โโโ chatSessions/ # โ ๏ธ CHAT: Copilot chat logs (JSON)
โโโ User/globalStorage/state.vscdb # Global state DB
โโโ CachedExtensionVSIXs/ # โ
CACHE
โโโ CachedData/ # โ
CACHE
โโโ Cache/ # โ
CACHE
โโโ WebStorage/ # ๐ก MODERATE
โโโ logs/ # โ
CACHE
โโโ History/ # ๐ก MODERATE
~/Library/Caches/com.microsoft.VSCode/ # โ
CACHE
~/Library/Saved Application State/com.microsoft.* # โ
CACHE
Chat extraction:
find ~/Library/Application\ Support/Code/User/workspaceStorage \
-name "*.json" -path "*/chatSessions/*" 2>/dev/null
Duplicate extension detection:
ls ~/.vscode/extensions/ 2>/dev/null | \
sed 's/-[0-9]*\.[0-9]*\.[0-9]*$//' | sort | uniq -d | while read ext; do
echo "Duplicate: $ext"
ls -d ~/.vscode/extensions/${ext}-* 2>/dev/null | while read dir; do
echo " $dir ($(du -sh "$dir" | cut -f1))"
done
done
/Applications/Cursor.app # App bundle
~/.cursor/
โโโ extensions/ # โ
CACHE โ reinstallable (~627M)
โโโ projects/ # โ CONFIG
โโโ ai-tracking/ai-code-tracking.db # โ ๏ธ CHAT โ SQLite (may be empty)
โโโ *.json # โ CONFIG
/Applications/Windsurf.app # App bundle
~/.windsurf/
โโโ extensions/ # โ
CACHE โ installed extensions (~1G+)
โโโ plans/ # ๐ก MODERATE
โโโ worktrees/ # ๐ก MODERATE
~/.codeium/windsurf/
โโโ cascade/*.pb # โ ๏ธ CHAT โ Protobuf binary (~80M)
โโโ database/ # ๐ก MODERATE โ embedding DB (~62M)
โโโ memories/ # โ CONFIG โ global rules
โโโ codemaps/ # ๐ก MODERATE
โโโ implicit/ # ๐ก MODERATE
Notes:
.pb files cannot be converted to text without the .proto schema. Always preserve originals.~/.windsurf/extensions/ can be reinstalled from Marketplace.ls ~/.windsurf/extensions/ 2>/dev/null | \
sed 's/-[0-9].*$//' | sort | uniq -d | while read ext; do
echo "Duplicate: $ext"
ls -d ~/.windsurf/extensions/${ext}-* 2>/dev/null | while read dir; do
echo " $(du -sh "$dir" | cut -f1) - $(basename "$dir")"
done
done
~/.claude/
โโโ history.jsonl # โ ๏ธ CHAT โ command history
โโโ settings.json # โ CONFIG + ๐ด SENSITIVE (may contain API tokens)
โโโ projects/ # โ CONFIG โ per-project data and CLAUDE.md
โโโ shell-snapshots/ # โ
CACHE
โโโ todos/ # ๐ก MODERATE
โโโ skills/ # โ CONFIG โ skill definitions
โโโ plugins/ # โ CONFIG
Sensitive data check:
grep -E "(TOKEN|KEY|SECRET|PASSWORD)" ~/.claude/settings.json 2>/dev/null
~/.local/share/opencode/
โโโ opencode.db # โ ๏ธ CHAT โ SQLite (~14M)
โโโ opencode.db-shm # temp
โโโ opencode.db-wal # temp
~/.opencode/ # โ CONFIG (if exists)
Chat extraction:
db="$HOME/.local/share/opencode/opencode.db"
if [ -f "$db" ]; then
echo "Sessions: $(sqlite3 "$db" 'SELECT COUNT(*) FROM session;')"
echo "Messages: $(sqlite3 "$db" 'SELECT COUNT(*) FROM message;')"
fi
~/.copilot/
โโโ config.json # โ CONFIG
โโโ permissions-config.json # โ CONFIG
โโโ settings.json # โ CONFIG
โโโ command-history-state.json # ๐ก MODERATE
โโโ session-state/ # โ ๏ธ CHAT โ session data (~4M)
โโโ logs/ # โ
CACHE (~136K)
โโโ pkg/ # โ
CACHE โ bundled packages (~352M)
โโโ installed-plugins/ # ๐ก MODERATE
โโโ ide/ # ๐ก MODERATE โ IDE integration
โโโ oaicopilot/ # ๐ก MODERATE
โโโ plugin-data/ # ๐ก MODERATE
~/.codex/
โโโ config.toml # โ CONFIG
โโโ auth.json # โ CONFIG + ๐ด SENSITIVE
โโโ history.jsonl # โ ๏ธ CHAT โ command history
โโโ AGENTS.md # โ CONFIG
โโโ sessions/ # โ ๏ธ CHAT โ session data (~443M)
โโโ archived_sessions/ # โ ๏ธ CHAT โ archived sessions (~49M)
โโโ cache/ # โ
CACHE (~644K)
โโโ log/ # โ
CACHE (~8.4M)
โโโ shell_snapshots/ # โ
CACHE
โโโ memories/ # ๐ก MODERATE
โโโ plugins/ # ๐ก MODERATE (~37M)
โโโ skills/ # ๐ก MODERATE
โโโ rules/ # ๐ก MODERATE
โโโ sqlite/ # ๐ก MODERATE
โโโ ambient-suggestions/ # ๐ก MODERATE
โโโ computer-use/ # ๐ก MODERATE (~28M)
โโโ vendor_imports/ # ๐ก MODERATE
โโโ node_repl/ # ๐ก MODERATE
โโโ tmp/ # โ
CACHE
~/.cline/
โโโ data/
โโโ globalState.json # โ CONFIG โ settings, provider prefs
โโโ secrets.json # ๐ด SENSITIVE โ API keys (minimaxApiKey, zaiApiKey, etc.)
โโโ workspaces/ # ๐ก MODERATE โ per-workspace state
Notes: Cline ๆฏ VS Code ๆฉๅฑ็ CLI ็ๆฌใๆฐๆฎ้้ๅธธ่พๅฐ๏ผ~140K๏ผใ
~/.gemini/
โโโ settings.json # โ CONFIG
โโโ GEMINI.md # โ CONFIG โ global rules
โโโ google_accounts.json # ๐ด SENSITIVE โ Google OAuth
โโโ oauth_creds.json # ๐ด SENSITIVE โ OAuth credentials
โโโ projects.json # โ CONFIG
โโโ state.json # ๐ก MODERATE
โโโ trustedFolders.json # ๐ก MODERATE
โโโ installation_id # ๐ก MODERATE
โโโ history/ # โ ๏ธ CHAT โ per-session history files (~20M)
โโโ antigravity/ # ๐ก MODERATE
โโโ skills/ # ๐ก MODERATE
โโโ tmp/ # โ
CACHE
Chat extraction:
ls ~/.gemini/history/ 2>/dev/null | wc -l
du -sh ~/.gemini/history/ 2>/dev/null
~/.amp/ # ไธป็ฎๅฝ (~125M)
โโโ bin/amp # โ CONFIG โ binary (symlinked from ~/.local/bin/amp)
โโโ file-changes/ # ๐ก MODERATE โ tracked file changes (~58M)
~/.local/share/amp/ # ๆฐๆฎ็ฎๅฝ (~44M)
โโโ threads/ # โ ๏ธ CHAT โ per-thread JSON (~44M)
โโโ history.jsonl # โ ๏ธ CHAT โ command history
โโโ session.json # ๐ก MODERATE
โโโ device-id.json # ๐ก MODERATE
โโโ secrets.json # ๐ด SENSITIVE โ API key
โโโ ide/ # ๐ก MODERATE โ IDE integration
~/.config/amp/
โโโ settings.json # โ CONFIG
Notes: Amp ้่ฟ็ฌ็ซๅฎ่ฃ
่ๆฌๅฎ่ฃ
๏ผไบ่ฟๅถๅญๅจๅจ ~/.amp/bin/ ๅนถ symlink ๅฐ ~/.local/bin/ampใ่ชๆดๆฐๅฝไปค: amp updateใ
~/.factory/ # ไธป็ฎๅฝ (~217M)
โโโ settings.json # โ CONFIG
โโโ auth.v2.file # ๐ด SENSITIVE โ auth token
โโโ auth.v2.key # ๐ด SENSITIVE โ auth key
โโโ history.json # โ ๏ธ CHAT โ command history (~36K)
โโโ sessions/ # โ ๏ธ CHAT โ per-session data (~18M, 22 sessions)
โโโ sessions-index.json # ๐ก MODERATE
โโโ droids/ # โ CONFIG โ custom droid definitions
โโโ plugins/ # ๐ก MODERATE (~3.4M)
โโโ logs/ # โ
CACHE (~186M โ ๏ธ large)
โโโ cache/ # โ
CACHE
โโโ bin/ # โ CONFIG โ binary
โโโ code-server-data/ # ๐ก MODERATE โ embedded code server
โโโ code-server.sock # temp
โโโ artifacts/ # ๐ก MODERATE
โโโ snapshots/ # ๐ก MODERATE
โโโ sounds/ # ๐ก MODERATE
โโโ telemetry/ # โ
CACHE
โโโ temp/ # โ
CACHE
โโโ ide/ # ๐ก MODERATE
โโโ certs/ # ๐ก MODERATE
โโโ computer.json # ๐ก MODERATE
โโโ background-processes.json # ๐ก MODERATE
โโโ background-tasks.json # ๐ก MODERATE
Notes: Droid ็ฑ Factory AI ๅผๅใๆฅๅฟ็ฎๅฝๅฏ่ฝ้ๅธธๅคง๏ผ~186M๏ผ๏ผๆฏๆธ
็้็น็ฎๆ ใnpm ๅ
ๅไธบ @factory/cliใ
Goal: Discover installed AI tools and report space usage.
du -sh <path> 2>/dev/nullGoal: Export chat histories and critical configs before destructive operations.
~/Downloads/ai-tools-backup-$(date +%Y%m%d-%H%M%S)/manifest.json with tool details, file counts, checksumstar czfAlways scan first. Always dry-run before executing.
| Target | Tool | Command |
|---|---|---|
| Extension VSIX cache | VS Code | trash ~/Library/Application\ Support/Code/CachedExtensionVSIXs |
| App cache | VS Code | trash ~/Library/Application\ Support/Code/CachedData |
| Browser cache | VS Code | trash ~/Library/Application\ Support/Code/Cache |
| State DB backup | VS Code | trash .../User/globalStorage/state.vscdb.backup |
| Old logs (>7d) | VS Code | find .../Code/logs -mtime +7 -exec trash {} + |
| Duplicate extensions (old versions) | VS Code/Cursor/Windsurf | detect then trash older dirs |
| Shell snapshots | Claude Code | trash ~/.claude/shell-snapshots |
| System cache | VS Code | trash ~/Library/Caches/com.microsoft.VSCode |
| Logs | Droid | trash ~/.factory/logs โ ๅฏ้ๆพ ~186M |
| Logs | OpenAI Codex | trash ~/.codex/log โ ~8.4M |
| Logs | GitHub Copilot CLI | trash ~/.copilot/logs |
| Cache | OpenAI Codex | trash ~/.codex/cache ~/.codex/tmp |
| Temp / telemetry | Droid | trash ~/.factory/temp ~/.factory/telemetry |
| Temp | Gemini CLI | trash ~/.gemini/tmp |
| Bundled packages | GitHub Copilot CLI | trash ~/.copilot/pkg โ ~352M, re-downloaded on next run |
| Target | Tool | Notes |
|---|---|---|
| Bundled Chromium | Windsurf | ws-browser/ ~465M, re-downloaded on launch |
| WebStorage | VS Code | ~1.4G browser storage |
| All extensions | Cursor/Windsurf | reinstallable from Marketplace |
| Archived sessions | OpenAI Codex | ~/.codex/archived_sessions/ ~49M |
| Shell snapshots | OpenAI Codex | ~/.codex/shell_snapshots/ |
| Code server data | Droid | ~/.factory/code-server-data/ ~1.9M |
| File changes | Amp | ~/.amp/file-changes/ ~58M, ้ๅปบไปฃไปท้ซ |
| Target | Tool | Notes |
|---|---|---|
| All extensions | VS Code | ~2.2G, private extensions may be lost |
| Embedding database | Windsurf | rebuilt on next indexing |
| Extension data (globalStorage) | VS Code | may contain extension state |
Goal: Completely remove an AI tool.
Per-tool uninstall commands:
IDE Tools:
trash ~/.vscode ~/Library/Application\ Support/Code ~/Library/Caches/com.microsoft.VSCode + sudo rm -rf "/Applications/Visual Studio Code.app"trash ~/.cursor + sudo rm -rf "/Applications/Cursor.app"trash ~/.windsurf ~/.codeium + sudo rm -rf "/Applications/Windsurf.app"CLI Tools:
trash ~/.claude + ๅ ้ค ~/.local/share/claude/ ๅ ~/.local/bin/claude ็ฌฆๅท้พๆฅtrash ~/.local/share/opencode ~/.opencode + brew uninstall opencodetrash ~/.copilot + npm uninstall -g @github/copilottrash ~/.codex + npm uninstall -g @openai/codextrash ~/.cline + npm uninstall -g clinetrash ~/.gemini + brew uninstall gemini-clitrash ~/.amp ~/.local/share/amp ~/.config/amp + ๅ ้ค ~/.local/bin/amp ็ฌฆๅท้พๆฅtrash ~/.factory + npm uninstall -g @factory/cli ๆๅ ้ค ~/.local/bin/droid ไบ่ฟๅถWhen scanning or backing up, check and warn:
| Pattern | Type |
|---|---|
*TOKEN*, *_KEY, *SECRET* | API credentials |
ANTHROPIC_*, OPENAI_*, GOOGLE_* | AI service tokens |
mongodb://, postgres:// | Connection strings |
apiKey@*, sgamp_user_* | Amp API keys (~/.local/share/amp/secrets.json) |
minimaxApiKey, zaiApiKey | Cline API keys (~/.cline/data/secrets.json) |
auth.v2.file, auth.v2.key | Droid auth tokens (~/.factory/) |
oauth_creds.json, google_accounts.json | Gemini OAuth (~/.gemini/) |
auth.json | Codex auth (~/.codex/) |
grep -rIl -E "(TOKEN|API_KEY|SECRET|PASSWORD|apiKey|mongodb://|postgres://)" <directory> 2>/dev/null
ๆด็ Downloads ๆ น็ฎๅฝๆไปถ๏ผๆ็ฑปๅๅ็ฑปๅฐๅฏนๅบๆไปถๅคนใๅฏนไนฆ็ฑ็ฎๅฝ่ฟไธๆญฅๆไธป้ขๅฝ็ฑป๏ผๅนถ็ปดๆคไนฆ็ฑๆธ ๅ.mdใๆไฝๅๅฟ ้กป่ทๅ็จๆทๆๆ๏ผไธ็ดๆฅๅ ้คๆไปถใ
Download YouTube transcripts, subtitles, and cover images by URL or video ID.
ไธ้ฎๆญๅปบ้กน็ฎๆๆกฃ็ณป็ป้ชจๆถ๏ผๆ ธๅฟไธๆๆกฃ + c.md + jobs/legacy ๆต่ฝฌ + Agents.md ็บฆๅฎ๏ผใๅฝ็จๆท่ฆๆฑๅๅงๅๆๆกฃ็ณป็ปใๆญๅปบๆๆกฃ็ปๆใๆไธบๆฐ้กน็ฎๅๅปบๆๆกฃ้ชจๆถๆถไฝฟ็จใ
Audit agent config health across all layers. Run periodically or when collaboration feels off.
Test SDK connectivity with third-party model providers (GLM, MiniMax, etc.).
Write session summaries and rewrite work-notes into articles.
Based on SOC occupation classification