From chrome-tab-cleaner
Analyze and clean up Chromium-browser tabs on macOS (Chrome, Brave, Edge, Chromium). Use when the user says their browser has too many tabs, wants to clean up / close / triage tabs, asks which tabs to delete, or wants a tab audit. Enumerates the real browser via AppleScript, classifies every tab, and closes selected tiers only after the user confirms.
How this skill is triggered — by the user, by Claude, or both
Slash command
/chrome-tab-cleaner:chrome-tab-cleanerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze the user's **real** Chromium-based browser on macOS, classify every open
Analyze the user's real Chromium-based browser on macOS, classify every open
tab, and close the junk after the user confirms. Closing is reversible
(Cmd+Shift+T) and never touches browsing history.
Engine: ${CLAUDE_PLUGIN_ROOT}/scripts/chrome_tabs.py — stdlib Python 3 +
osascript, no dependencies. (Under Codex the same file is at
${CODEX_PLUGIN_ROOT}/scripts/chrome_tabs.py; if neither env var is set, call it
by its path.)
Guard against an automation browser. chrome-devtools-mcp and similar MCP
servers launch a separate Chrome under
~/.cache/chrome-devtools-mcp/chrome-profile. When running, it can hijack
AppleScript's Apple Events so you only see its 1–2 throwaway tabs. Detect and,
if present, stop only that disposable instance first:
pgrep -f "chrome-devtools-mcp/chrome-profile" && \
pkill -f "user-data-dir=.*chrome-devtools-mcp/chrome-profile"
This never touches the user's daily browser (which runs with no
--user-data-dir). The MCP server relaunches its own Chrome on demand later.
Analyze (read-only).
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/chrome_tabs.py" analyze
Present the category table. If the total is implausibly small (0–2) while the
user insists they have many tabs, go back to step 1. For a different browser
pass --browser "Brave Browser" (or Microsoft Edge, Chromium).
Ask which tier to close, safest first:
junk — blank new-tab pages, search-result pages, translate pages, and
exact-duplicate URLs (first kept). Zero-risk.browsing — adds social/feed tabs: X/Twitter, Product Hunt, WeChat
articles, YouTube/Reddit/Discord/Xiaohongshu/TikTok/Instagram, and surplus
localhost dev servers.aggressive — everything except the work-dashboard allow-list (Vercel,
Sentry, Supabase, Fly, Braintrust, Cloudflare, Feishu, App Store Connect,
OpenRouter, PostHog, Langfuse, Upstash, GCP, Anthropic/OpenAI/Claude). Also
closes GitHub and misc tabs — confirm explicitly.Tiers compose: --tier junk --tier browsing. You can also target one category
by key: blank, search, translate, duplicate, x, producthunt,
wechat, social, localhost, github, other.
Dry-run, then execute. Always show the dry-run count first; only add
--execute after the user confirms the number.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/chrome_tabs.py" close --tier junk
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/chrome_tabs.py" close --tier junk --execute
--execute without explicit user confirmation of the count.chrome-devtools-mcp automation profile.aggressive preserves it.Cmd+Shift+T, history intact),
but still confirm before large closes.Users can add ~/.config/chrome-tab-cleaner/config.json with browser,
work_hosts, work_host_suffixes, social_hosts (each extends the defaults),
or edit the lists / classify() ladder in scripts/chrome_tabs.py.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub simonaking/tab-cleaner --plugin chrome-tab-cleaner