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.
git clone --depth 1 https://github.com/SuperCrazyKaizen/macos-automator-mcpWrote 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.
[](https://agentmods.dev/rules/supercrazykaizen/macos-automator-mcp/safari)<a href="https://agentmods.dev/rules/supercrazykaizen/macos-automator-mcp/safari"><img src="https://agentmods.dev/badge/rules/supercrazykaizen/macos-automator-mcp/safari.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.04107 |
| Opus 5 | $0.00000 | $0.02054 |
| Sonnet 5 | $0.00000 | $0.00821 |
| Haiku 4.5 | $0.00000 | $0.00411 |
Grade A, and why
safari scanned grade A with 0 findings 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 8d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to safari — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Meta Note
This file, safari.mdc, serves as a repository for detailed working notes, observations, and learnings acquired during the process of automating Safari interactions, particularly for the MCP Inspector UI. It's intended to capture the nuances of trial-and-error, debugging steps, and insights into what worked, what didn't, and why.
This contrasts with mcp-inspector.mdc, which is designed to be the concise, polished, and operational ruleset for future automated runs once a specific automation flow (like connecting to the MCP Inspector) has been stabilized and proven reliable. mcp-inspector.mdc should contain the 'final' working scripts and minimal necessary commentary, while safari.mdc is the space for the extended antechamber of discovery.
Key Learnings and Observations from Safari Automation (MCP Inspector)
1. Managing Safari Windows and Tabs for the Inspector
- Objective: Reliably direct Safari to the MCP Inspector URL (
http://127.0.0.1:6274) in a predictable way, preferably using a single, consistent browser window and tab to avoid disrupting the user's workspace or losing context. - **Initial Challenges & Evolution:
- Simply using
make new document with properties {URL:"..."}could lead to multiple windows/tabs if not managed. - Attempts to close all existing Inspector tabs first (
repeat with w in windows... close t...) were functional but could be overly aggressive if the user had other work in Safari. - Identifying and reusing an existing specific tab for the Inspector requires careful targeting (e.g.,
first tab whose URL starts with "..."). If this tab was from a previous, unconfigured session, just switching to it wasn't enough; it needed to be reloaded/reset.
- Simply using
- **Refined & Recommended Approach (as implemented in
mcp-inspector.mdc):
This logic aims to use the existing front window and either reuse/refresh an Inspector tab or repurpose the current active tab, falling back to creating a new window only if Safari isn't open.tell application "Safari" activate delay 0.2 -- Allow Safari to become the frontmost application if (count of windows) is 0 then -- No Safari windows are open, so create a new one. make new document with properties {URL:"http://127.0.0.1:6274"} else -- Safari has windows open; use the frontmost one. tell front window set inspectorTab to missing value try -- Check if a tab for the Inspector is already open in this window. set inspectorTab to (first tab whose URL starts with "http://127.0.0.1:6274") end try if inspectorTab is not missing value then -- An Inspector tab exists: set its URL again (to refresh/reset) and make it active. set URL of inspectorTab to "http://127.0.0.1:6274" set current tab to inspectorTab else -- No specific Inspector tab found: set the URL of the *current active tab*. set URL of current tab to "http://127.0.0.1:6274" end if end tell end if delay 1 -- Pause to allow the page to begin loading. end tell
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.
- 8d ago First seen · 217 lines · 0 tokens per session scan A e8852ec59d92
safari is a cursor rule published in the GitHub repository SuperCrazyKaizen/macos-automator-mcp (8 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,107 tokens. A static security scan graded it A with 0 findings. It is 100% identical to safari, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
webkit-browser
Cursor rule "webkit-browser" from duckduckgo/apple-browsers, covering webkit & browser development guidelines, webview configuration, basic webview setup, user scripts management and tab management.
vasu-playwright-utils
../../templates/cursor-rules/vasu-playwright-utils.mdc.
chrome-extension-manifest-rules
Specific rules related to the Chrome extension manifest file, ensuring proper structure and content.
vla-registry
Multi-model GUI/VL registry — browser wllama grounding (ShowUI-2B is default + E2E gate).
dev-browser
Fallback browser automation with persistent Chrome state. Use only when Browser Use is unavailable or blocked.
safari
This file, safari.mdc, serves as a repository for detailed working notes, observations, and learnings acquired during the process of automating Safari interactions, particularly for the MCP Inspector UI. It's intended to capture the nuances of trial-and-error, debugging steps, and insights into what worked, what…