# Safari Tabs

> 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…

- **Type:** Skill
- **Install:** `agentstack add skill-jacobrask-claude-skills-safari-tabs`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jacobrask](https://agentstack.voostack.com/s/jacobrask)
- **Installs:** 0
- **Category:** [Web & Browser](https://agentstack.voostack.com/c/web-and-browser)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jacobrask](https://github.com/jacobrask)
- **Source:** https://github.com/jacobrask/claude-skills/tree/main/skills/safari-tabs

## Install

```sh
agentstack add skill-jacobrask-claude-skills-safari-tabs
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Safari Tabs

Safari browser management via AppleScript.

## Key Scripts

| Script | Purpose |
|--------|---------|
| `get_tabs.sh` | Get tabs with optional window filtering (TSV/markdown/JSON) |
| `close_by_pattern.sh` | **RECOMMENDED**: Close tabs matching URL pattern |
| `close_tabs.sh` | Close by window,tab index (advanced) |
| `find_duplicates.sh` | Find/close duplicate tabs |
| `domain_stats.sh` | Analyze tabs by domain |
| `export_tabs_*.sh` | Export as JSON/CSV/markdown/HTML |
| `get_reading_list.sh` | Export Reading List |
| `get_bookmarks.sh` | Export bookmarks |
| `search_history.sh` | Search history |
| `open_urls.sh` | Open URLs from file/stdin |

## Getting Tabs

```bash
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):

```bash
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):
```bash
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

```bash
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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jacobrask](https://github.com/jacobrask)
- **Source:** [jacobrask/claude-skills](https://github.com/jacobrask/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jacobrask-claude-skills-safari-tabs
- Seller: https://agentstack.voostack.com/s/jacobrask
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
