Borrowing it
Nothing to install: this file belongs to ruchit-p/macwright. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ruchit-p/macwright/master/.claude/macwright-skills/skills/safari-automation/SKILL.mdgit clone --depth 1 https://github.com/ruchit-p/macwrightWrote 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/skills/ruchit-p/macwright/safari-automation)<a href="https://agentmods.dev/skills/ruchit-p/macwright/safari-automation"><img src="https://agentmods.dev/badge/skills/ruchit-p/macwright/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/skills/ruchit-p/macwright/safari-automation"><img src="https://agentmods.dev/badge/skills/ruchit-p/macwright/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.00094 | $0.03657 |
| Opus 5 | $0.00047 | $0.01828 |
| Sonnet 5 | $0.00019 | $0.00731 |
| Haiku 4.5 | $0.00009 | $0.00366 |
Grade A, and why
macwright-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 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.
How it starts
The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MacWright Safari Automation
Covers Safari-specific automation using macwright MCP tools, focusing on the coordinate system and element finding.
Coordinate System
The screen uses logical pixels (1728x952 on this machine). CSS pixels from getBoundingClientRect() = logical pixels (do NOT multiply by devicePixelRatio even though DPR=2).
Screenshots are 1280px wide max — at scale 1280/1728 ≈ 0.741x. Do not use screenshot pixel positions as click coordinates.
Viewport Formula
To convert viewport-relative coordinates to screen coordinates:
viewport_left = window_right - innerWidth
viewport_top = window_bottom - innerHeight
screen_x = viewport_left + element.getBoundingClientRect().left
screen_y = viewport_top + element.getBoundingClientRect().top
Get window bounds via AppleScript:
tell application "Safari"
set b to bounds of window 1 -- returns {left, top, right, bottom}
end tell
Get viewport dimensions via safari_js:
JSON.stringify({innerWidth: window.innerWidth, innerHeight: window.innerHeight})
Why this works with sidebars: window_right - innerWidth accounts for any left-side sidebar automatically, since innerWidth shrinks by the sidebar width.
The click_element Tool (preferred over find_element + click)
For the most common case of "find element and click it", use click_element directly:
click_element(selector: 'a', wait: 1500, screenshot: true)
→ {clicked: "a", at: {x: 321, y: 339}, text: "Learn more"}
// Page navigates, screenshot shows result
Auto-wait — use timeout to wait for element to appear before clicking (Playwright-style):
click_element(selector: '#finish', timeout: 10000)
// Polls every 200ms until element appears, then clicks it
// Eliminates wait_for_element + click_element 2-step pattern
SPA navigation — use jsClick for React/GitHub/Turbo apps:
click_element(selector: 'a[data-hovercard-type="issue"]', jsClick: true)
// Dispatches MouseEvent instead of native mouse — triggers JS event handlers
// Supports modifiers: jsClick + modifiers=['Meta'] for Cmd+click
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 · 365 lines · 94 tokens per session scan A f2fb72ce47b1
macwright-safari-automation is a skill published in the GitHub repository ruchit-p/macwright (0 stars, last pushed 27d ago), licensed MIT. It adds 94 tokens to every session and 3,657 once invoked, about $0.0005 per session on Opus 5. 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-31.
Other skills, from other repositories
macos-harness
Control a whole Mac from one persistent Python session with screenshots, PID-targeted input, an animated virtual pointer, targeted Apple Accessibility, Apple Events, Browser Harness CDP, and filesystem access. Use for native, Electron, browser, dialog, file, or cross-app tasks without moving the physical cursor or…
humanize-automation
Human-like mouse, keyboard and scroll behavior for behavioral bot bypass.
browser-control
Control web pages in an existing Chromium remote-debugging session with deterministic sagui commands or the browser-only AI Agent. Use when Claude Code needs to inspect tabs, observe semantic elements, navigate, click, type, send keys, scroll, or complete a browser goal through CDP without controlling native macOS UI…
browser-harness-authoring
Use when mapping a repeatable website workflow into a verified Hermes skill so later runs can follow known steps instead of rediscovering the site. Surveys browser compatibility, semantic targets, failure modes, recovery paths, decision gates, and expiry using dummy data and no irreversible submissions.
reddit-browse-and-post
Let an agent read Reddit by default, and publish only after the user explicitly opts in and approves the exact post. Everything here is account-agnostic: the user supplies credentials through environment variables or a browser login, never through chat.
macos-control
Control macOS GUI applications via mouse automation, keyboard input, screenshots, image recognition, and AppleScript execution. Use when you need to interact with macOS app UIs, take screenshots, click buttons, type text, scroll, drag, or locate images on screen.