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/steipete/agent-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/steipete/agent-rules/safari-automation)<a href="https://agentmods.dev/rules/steipete/agent-rules/safari-automation"><img src="https://agentmods.dev/badge/rules/steipete/agent-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/steipete/agent-rules/safari-automation"><img src="https://agentmods.dev/badge/rules/steipete/agent-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.
Copies of this mod
1 near-identical copy found in the catalogue:
- safari-automation — 100% identical, 0 lines differ
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 steipete/agent-rules (5,673 stars, last pushed 5mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
vibe-test
How to use the vibe-test MCP server for browser testing.
test-case-to-playwright
Convert Katalon True Platform/TestOps manual test cases, test suites, or requirement-linked cases into Playwright TypeScript automation. Use when you need to fetch/read Katalon Platform test cases and implement Playwright scripts, create or adapt a Playwright framework, apply Page Object Model and fixtures, or…
testing
Vitest toolchain and testing discipline - two runtimes, no watch for agents, authoring gate, junk patterns.
cursor-rules
Playwright E2E testing rules for {{PROJECTNAME}}; the full skill lives in .agents/skills/playwright-e2e.
browser-testing
Use when performing browser-based testing, visual verification, accessibility checks, or performance profiling using the browser MCP.
expect-testing
Use when testing, verifying, validating, or QA-ing code changes against a live browser. Also when expect-cli fails or needs debugging.