OpenParable
Skip to content
← Back to skills

Safari Tabs

Apps & Automation
safari-tabs

Safari Tabs is an Agent Skill for apps & automation published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Interact with Safari browser tabs, reading list, bookmarks, and history via AppleScript. Use when the user asks to analyze, organize, summarize, deduplicate, close, export, or manage their Safari tabs. Also handles reading list, bookmarks, and history searches. Triggers include "my tabs", "open tabs", "Safari tabs", "clean up my browser", "what tabs do I have open", "organize my tabs", "too many tabs", "reading list", "bookmarks", "browser history", "export tabs". Requires macOS with Safari.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/design/safari-tabs/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/safari-tabs, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Safari Tabs

Safari browser management via AppleScript.

Key Scripts

ScriptPurpose
get_tabs.shGet tabs with optional window filtering (TSV/markdown/JSON)
close_by_pattern.shRECOMMENDED: Close tabs matching URL pattern
close_tabs.shClose by window,tab index (advanced)
find_duplicates.shFind/close duplicate tabs
domain_stats.shAnalyze tabs by domain
export_tabs_*.shExport as JSON/CSV/markdown/HTML
get_reading_list.shExport Reading List
get_bookmarks.shExport bookmarks
search_history.shSearch history
open_urls.shOpen URLs from file/stdin

Getting Tabs

get_tabs.sh                    # All tabs as TSV
get_tabs.sh markdown           # All tabs as markdown
get_tabs.sh -w 1 markdown      # Window 1 only
get_tabs.sh -m "term" markdown # Window containing "term"

Closing Tabs

Always use close_by_pattern.sh (finds tabs by URL regardless of position):

close_by_pattern.sh "unique-url-substring"

# Examples
close_by_pattern.sh "adrianroselli.com"
close_by_pattern.sh "/article/css-has-guide"

Closes ALL matching tabs across all windows. Use unique substring.

Alternative: close by position (error-prone, avoid unless necessary):

close_tabs.sh "1,5" "2,3"  # Window,tab pairs (1-indexed)

Analysis Workflow

  1. Fetch: get_tabs.sh markdown
  2. Analyze: group by domain, identify duplicates/clusters, flag stale content
  3. Report: stats, categorized list, suggestions
  4. Act: close with close_by_pattern.sh "url-substring"

Process-and-close pattern:

  1. Fetch tab
  2. Process it
  3. Close: close_by_pattern.sh "unique-url-part"
  4. Next tab

Export Formats

export_tabs_markdown.sh [list|table|checklist|grouped]
export_tabs_json.sh
export_tabs_csv.sh
export_tabs_html.sh > bookmarks.html  # Importable format

Other Features

Duplicates: find_duplicates.sh [--close] Domain stats: domain_stats.sh Reading list: get_reading_list.sh [tsv|markdown|json] Bookmarks: get_bookmarks.sh [tree|flat|json] History: search_history.sh [term] [--days N] Open URLs: open_urls.sh urls.txt or pipe stdin

Privacy: Tab data stays local. Page content not accessed unless explicitly requested.