camofox-browser / rules
Cursor rule438 starsChanged 8 months agoMITView on GitHub
Core camofox-browser concepts — element refs, snapshot-first workflow, server basics
- Reads credentials
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,181 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/010-cli-commands.mdcCursor rule
- .cursor/rules/020-api-endpoints.mdcCursor rule
- .cursor/rules/030-workflows.mdcCursor rule
- .cursor/rules/040-anti-patterns.mdcCursor rule
- .cursor/rules/050-cli-dev.mdcCursor rule
- .cursor/rules/060-routes-dev.mdcCursor rule
- .cursor/rules/070-search-macros-presets.mdcCursor rule
- camofox-browserSkill
- camofox-cliSkill
- dogfoodSkill
- gemini-imageSkill
- redditSkill
The file
We split this 001-camofox-core.mdc into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Never assume old refs remain valid after:
- Distinctive: line 28
Treat refs as ephemeral state, not permanent IDs.
- Very specific: line 31
Always keep userId consistent through a flow.
- Very specific: line 41
If CAMOFOX_API_KEY is configured, provide Bearer auth for protected routes.
- Very specific: line 43
Use --format json for machine parsing.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: "Core camofox-browser concepts — element refs, snapshot-first workflow, server basics" alwaysApply: true --- # CamoFox Core Rules ## What CamoFox Is - CamoFox Browser is an anti-detection browser automation server built on Camoufox. - Primary interface is REST API on port `9377` with CLI wrapper `camofox`. - OpenClaw-compatible routes are available (`/tabs/open`, `/navigate`, `/snapshot`, `/act`). ## Snapshot-First Workflow (Required) 1. Open/create a tab. 2. Capture snapshot to get current `eN` refs. 3. Interact using refs when possible. 4. Re-snapshot after navigation or major UI updates. Never assume old refs remain valid after: - navigation - modal transitions - SPA rerenders - display mode toggles ## Element Refs (`eN`) Rules - Refs are produced by snapshot endpoints and are user/tab scoped. - Refs are preferred over selectors for robust automation. - Treat refs as ephemeral state, not permanent IDs. ## User/Session Rules - Always keep `userId` consistent through a flow. - `sessionKey` (or legacy `listItemId`) groups tabs by task. - `DELETE /sessions/:userId` is the full cleanup operation. ## Server Basics - Health check: `GET /health`. - Presets list: `GET /presets`. - Context display toggle: `POST /sessions/:userId/toggle-display`. ## Critical Safety Rules - If `CAMOFOX_API_KEY` is configured, provide Bearer auth for protected routes. - OpenClaw `POST /stop` always requires `x-admin-key`, and it must match configured admin key value. - Use `--format json` for machine parsing. ## Quick Reference ```bash camofox open https://example.com # create tab camofox snapshot # get refs camofox click e5 # interact by ref camofox type e8 "hello" # type text camofox get-url --format json # structured output ```
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

