camofox-browser
Copilot instructions438 starsChanged 8 months agoMITView on GitHub
Always prefer ref-driven interaction over brittle selectors. Protected endpoints require Authorization: Bearer $CAMOFOX_API_KEY only when CAMOFOX_API_KEY is set; POST /stop always requires x-admin-key via CAMOFOX_ADMIN_KEY. Most core success responses are structured as JSON, commonly including ok: true on action-style endpoints.
- Reads credentials
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,343 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
- .cursor/rules/001-camofox-core.mdcCursor rule
- .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 copilot-instructions.md into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Create/open a tab (open or POST /tabs)
- Distinctive: line 14
Always prefer ref-driven interaction over brittle selectors.
- Very specific: line 59
Use snapshot-first: never guess refs.
- Very specific: line 62
Prefer --format json for agent parsing and automation pipelines.
- Very specific: line 63
Keep secrets out of output.
- Distinctive: line 64
Use existing endpoints/commands before adding new ones.
- Very specific: line 70
Create tab: POST /tabs with { userId, sessionKey|listItemId, url?
- Distinctive: line 92
Use AGENTS.md as the canonical, full project guide (commands, workflows, endpoint semantics, anti-patterns, and conventions).
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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
CamoFox Browser — GitHub Copilot Instructions
What CamoFox Is
CamoFox Browser is an anti-detection browser automation server for AI agents. It wraps Camoufox (a Firefox fork with engine-level fingerprint spoofing) behind a TypeScript Express REST API and a camofox CLI. It is designed for agent workflows where deterministic element interaction, persistent user profiles, and structured output matter more than raw browser scripting.
Core Workflow (Snapshot-First)
- Create/open a tab (
openorPOST /tabs) - Capture snapshot (
snapshotorGET /tabs/:tabId/snapshot) - Choose refs from snapshot (
e1,e2, ...) - Interact (
click,type,fill,press,scroll, etc.) - Re-snapshot after major DOM changes/navigation
- Repeat until done, then close tab/session
Always prefer ref-driven interaction over brittle selectors.
Most-Used CLI Commands
# Lifecycle / navigation
camofox open <url> [--user <id>] [--viewport 1280x720] [--geo <preset>]
camofox navigate <url> [tabId] [--user <id>]
camofox go-back [tabId] [--user <id>]
camofox go-forward [tabId] [--user <id>]
camofox close [tabId] [--user <id>]
# Snapshot + inspection
camofox snapshot [tabId] [--user <id>]
camofox screenshot [tabId] [--output file] [--full-page]
camofox annotate [tabId] [--output file]
camofox get-url [tabId] [--user <id>]
camofox get-text [tabId] [--selector <css>] [--user <id>]
camofox get-links [tabId] [--user <id>]
camofox get-tabs [--user <id>]
# Interaction
camofox click <ref> [tabId] [--user <id>]
camofox type <ref> <text> [tabId] [--user <id>]
camofox fill '[e1]="user" [e2]="pass"' [tabId] [--user <id>]
camofox press <key> [tabId] [--user <id>]
camofox scroll [down|up|left|right] [tabId] [--amount 500]
camofox select <ref> <value> [tabId]
camofox hover <ref> [tabId]
camofox drag <fromRef> <toRef> [tabId]
# Utility
camofox wait <condition> [tabId] [--timeout 10000]
camofox eval "document.title" [tabId]
camofox search "query" [tabId] --engine google
camofox run <script-file> [--continue-on-error]
# Session / auth / server
camofox session save <name> [tabId]
camofox session load <name> [tabId]
camofox auth save <profile>
camofox auth load <profile> --inject --username-ref eX --password-ref eY
camofox server statusEssential Rules
- Use snapshot-first: never guess refs; always call
snapshotbefore interacting. - Scope every action by
userId/--user; tab lookup is user-scoped. - Favor refs over selectors; selectors are fallback only.
- Prefer
--format jsonfor agent parsing and automation pipelines. - Keep secrets out of output; use auth vault +
auth load --inject. - Use existing endpoints/commands before adding new ones; preserve backward-compatible aliases.
API Basics
- Base URL:
http://localhost:9377 - API Documentation:
GET /api/docs(Swagger UI),GET /openapi.json(OpenAPI 3.1.0 spec for a representative subset of routes) - Health:
GET /health - Create tab:
POST /tabswith{ userId, sessionKey|listItemId, url? } - List tabs:
GET /tabs?userId=... - Navigate:
POST /tabs/:tabId/navigate - Snapshot:
GET /tabs/:tabId/snapshot?userId=... - Click/type:
POST /tabs/:tabId/click,POST /tabs/:tabId/type - Evaluate JS:
POST /tabs/:tabId/evaluate,POST /tabs/:tabId/evaluate-extended - Close tab/session:
DELETE /tabs/:tabId,DELETE /sessions/:userId - Cookie import/export:
POST /sessions/:userId/cookies,GET /tabs/:tabId/cookies
Protected endpoints require Authorization: Bearer $CAMOFOX_API_KEY only when CAMOFOX_API_KEY is set; POST /stop always requires x-admin-key via CAMOFOX_ADMIN_KEY.
Most core success responses are structured as JSON, commonly including ok: true on action-style endpoints.
Stack
- Runtime: Node.js 22+
- Language: TypeScript (strict)
- Server: Express
- CLI: Commander.js
- Testing: Jest
- Browser engine: Camoufox (Firefox-based anti-detection)
Source of Truth
Use AGENTS.md as the canonical, full project guide (commands, workflows, endpoint semantics, anti-patterns, and conventions). This file is an optimized Copilot summary, not the complete spec.
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.

