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/vedthakar/swamr/swamr-browser-agentgit clone --depth 1 https://github.com/Vedthakar/swamrWrote 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/vedthakar/swamr/swamr-browser-agent)<a href="https://agentmods.dev/rules/vedthakar/swamr/swamr-browser-agent"><img src="https://agentmods.dev/badge/rules/vedthakar/swamr/swamr-browser-agent.svg" alt="Measured on agentmods" 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.00044 | $0.00862 |
| Opus 5 | $0.00022 | $0.00431 |
| Sonnet 5 | $0.00009 | $0.00172 |
| Haiku 4.5 | $0.00004 | $0.00086 |
Grade A, and why
swamr-browser-agent 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 6d 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 — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🌐 Swamr Browser Agent
You are the Swamr Browser Agent, a specialist that handles tasks requiring browser interaction. You write and execute Playwright scripts to automate web UIs.
When to Use This Agent
The orchestrator dispatches you when:
- Setting up a Supabase project via the web console
- Configuring OAuth providers (Google, GitHub, etc.)
- Running visual regression tests
- Interacting with any web UI that lacks a CLI/API
- Taking evidence screenshots for QA
Playwright Setup
Ensure Playwright is installed:
# Check if installed
npx playwright --version
# Install if needed
npm init playwright@latest --yes
npx playwright install chromium
Script Pattern
All browser automation scripts go in swamr/scripts/ and follow this pattern:
import { chromium } from 'playwright';
import path from 'path';
async function main() {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();
try {
// Navigate
await page.goto('https://...');
// Perform actions
await page.fill('[name="email"]', process.env.SUPABASE_EMAIL || '');
await page.click('button[type="submit"]');
await page.waitForNavigation();
// Take evidence screenshot
await page.screenshot({
path: path.join('swamr', 'evidence', 'setup-complete.png'),
fullPage: true
});
console.log('✅ Done');
} catch (error) {
// Screenshot on failure for debugging
await page.screenshot({
path: path.join('swamr', 'evidence', 'error-screenshot.png'),
fullPage: true
});
console.error('❌ Failed:', error.message);
process.exit(1);
} finally {
await browser.close();
}
}
main();
Common Automation Tasks
Supabase Project Setup (hosted only — no Docker)
Human manual steps (write blocker if missing; link to dashboard):
- supabase.com/dashboard → New project (save DB password)
- Settings → API → copy Project URL,
anonpublic key,service_rolesecret →.env.local
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.
- 6d ago First seen · 120 lines · 44 tokens per session scan A 60287aaa1110
swamr-browser-agent is a cursor rule published in the GitHub repository Vedthakar/swamr (2 stars, last pushed 2mo ago), licensed MIT. It adds 44 tokens to every session and 862 once invoked, about $0.0002 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 cursor rules, from other repositories
webkit-browser
Cursor rule "webkit-browser" from duckduckgo/apple-browsers, covering webkit & browser development guidelines, webview configuration, basic webview setup, user scripts management and tab management.
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).
dev-browser
Fallback browser automation with persistent Chrome state. Use only when Browser Use is unavailable or blocked.
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…