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.
npx agentmods add rules/mantisware/peepit/safarigit clone --depth 1 https://github.com/MantisWare/peepitWhat 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 | $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 yesterday.
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.
- yesterday First seen · 217 lines · 0 tokens per session scan A e8852ec59d92
safari is a cursor rule published in the GitHub repository MantisWare/peepit (2 stars, last pushed 1y 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
050-plan
When the user types /plan or asks to create a project plan, feature PRD, or retrospective.
dreamd-recall
Recall lessons, decisions, and prior context from the .agent/ memory daemon. Use when starting work in a project that has a .agent/ folder, when the user references a past decision, or when you are about to make a choice that has a documented prior.
session-memory
Use at conversation wrap-up or when the user explicitly indicates end-of-session — capture residual lessons not captured in-flight.
context-recorder-system
Context Recorder System (记录员系统) - 模块化索引文件.
rules
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
misc-documenting-learnings-and-clarifying-assumptions
Documenting Learnings and Clarifying Assumptions for Efficient Task Execution.