firefox-control

A tool for controlling a running Firefox browser through WebDriver BiDi, a browser automation connection standard.

In plain words
What is it for?
Use it for testing and inspecting Firefox pages, listing browser targets, opening URLs, evaluating page scripts, and capturing screenshots.
Why use it?
It lets an agent inspect tabs, run JavaScript, take screenshots, and work with page content without manually using the browser, but Firefox exposes automation to websites.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/vre/flow-state/firefox-control
Any agent
npx skills add vre/flow-state --skill firefox-control
Clone the repo
git clone --depth 1 https://github.com/vre/flow-state

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.00629
Opus 5 $0.00018 $0.00315
Sonnet 5 $0.00007 $0.00126
Haiku 4.5 $0.00004 $0.00063

Measured 2d ago against content hash f9e49487ca3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

firefox-control 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 2d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (firefoxctl_daemon.py, firefoxctl.py, injection_defense.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

firefox-control/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Firefox Control

Control Firefox via WebDriver BiDi. Connects to Firefox launched with --remote-debugging-port. No geckodriver needed — direct BiDi WebSocket.

TEST TOOL: Firefox sets navigator.webdriver=true on any remote debugging session. Every anti-bot system detects this. Mozilla has no extension-based automation API and no runtime toggle. For production agent workflows, use Chrome CDP tooling instead.

Prerequisites

User must launch Firefox with: firefox --remote-debugging-port 9223

The daemon starts automatically on first command. No explicit start needed.

The daemon holds the BiDi WebSocket open so each CLI call is instant — no connection overhead. Each command is a one-shot call; the caller does not hold any connection. The daemon idles out after 5 min of no commands. Unix socket: /tmp/firefoxctl-{uid}.sock.

Tool responses are sanitized: prompt-injection markers in page content are stripped before reaching the LLM.

Commands

firefoxctl.py list
firefoxctl.py open https://example.com
firefoxctl.py status
firefoxctl.py targets
firefoxctl.py stop

Use --json for machine-parseable JSON output (default is human-readable).

Target commands

All target commands: firefoxctl.py CONTEXT COMMAND [ARGS]

Context ID from list output (full UUID required — no prefix match).

firefoxctl.py CONTEXT eval "document.title"
firefoxctl.py CONTEXT screenshot -o page.png
firefoxctl.py CONTEXT console-tail --for 30
firefoxctl.py CONTEXT navigate https://example.com

DOM helpers

Shorthands for common eval patterns. Selectors are CSS.

  click/check/uncheck/highlight SELECTOR
  submit/clear FORM
  type/fill SELECTOR TEXT
  select SELECTOR VALUE
  get-text/get-html/get-value/exists/count/get-texts SELECTOR
  get-attr SELECTOR ATTR
  scroll-to/wait-for/wait-hidden SELECTOR
  wait-text SELECTOR TEXT
  navigate URL
  wait-url PATTERN
  scroll-up/scroll-down [PIXELS]
  scroll-by X Y
  inject-css CSS
  reload/back/forward/get-title/get-url/scroll-top/scroll-bottom

Read the full file on GitHub · 84 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 84 lines · 37 tokens per session scan A f9e49487ca3f

Subscribe to this mod's changes

firefox-control is a skill published in the GitHub repository vre/flow-state (12 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 629 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-30.

Related

Other skills, from other repositories

click-to-fix

Click any element in the browser to trace it back to its source code component. The user visually clicks an element in their browser, and the CLI returns metadata (component name, source file, line number) that you use to locate and open the code. Trigger phrases: "click to fix", "inspect element", "find component"…

johnkozaris/web-interact-plugin · 117 tokens

mode

Show or switch the web-interact browser engine between default (Playwright) and assistant (Patchright). Use when the user asks to change browser mode, enable stealth/assistant mode, or check which engine is active.

johnkozaris/web-interact-plugin · 46 tokens

browser-mode

Show or switch how web-interact connects to the browser: auto (CLI decides), real (user's running Chrome/Edge), or sandbox (managed browser with persistent profile).

johnkozaris/web-interact-plugin · 38 tokens

browser-use

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.

kyopark2014/agent-plugins · 47 tokens

web-interact

Browser automation CLI for navigating websites, filling forms, clicking buttons, extracting data, taking screenshots, and automating any web workflow. Use when users ask to interact with a website, test a web app, fill a form, scrape data, take screenshots, log into a service, automate a browser task, or inspect a web…

johnkozaris/web-interact-plugin · 144 tokens

anysearch

Real-time search engine supporting web search, vertical domain search, parallel batch search, and URL content extraction.

anysearch-ai/anysearch-skill · 24 tokens