safari

safari is a skill for Claude Code, Codex from wende/macbeth. It costs 18 tokens per session (1,698 once invoked), scanned A, original, MIT.

A tool for controlling Safari, Apple’s web browser, through navigation, searches, links, page content, and browser tabs.

In plain words
What is it for?
Opening websites, moving between pages, clicking links, reading page content, switching tabs, and reloading Safari.
Why use it?
It removes the need to perform repetitive browser actions manually and provides a way to inspect web pages through their accessible structure.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wende/macbeth/safari
Any agent
npx skills add wende/macbeth --skill safari
Clone the repo
git clone --depth 1 https://github.com/wende/macbeth

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safari

README.md
[![agentmods](https://agentmods.dev/badge/skills/wende/macbeth/safari.svg)](https://agentmods.dev/skills/wende/macbeth/safari)
Your own site
<a href="https://agentmods.dev/skills/wende/macbeth/safari"><img src="https://agentmods.dev/badge/skills/wende/macbeth/safari.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,698 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01698
Opus 5 $0.00009 $0.00849
Sonnet 5 $0.00004 $0.00340
Haiku 4.5 $0.00002 $0.00170

Measured 4d ago against content hash 3bc112f8fd74, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

safari scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/get-tabs.mjs, scripts/open-url.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { execSync } from "node:child_process";
skills/Safari/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Safari Automation

Connect

Always connect with: connect_app({ name: "Safari" })

Key Concepts

Safari's AX tree has two main areas:

  1. Chrome (toolbar, tabs, menus) — native macOS UI elements
  2. Web content — a web_area element containing the page's DOM-like accessibility tree (headings, links, groups, text, lists, tables, etc.)

Navigate to a URLfill on the address bar sets the AX value but does NOT trigger navigation. Use open via shell instead:

open -a Safari "https://example.com"

Or with the macbeth SDK:

import { execSync } from "node:child_process";
execSync('open -a Safari "https://example.com"');

Read current URL:

{ "query": [
    { "role": "window" },
    { "role": "toolbar" },
    { "role": "text_field", "identifier": "WEB_BROWSER_ADDRESS_AND_SEARCH_FIELD" }
]}

The value field contains the current URL.

Back / Forward: Click the toolbar buttons:

{ "query": [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "BackButton" }] }
{ "query": [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "ForwardButton" }] }

Reload: select_menu_item({ app: "Safari", menuPath: ["View", "Reload Page"] }) or click ReloadButton

Common Queries

Toolbar Buttons

Element Query
Address bar [{ "role": "window" }, { "role": "toolbar" }, { "role": "text_field", "identifier": "WEB_BROWSER_ADDRESS_AND_SEARCH_FIELD" }]
Back [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "BackButton" }]
Forward [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "ForwardButton" }]
Reload [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "ReloadButton" }]
New Tab [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "NewTabButton" }]
Share [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "ShareButton" }]
Sidebar [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "SidebarButton" }]
Tab Overview [{ "role": "window" }, { "role": "toolbar" }, { "role": "button", "identifier": "TabOverviewButton" }]

Read the full file on GitHub · 134 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 134 lines · 18 tokens per session scan A 3bc112f8fd74

Subscribe to this mod's changes

safari is a skill published in the GitHub repository wende/macbeth (3 stars, last pushed 9d ago), licensed MIT. It adds 18 tokens to every session and 1,698 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mirroir-onboard

Onboard a consumer web app to mirroir's .mirroir/ dotfile by EXPLORING the running app (chrome-devtools-mcp) — derive real selectors from the accessibility tree, exercise each surface's primary action, emit the .mirroir/ tree, and validate by LIVE REPLAY with a self-heal loop. Reject shallow "page renders" coverage.

jfarcand/mirroir-mcp · 85 tokens

@elad12390/web-research-assistant

Comprehensive MCP server for web research with 14 tools: SearXNG + Exa AI search, URL crawling, stealth scraping (Cloudflare bypass), package registry lookup (npm/PyPI/crates), GitHub stats, changelog fetching, tech comparison, error translation, API docs discovery, stock image search, and service health. Trigger…

elad12390/web-research-assistant · 144 tokens

verify

Drive the running ClawStash app in a real browser to verify UI/UX changes end-to-end. Use after nontrivial frontend changes, before committing — tests and tsc alone have missed lifecycle/timing bugs in this repo before (see MEMORY.md.

fo0/clawstash · 54 tokens

openclaw-web-scraper

Stealth web scraping MCP server with 5 tools for structured data extraction. Use when: (1) 'scrape this URL' or 'extract data from this site', (2) 'get all prices from this page' or 'extract structured data', (3) 'take a screenshot of this page', (4) 'click this button and get the result' or 'interact with a page'…

yedanyagamiai-cmd/openclaw-mcp-servers · 131 tokens

browser-testing-with-devtools

Verify browser behavior with runtime evidence from DOM, console, network, and performance signals.

Plazmodium/odin-workflow · 23 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens