Skip to content
Agentmart
Submit a tool

firefox-browser

Firefox browser automation for AI agents using Playwright.

Skill by kwannoel

IndexedMIT★ 13
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kwannoel-firefox-browser

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Firefox browser automation for AI agents using Playwright. Use when the user needs Firefox-specific browser automation, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or any task requiring Firefox. Triggers include requests to "use Firefox", "open in Firefox", "test in Firefox", "automate Firefox", or any browser task where Firefox is specified or preferred.

Use cases: testing, data, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/firefox-browser

Tools it pre-approves 5

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(npx
  • playwright:*),
  • Bash(node
  • -e:*),
  • <<:*)

What's inside

Skill name
firefox-browser
Description
Firefox browser automation for AI agents using Playwright. Use when the user needs Firefox-specific browser automation, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or any task requiring Firefox. Triggers include requests to "use Firefox", "open in Firefox", "test in Firefox", "automate Firefox", or any browser task where Firefox is specified or preferred.
License
MIT
Allowed tools
Bash(npx, playwright:*),, Bash(node, -e:*),, Bash(node, <<:*)
Instructions
615 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Agent Skills spec issues

  • body: 615 lines (spec recommends under 500)

Files (4)

  • SKILL.md
  • authenticated-session.sh · templates/
  • capture-workflow.sh · templates/
  • form-automation.sh · templates/

SKILL.md (first lines)

# Firefox Browser Automation with Playwright

**Always use the user's real Firefox profile** instead of launching a fresh automated instance. Fresh automated browsers get flagged by bot detection (Google login bans, CAPTCHAs, account locks). Using the real profile inherits cookies, extensions, and fingerprint.

Uses Playwright's Firefox engine. Install with `npx playwright install firefox`.

## Setup: Find Your Firefox Profile

```bash
# macOS
ls ~/Library/Application\ Support/Firefox/Profiles/
# Look for: xxxxxxxx.default-release

# Linux
ls ~/.mozilla/firefox/
```

Set the `FIREFOX_PROFILE` env var for convenience:

```bash
# macOS
export FIREFOX_PROFILE="$HOME/Library/Application Support/Firefox/Profiles/YOUR_PROFILE.default-release"

# Linux
export FIREFOX_PROFILE="$HOME/.mozilla/firefox/YOUR_PROFILE.default-release"
```

## Core Pattern — Use Real Profile

Copy the user's profile to a temp directory (avoids lock conflicts with running Firefox) and launch with it:

```bash
node <<'SCRIPT'
const { firefox } = require('playwright');
const { execSync } = require('child_process');
const os = require('os');
const path = require('path');

(async () => {
  const sourceProfile = process.env.FIREFOX_PROFILE;
  const tempProfile = path.join(os.tmpdir(), 'firefox-automation-profile');

  // Copy profile (preserves cookies, extensions, history)
  execSync(`rm -rf "${tempProfile}" && cp -R "${sourceProfile}" "${tempProfile}"`);
  // Remove lock files and compatibility markers (Playwright's Firefox is a different version)
  execSync(`rm -f "${tempProfile}/lock" "${tempProfile}/.parentlock" "${tempProfile}/parent.lock" "${tempProfile}/compatibility.ini"`);

  const context = await firefox.launchPersistentContext(tempProfile, {
    headless: false,
  });

  const page = context.pages()[0] || await context.newPage();
  await page.goto('https://example.com');
  await page.waitForLoadState('domcontentloaded');

  console.log('Title:', await page.title());
  console.log('URL:', page.url());
  await page.screenshot({ path: '/tmp/firefox-screenshot.png' });

  await context.close();
})();
SCRIPT
```

**Key details:**
- Close or leave Firefox running — the profile copy avoids lock conflicts
- Remove `compatibility.ini` — Playwright's bundled Firefox is a different version than the system Firefox
- Use `domcontentloaded` instead of `networkidle` — heavy SPAs (Gmail, etc.) never reach network idle
- The user may already be logged in to sites via their cookies

## Reusing a Copied Profile

If the temp profile already exists from a previous run, reuse it (skip the copy):

```bash
node <<'SCRIPT'
const { firefox } = require('playwright');
const os = require('os');
const path = require('path');
const fs = require('fs');

(async () => {
  const tempProfile = path.join(os.tmpdir(), 'firefox-automation-profile');

  if (!fs.existsSync(tempProfile)) {
    console.error('No cached profile found. Run the full copy pattern first.');
    process.exit(1);
  }

  // Clean stale locks from previous run
  const { execSync } = require('child_process');
  execSync(`rm -f "${tempProfile}/lock" "${tempProfile}/.parentlock" "${tempProfile}/parent.lock"`);

  const context = await firefox.launchPersistentContext(tempProfile, {
    headless: false,
  });

  const page = context.pages()[0] || await context.newPage();
  await page.goto('https://example.com');
  await page.waitForLoadState('domcontentloaded');

  console.log('Title:', await page.title());
  await context.close();
})();
SCRIPT
```

## CLI Commands (Simple Tasks)

For one-shot tasks that don't need authentication, CLI commands still work:

```bash
# Screenshot
npx playwright screenshot --browser firefox https://example.com screenshot.png
npx playwright screenshot --browser firefox --full-page https://example.com full.png
npx playwright screenshot --browser firefox --wait-for-selector "#content" https://example.com content.png

# PDF
npx playwright pdf --browser firefox https://example.com output.pdf

From kwannoel/the-controller, MIT.

More from kwannoel/the-controller

Signals

Stars
13
Forks
2
Open issues
60
Last commit (this folder)
Mar 24, 2026 (7 months ago)
Last release
Mar 8, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from kwannoel

Cite this page

firefox-browser skill. Agent Mart. https://agentmart.dev/skills/kwannoel-firefox-browser (last updated 2026-10-24)