/camoufox:camoufox-browsefrom camoufox
Controls a fingerprint-resistant Firefox (Camoufox) via CLI for full web browsing: JS rendering, form filling, clicking, screenshots, cookies, and downloads. Use instead of WebSearch/WebFetch.
Ships in camoufox. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Camoufox is a hardened, fingerprint-resistant Firefox fork driven by the
camoufox CLI. Use it instead of WebSearch / WebFetch for all web
browsing: it runs a real browser, so it renders JavaScript, keeps cookies,
and can fill forms and click things.
The CLI talks to a long-running daemon (camoufox serve) over a Unix
socket. The daemon owns browser instances (one headless Firefox process
each), and each instance owns pages (tabs). Almost every command takes
<instance_id> <page_id>.
Two binaries are involved:
camoufox). On PATH after cargo install --path . --features cli, or target/release/camoufox in the repo. Override with $CAMOUFOX_CLI.pip install camoufox && python -m camoufox fetch). The daemon looks up $CAMOUFOX_BIN, then the active or
newest install under ~/.cache/camoufox/browsers/, then
~/.cache/camoufox/camoufox. The cache root respects an absolute
$XDG_CACHE_HOME. Set CAMOUFOX_BIN and pass launch --executable for
a custom install or an older daemon:# CLI: prefer $CAMOUFOX_CLI, then `camoufox` on PATH, then a local release build.
BROWSE="${CAMOUFOX_CLI:-camoufox}"
command -v "$BROWSE" >/dev/null 2>&1 || BROWSE="./target/release/camoufox"
[ -x "$BROWSE" ] || command -v "$BROWSE" >/dev/null 2>&1 \
|| cargo build --release --bin camoufox --features cli # from the repo root
# Optional custom browser: CAMOUFOX_BIN=/absolute/path/to/camoufox
# Otherwise the current daemon finds the active/newest fetched install.
Use --release, not a debug build: this tool is meant to be reused across
sessions, not rebuilt each time.
Each Bash tool call starts a fresh shell, so BROWSE, CAMOUFOX_BIN, I and
P do not carry over. Re-run the setup lines in each call, or paste the
literal instance/page ids you got back.
/browse <url># (setup lines from above)
# 1. Ensure the daemon is running. If ping still fails, read the log.
$BROWSE ping >/dev/null 2>&1 || { ($BROWSE serve >/tmp/camoufox-daemon.log 2>&1 &); sleep 1; }
$BROWSE ping >/dev/null 2>&1 || cat /tmp/camoufox-daemon.log
# 2. Reuse an existing browser instance, or launch one. Passing --executable
# works whether or not the daemon was started with $CAMOUFOX_BIN set.
I=$($BROWSE list --json | jq -r '.data.instances[0].instance_id // empty')
[ -n "$I" ] || I=$($BROWSE launch ${CAMOUFOX_BIN:+--executable "$CAMOUFOX_BIN"} --json | jq -r '.data.instance_id')
# 3. Create a page
P=$($BROWSE new-page "$I" --json | jq -r '.data.page_id')
# 4. Navigate, waiting for the load event, and check the HTTP status
$BROWSE navigate "$I" "$P" '<url>' --wait-until load --timeout 20 --json
# 5. Read the page: clean text, plus structured metadata
$BROWSE text "$I" "$P"
$BROWSE data "$I" "$P" --og
# 6. (Optional) screenshot the whole viewport or just one element
$BROWSE screenshot "$I" "$P" --selector 'article' -o /tmp/shot.png
launch --json failing with failed to spawn browser ... No such file or directory means the browser binary was not found: set CAMOUFOX_BIN as in
Setup and pass --executable.
<inst> <page> first, except: serve, ping,
list, shutdown (daemon-scoped, no ids) and launch; new-page, stop,
tabs, cookies, downloads (instance only). record and replay take
start|stop before <inst> <page>.$BROWSE text … | head -40 works. Add --json to a
built-in client command for {"ok":true,"data":…} /
{"ok":false,"error":…,"kind":"timeout"}. Success omits kind and may omit
data. Branch on kind (e.g. selector_not_found, dialog_open, io),
treating unknown values as other; the client backfills missing kinds from
older daemon messages and preserves daemon-provided values.0 success, 1 execution or daemon failure, 2 client-side
argument validation (kind: invalid_argument) or clap parsing errors. Local
path-resolution failures exit 1 with kind io; daemon-side invalid arguments
also exit 1. Plain errors print error: … on stderr. Clap diagnostics remain
text even with --json; external subcommands control their own output/status.--timeout <secs> (default 30);
wait defaults to 10.--json and --socket <path> work on built-in commands.
--socket overrides CAMOUFOX_SOCKET; otherwise the default socket is
$XDG_RUNTIME_DIR/camoufox/daemon.sock, else
/tmp/camoufox-<uid>/daemon.sock.| Command | Description |
|---|---|
ping | Check whether the daemon is up (pong (N instances)); exits 1 if not |
serve & | Start the daemon (foreground process; background it and redirect its output) |
launch [--executable PATH] [--headed] [--dialogs manual|accept|dismiss] [--downloads-dir ABS] [--bypass-csp] | Launch a browser (headless unless --headed); prints instance_id |
launch --profile-dir ABS | Keep cookies, localStorage, IndexedDB, and other profile data across launches; list includes the canonical profile path |
list | List running instances with their page ids |
new-page <inst> | Create a page, prints page_id |
tabs <inst> | List open pages as page_id url title: includes popups the site opened |
close-tab <inst> <page> | Close one page |
stop <inst> | Stop one browser instance |
shutdown | Stop the daemon and every instance |
--profile-dir requires an absolute empty directory or an existing profile with
prefs.js or times.json. Missing directories are created with mode 0700;
group/other access is removed from existing profiles. The daemon reserves the
canonical path until browser exit, so concurrent launches through aliases fail
within one daemon process. Do not point two daemons at the same profile directory:
Firefox does not support concurrent use and it can corrupt the profile.
Stop/shutdown flush storage and keep the directory. Without it, each launch uses
a fresh temporary profile and private context.
| Command | Description |
|---|---|
text <inst> <page> [--selector <css>] [--frame <css>]… | Rendered page text (innerText), or just that element. Empty output means the element renders nothing: try a more specific selector, or html |
html <inst> <page> [--selector <css>] [--frame <css>]… | outerHTML of the selector, or the whole document |
links <inst> <page> [--selector <css>] [--frame <css>]… | Every <a href> as text → href (absolute URLs) |
data <inst> <page> [--og] [--jsonld] [--meta] | Structured metadata as JSON. No flags = all three groups |
url <inst> <page> | Current URL (stdout) and title (stderr) |
evaluate <inst> <page> '<js>' [--frame <css>]… | Run JavaScript in an isolated world and print the result. Sees the DOM but not page-defined globals (window.appState is null) |
evaluate --main-world <inst> <page> '<js>' | Run in the page's own world to read app globals. Sync expressions only (a Promise comes back as {}), detectable by the page, blocked by strict CSP |
data groups: --og covers og: / twitter: / article: / fb: / al:
properties, --jsonld parses every application/ld+json block into real JSON,
--meta collects named <meta> tags. Every response also carries title and
url for context.
If --main-world fails with main-world script was blocked (likely the page's Content-Security-Policy), relaunch the instance with launch --bypass-csp
(also detectable by the page).
| Command | Description |
|---|---|
navigate <inst> <page> <url> [--wait-until load|domcontentloaded] [--timeout N] | Navigate; returns navigation_id + HTTP status_code. Without --wait-until it returns as soon as navigation starts |
wait <inst> <page> --selector <css> [--timeout N] [--frame <css>]… | Poll until the element exists (default 10 s); prints found <sel> after <N>ms |
reload <inst> <page> | Reload the page |
back / forward <inst> <page> | Exist, but see Known limitations |
ok with
status_code: 404; check the status yourself. status_code can be null.--wait-until load, a
connection failure blocks for the full --timeout and then reports timed out waiting for lifecycle event "load", even though the browser already shows
"Problem loading page". Pass a modest --timeout and check url (the title
reveals the error page).text --selector '#x' fails at once with
selector not found: #x if the element has not rendered yet. Use wait first.| Command | Description |
|---|---|
click <inst> <page> <css> [--frame <css>]… | Scroll the element into view and click its centre |
click <inst> <page> <x> <y> | Click raw viewport coordinates (trusted event; --frame ignored) |
fill <inst> <page> <css> <value> [--frame <css>]… | Focus the field, clear it, type the value |
upload <inst> <page> <css> <path>… [--frame <css>]… [--timeout N] | Replace a file input's selection with regular files, including hidden inputs; relative paths use the client's working directory |
type <inst> <page> <text> [--frame <css>]… | Type into whatever currently has focus |
press <inst> <page> <key> [--frame <css>]… | Press a key (see key names below) |
hover <inst> <page> <css> [--frame <css>]… | Move the mouse over an element, no click |
select <inst> <page> <css> <value> [--frame <css>]… | Choose a <select> option by value, label, or visible text |
scroll <inst> <page> [css] | Scroll an element into view, or to the page bottom |
Upload validates paths before page access, dispatches input and change, and
supports open shadow roots with >>>. Multiple files require multiple;
directory-picker (webkitdirectory) inputs are rejected with kind
invalid_argument. Plain output lists basenames; JSON returns uploaded,
selector, and files, plus dialog if a handler opens one.
Key names for press: Enter (or Return), Tab, Escape, Backspace,
Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End,
PageUp, PageDown, Space, or any single character (a, 7, /).
All clicks and key presses are trusted browser-level input events
(isTrusted === true), so they drive widgets that reject synthetic JS events.
Most interactions print JSON payloads in plain mode; upload prints basenames.
With --json, success data may carry a "dialog" key (the action opened a JS
dialog) or a "downloads" key (it started a download).
Plain text / links / selectors only see the top document. To reach inside:
--frame <css> scopes a command to the iframe matching the selector.
Repeat it for nested frames: --frame '#outer' --frame '#inner'. Supported by
text, html, links, click, fill, upload, type, press, hover, select,
wait, evaluate. It is unsupported by scroll, screenshot, data, url.
type/press with --frame type into whatever is already focused inside
that frame, so click or fill the field first.>>> pierces open shadow roots in any selector: 'my-app >>> button.submit',
chains like 'a >>> b >>> c' work. Closed shadow roots cannot be pierced.$BROWSE text "$I" "$P" --frame 'iframe#checkout' --selector '.total'
$BROWSE fill "$I" "$P" '#card' '4242…' --frame 'iframe#checkout'
$BROWSE click "$I" "$P" 'cookie-banner >>> button.accept'
The default dialog policy is manual. When a click or key press opens a
dialog, the command succeeds and returns a "dialog" object. Upload may also
return one. Most later page commands fail with kind dialog_open and an
actionable message:
page p1 has an open alert dialog indicates that the dialog needs a response.
tabs, close-tab, screenshot --clip, record stop, and replay stop bypass
dialog checks; tabs --json includes pending dialog details.
Resolve it with dialog <inst> <page> accept|dismiss [--text T] (--text is
the reply to a prompt). To skip this entirely, launch with
--dialogs accept or --dialogs dismiss.
Downloads are cancelled unless the instance was launched with
--downloads-dir <absolute path>. Then:
| Command | Description |
|---|---|
downloads <inst> [--wait SECS] | List downloads as <state> <page> <url> -> <path>. --wait blocks until the next download event; re-run until completed |
Files are saved under a UUID name (the site's filename is suggested_filename
in --json). Navigating straight to a file URL also downloads it and leaves
the page on its previous document.
| Command | Description |
|---|---|
cookies <inst> | Export the cookie jar, HttpOnly included. Plain mode prints name=value; use --json for domain/path/flags |
cookie <inst> <page> <name>=<value> [--url U | --domain D] [--path P] [--secure] [--http-only] | Set one cookie. Without --url/--domain it binds to the page's current URL |
header <inst> <page> '<Name>: <value>' | Add an extra request header. Headers accumulate per page; an empty value clears one |
| Command | Description |
|---|---|
screenshot <inst> <page> [-o PATH] | Current viewport |
screenshot <inst> <page> --selector <css> | Crop to one element (scrolled into view first) |
screenshot <inst> <page> --clip x,y,w,h | Crop to a region, in page coordinates |
... --format jpeg --quality 80 | JPEG instead of PNG |
Without -o, the file goes to the daemon's private runtime directory
($XDG_RUNTIME_DIR/camoufox/ or /tmp/camoufox-<uid>/) as
screenshot-<inst>-<page>.png; the command prints the path. A relative -o
resolves against your current directory.
| Command | Description |
|---|---|
record start <inst> <page> --dir ABS [--url REGEX]… / record stop <inst> <page> | Passively capture HTTP(S) traffic; repeat --url to include URLs matching any regex, then stop to publish index.json and decoded bodies/<sha256> |
replay start <inst> <page> --dir ABS [--match-body] / replay stop <inst> <page> | Serve recorded responses offline by method and exact URL, optionally matching request-body hashes; abort misses and report served, missed, and missed_total at stop |
Record before navigating. Recording requires an absent or empty absolute
directory; existing directories must be owner-only. New directories use mode
0700 and files 0600. Stop reports exchanges, bodies, and skipped; unreadable
or evicted bodies are skipped, while write errors prevent index publication.
Body buffers are limited to 10 MB per response and 100 MB total.
One recording or replay runs per page, including subframes; popups need their
own sessions. Replay cannot replace service-worker responses and rejects redirect
cassettes. Repeated requests consume responses in order, then reuse the last.
Keep cassette files unchanged until replay stops. Replay disables page caching
while active; stop drains accepted requests before restoring normal networking
and caching. Explicit stop commands allow 300 seconds to drain and work with open
dialogs. Repeating stop returns the last result with repeated: true.
close-tab, instance stop, popup closure, and shutdown finalize active cassettes.
Tab cleanup has a 15-second budget after acquiring its network-operation lock;
instance stop/shutdown share 15 seconds across pages. close-tab and stop report
finalization failures as cassette_errors entries in success data and warn on
stderr, still exiting 0. Popup cleanup and shutdown log failures.
Cassettes scrub credential response headers and omit request headers and raw request bodies. URLs and decoded response bodies remain verbatim and can contain secrets. Use trusted cassettes: replayed HTML and scripts use the origin's real storage.
camoufox <name> <args>… runs camoufox-<name> from absolute PATH entries
when the name is not built-in. Arguments, environment, standard streams, and exit
status pass through. Put global flags before the name, for example
camoufox --json --socket /tmp/custom.sock custom-tool --flag value.
The executable receives the absolute socket path in CAMOUFOX_SOCKET and
CAMOUFOX_JSON=1 with global --json; otherwise CAMOUFOX_JSON is cleared.
Built-ins take precedence; a missing executable uses clap's error and exit code 2.
# (setup lines from above)
I=$($BROWSE launch ${CAMOUFOX_BIN:+--executable "$CAMOUFOX_BIN"} --json | jq -r .data.instance_id)
P=$($BROWSE new-page "$I" --json | jq -r .data.page_id)
$BROWSE navigate "$I" "$P" 'https://example.com' --wait-until load --json
$BROWSE text "$I" "$P" # → Example Domain / This domain is for use in …
$BROWSE links "$I" "$P" # → Learn more → https://iana.org/domains/example
$BROWSE data "$I" "$P" --og # → {"og": {...}, "title": ..., "url": ...}
$BROWSE click "$I" "$P" 'a' # follow the first link
$BROWSE url "$I" "$P" # → https://www.iana.org/help/example-domains
# Search-style flow
$BROWSE navigate "$I" "$P" 'https://duckduckgo.com/' --wait-until load
$BROWSE fill "$I" "$P" 'input[name=q]' 'camoufox'
$BROWSE press "$I" "$P" Enter # submits the form
$BROWSE wait "$I" "$P" --selector 'article' --timeout 20
$BROWSE text "$I" "$P" --selector 'article'
$BROWSE stop "$I"
text / html / links / data over hand-written evaluate JS.
text, html, and links handle selector escaping, iframes, and shadow DOM;
data extracts whole-page metadata. Reach for evaluate when these do not fit.navigate --wait-until load then
wait --selector is far more reliable than a fixed delay on JS-heavy sites.data --og is the fastest way to summarise a page: many sites put a
full summary in og:description and the lead image in og:image.fill value are safe.dialog … accept|dismiss.tabs and switch to the new page_id.list before launching; each launch is a fresh
browser process. Instance ids restart from 00000001 when the daemon restarts.https://duckduckgo.com/?q=<url_encoded>
(Google often serves consent or captcha pages to automated browsers).shutdown, then serve).
Older daemons can silently ignore --frame. For --profile-dir, the client
detects missing support, stops the returned instance, and reports kind daemon
with restart instructions. Failed cleanup includes the instance ID to stop
manually.back / forward do not work. The commands exist, but this Camoufox
build exposes no session history to pages created over the Juggler protocol,
so they print no back history entry and still exit 0. Re-navigate to
the previous URL instead.--wait-until supports only load and domcontentloaded. There is no
networkidle primitive in the Juggler protocol.about:blank. cookie needs
--url or --domain in that case.wait blocks
other commands on that instance. Download waits and cassette validation, disk
I/O, and draining run outside the instance lock. Use a second instance when
commands need to run independently.evaluate --main-world and launch --bypass-csp
can both be noticed by the page; avoid them on sites with bot detection.camoufox CLI (on PATH, or $CAMOUFOX_CLI, or
./target/release/camoufox) and point it at the browser with
$CAMOUFOX_BIN / launch --executable.list before launching.--json whenever you need to parse the output with jq.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub 9prodhi/camoufox-rs --plugin camoufoxOther plugins' skills for the same job