camofox-browser: Cursor rule for Windsurf

.windsurfrules

windsurfrules is a cursor rule for Windsurf from redf0x1/camofox-browser. It costs 975 tokens per session, scanned A, original, MIT.

A compact rule sheet for CamoFox, a tool that controls browser tabs through commands. It recommends taking a page snapshot, using stable element references, and passing the user and tab identifiers on each action.

In plain words
What is it for?
Use it when opening pages, clicking, typing, scrolling, taking screenshots, reading text, or evaluating page code through CamoFox. It is intended for repeatable browser automation workflows.
Why use it?
Browser pages can change after navigation or interaction, making old element references unreliable. The rules reduce that risk and make command output easier for an automated agent to parse.

Cursor rule for Windsurf

Written for Windsurf: a Windsurf rule. Also seen: mentions AGENTS.md.

This is redf0x1/camofox-browser's own configuration. It tells Windsurf how to work on camofox-browser itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything camofox-browser configures →

Reuse

Borrowing it

Nothing to install: this file belongs to redf0x1/camofox-browser. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/redf0x1/camofox-browser/main/.windsurfrules
Clone the repo
git clone --depth 1 https://github.com/redf0x1/camofox-browser

Made for: Windsurf.

Wrote 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.

agentmods badge for windsurfrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/redf0x1/camofox-browser/windsurfrules/github.svg)](https://agentmods.dev/rules/redf0x1/camofox-browser/windsurfrules)
Your own site
<a href="https://agentmods.dev/rules/redf0x1/camofox-browser/windsurfrules"><img src="https://agentmods.dev/badge/rules/redf0x1/camofox-browser/windsurfrules/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.

agentmods 80×15 button for windsurfrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/redf0x1/camofox-browser/windsurfrules"><img src="https://agentmods.dev/badge/rules/redf0x1/camofox-browser/windsurfrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 975 This file is loaded in full into every session.
When invoked 975 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00975 $0.00975
Opus 5.5 $0.00390 $0.00390
Sonnet 5.5 $0.00195 $0.00195
Haiku 4.5 $0.00097 $0.00097

Measured 1mo ago against content hash 39e7778558f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

windsurfrules 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.

.windsurfrules · 68 lines

What it actually says

CamoFox cheat sheet (ultra-compact). Canonical details: AGENTS.md.

WORKFLOW (snapshot-first)

  1. open/create tab -> 2) snapshot -> 3) pick refs (eN) -> 4) click/type/fill/press -> 5) snapshot again after DOM/nav changes. Always pass user scope (--user / userId) and stable tabId. Prefer refs over CSS selectors. Use --format json for parsing/agents.

TOP COMMANDS camofox open [--user u] [--viewport WxH] [--geo preset] camofox close [tabId] [--user u] camofox navigate [tabId] [--user u] camofox snapshot [tabId] [--user u] camofox screenshot [tabId] [--output f] [--full-page] camofox annotate [tabId] [--output f] camofox click [tabId] [--user u] camofox type [tabId] [--user u] camofox fill '[e1]="v1" [e2]="v2"' [tabId] [--user u] camofox scroll [up|down|left|right] [tabId] [--amount n] camofox select [tabId] [--user u] camofox hover [tabId] [--user u] camofox press [tabId] [--user u] camofox drag [tabId] [--user u] camofox get-url [tabId] [--user u] camofox get-text [tabId] [--selector css] [--user u] camofox get-links [tabId] [--user u] camofox get-tabs [--user u] camofox eval "document.title" [tabId] [--user u] camofox wait [tabId] [--timeout ms] [--user u] camofox search "q" [tabId] --engine google|youtube|amazon|bing|reddit|duckduckgo|github|stackoverflow camofox session save [tabId] camofox session load [tabId] camofox session list camofox session delete [--force] camofox cookie export [tabId] --path cookies.json camofox cookie import cookies.json [tabId] camofox auth save camofox auth load --inject --username-ref eX --password-ref eY camofox auth list | auth delete | auth change-password camofox server start [--background] [--port p] camofox server stop camofox server status camofox health | version | info camofox run flow.txt [--continue-on-error]

API QUICK REF Base URL: http://localhost:9377 Create/list tab: POST /tabs ; GET /tabs?userId=u Core loop: POST /tabs/:tabId/navigate -> GET /tabs/:tabId/snapshot?userId=u -> POST /tabs/:tabId/click|type|press Inspection/control: GET /tabs/:tabId/links|stats|screenshot ; POST /tabs/:tabId/evaluate|evaluate-extended|wait|back|forward|refresh Session/downloads: DELETE /tabs/:tabId ; DELETE /sessions/:userId ; GET /users/:userId/downloads ; GET/DELETE /downloads/:downloadId

ESSENTIAL RULES

  • Snapshot before interaction; refresh refs after navigation/major DOM change.
  • Include user scope for all tab-bound operations.
  • Use refs (eN) first, selector fallback second.
  • Keep outputs machine-safe: prefer --format json.
  • Never print secrets; use auth vault + --inject.
  • Reuse existing routes/commands and preserve compatibility aliases.

SEARCH MACROS @google_search,@youtube_search,@amazon_search,@reddit_search,@reddit_subreddit,@wikipedia_search,@twitter_search,@yelp_search,@spotify_search,@netflix_search,@linkedin_search,@instagram_search,@tiktok_search,@twitch_search

STACK + AUTH Node 20+, TypeScript strict, Express, Commander.js, Jest, Camoufox engine; API key optional (CAMOFOX_API_KEY), auth vault uses encrypted local storage.

See AGENTS.md for full command, endpoint, and workflow specification.

Changes

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.

  1. 1mo ago First seen · 68 lines · 975 tokens per session scan A 39e7778558f3

Subscribe to this mod's changes

windsurfrules is a cursor rule published in the GitHub repository redf0x1/camofox-browser (428 stars, last pushed 1mo ago), licensed MIT. It adds 975 tokens to every session, about $0.0039 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-09-23.