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/roy2392/vibe-agents-rulesWrote 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/roy2392/vibe-agents-rules/safari-automation)<a href="https://agentmods.dev/rules/roy2392/vibe-agents-rules/safari-automation"><img src="https://agentmods.dev/badge/rules/roy2392/vibe-agents-rules/safari-automation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/roy2392/vibe-agents-rules/safari-automation"><img src="https://agentmods.dev/badge/rules/roy2392/vibe-agents-rules/safari-automation.svg" alt="Reviewed on agentmods" width="80" 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.01424 |
| Opus 5.5 | $0.00000 | $0.00570 |
| Sonnet 5.5 | $0.00000 | $0.00285 |
| Haiku 4.5 | $0.00000 | $0.00142 |
Grade A, and why
safari-automation 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 1mo 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-automation — 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 — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Safari Automation Guide
This guide captures hard-won lessons from automating Safari interactions, particularly for web UI automation and testing.
Key Concepts
Managing Safari Windows and Tabs
Objective: Reliably direct Safari to specific URLs in a predictable way, preferably using a single, consistent browser window and tab.
Recommended Approach:
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://example.com"}
else
-- Safari has windows open; use the frontmost one.
tell front window
set targetTab to missing value
try
-- Check if a tab for the target URL is already open
set targetTab to (first tab whose URL starts with "http://example.com")
end try
if targetTab is not missing value then
-- Reuse existing tab: refresh and make active
set URL of targetTab to "http://example.com"
set current tab to targetTab
else
-- No specific tab found: use current active tab
set URL of current tab to "http://example.com"
end if
end tell
end if
delay 1 -- Pause to allow the page to begin loading
end tell
JavaScript Execution in AppleScript
String Escaping Strategies:
-
Using Escaped Quotes:
do JavaScript "document.querySelector('[data-testid=\\'my-button\\']').click();" -
Using character id 39 for Complex Strings:
set sQuote to character id 39 set jsSelector to "[data-testid=" & sQuote & "my-button" & sQuote & "]" set jsCommand to "document.querySelector(" & sQuote & jsSelector & sQuote & ").click();" do JavaScript jsCommand in front document -
XPath for Robust Element Selection:
-- Find button containing specific text set jsCommand to "document.evaluate(\"//button[.//text()='Connect']\", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click();" do JavaScript jsCommand in front document
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.
- 1mo ago First seen · 203 lines · 0 tokens per session scan A bdf28d6069de
safari-automation is a cursor rule published in the GitHub repository roy2392/vibe-agents-rules (10 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,424 tokens. A static security scan graded it A with 0 findings. It is 100% identical to safari-automation, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
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).
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…
scrapy
Cursor rule "scrapy" from Solihatun1/AI-Cursor-Scraping-Assistant, covering scrapy best practices, 1. code organization and structure, 1.1. directory structure, 1.2. file naming conventions and 1.3. module organization.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.