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.5 | $0.00038 | $0.01463 |
| Sonnet 5.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 3mo 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.
- 3mo 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 3mo ago), licensed MIT. It adds 94 tokens to every session and 3,657 once invoked, about $0.0004 per session on Opus 5.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.
macwright-safari-automation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| macwright-safari-automationruchit-p/macwright | Skill | 0 | 3mo ago | MIT | A | 94 | Claude Code |
| macos-harnessbrowser-use/macos-harness | Skill | 1.0k | yesterday | MIT | A | 40 | Codex |
| computer-usePlocr/Reasonix-computer-use | Skill | 43 | 7d ago | MIT | A | 23 | Claude Code |
| web-navigatorPlocr/Reasonix-computer-use | Skill | 43 | 7d ago | MIT | A | 30 | Claude Code |
| frame-macos-notificationnexu-io/open-design | Skill | 110k | today | Apache-2.0 | A | 30 | Claude Code, Codex |
| jev-desktoplahfir/agent-desktop | Skill | 26k | 10d ago | Apache-2.0 | A | 125 | Claude Code, Codex |
| cua-drivertrycua/cua | Skill | 33k | today | MIT | A | 85 | Claude Code, Codex |