browser-macros

browser-macros is a skill for Claude Code, Codex from m4ttstack/fast-browser. It costs 25 tokens per session (1,080 once invoked), scanned A, original, MIT.

A skill for finding and using saved Playwright macros for browser tasks. A macro is a reusable browser procedure.

In plain words
What is it for?
It helps match tasks to existing macros, run approved reusable procedures, handle flow-runner or lost-connection errors, and record site-specific interaction quirks.
Why use it?
It avoids rebuilding a known browser sequence each time and keeps recorded flows, macros, and their separate approval requirements distinct.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the fast-browser plugin — 7 skills, 1 agent, 1 MCP server shipped together

Good fit It helps match tasks to existing macros, run approved reusable procedures, handle flow-runner or lost-connection errors, and record site-specific interaction quirks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/m4ttstack/fast-browser/browser-macros
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.

Any agent
npx skills add m4ttstack/fast-browser --skill browser-macros
Clone the repo
git clone --depth 1 https://github.com/m4ttstack/fast-browser

Made for: Claude Code, Codex.

Or install fast-browser, the plugin that ships this one along with the rest of its 7 skills, 1 agent, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for browser-macros

README.md
[![agentmods](https://agentmods.dev/badge/skills/m4ttstack/fast-browser/browser-macros/github.svg)](https://agentmods.dev/skills/m4ttstack/fast-browser/browser-macros)
Your own site
<a href="https://agentmods.dev/skills/m4ttstack/fast-browser/browser-macros"><img src="https://agentmods.dev/badge/skills/m4ttstack/fast-browser/browser-macros/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for browser-macros

Your own site · 80×15
<a href="https://agentmods.dev/skills/m4ttstack/fast-browser/browser-macros"><img src="https://agentmods.dev/badge/skills/m4ttstack/fast-browser/browser-macros.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.01080
Opus 5.5 $0.00010 $0.00432
Sonnet 5.5 $0.00005 $0.00216
Haiku 4.5 $0.00003 $0.00108

Measured 2mo ago against content hash 9943a43b840c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

browser-macros 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 2mo ago.

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.

skills/browser-macros/SKILL.md · 103 lines

How it starts

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

Browser Macros

Use indexed Playwright macros instead of re-deriving known browser flows.

Flows before macros

Compiled flows are checked before hand-written macros: run fast-browser flows find --intent "<task>" --origin <origin> --json, and if a candidate scores runnable: true, run it instead of reaching for a macro. See fast-browsing's task graph and its ### Runnable candidate? section for the full contract.

fast-browser flows approve <name> is the one consent gate for a mutating or js-step flow. It is separate from, and does not change, the per-macro approval below: a mined macro still requires the user's explicit approval for that individual macro.

The ## flow-runner entry in ~/.fast-browser/macros/MACROS.md documents the replay contract itself: the success shape, the FLOW_RUNNER_FAILURE: error shape, and the distinct SIDECAR_LOST: error shape for a lost browser connection.

Recording a quirk with fast-browser sites quirk add also feeds live interrupt recovery: a flow replay tries that recorded click once per step, only after its full locator walk has missed.

Run a macro

  1. Read ~/.fast-browser/macros/MACROS.md.
  2. Match the task to an entry's description and target.
  3. Call browser_run_code_unsafe with filename set to the entry's Script: path as an absolute path, your home directory written out in full, and the entry's args exactly. The runtime expands nothing: a bare or ~ name resolves against the browser server's own working directory and is refused by its containment check (ENOENT or "outside allowed roots"). Do not open the script and do not substitute inline code.
  4. Return the macro's distilled result.

If the macro fails, use its { failedStep, error, url } result to retry materially. After the same macro fails twice, append:

<macro-name> | <date> | <failedStep or reason>

to ~/.fast-browser/macro-failures.md, then switch to fast-browsing recovery. Do not keep repeating the macro.

Read the full file on GitHub · 103 lines

Files

What ships with it

2 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. 2mo ago Changed 9943a43b840c
  2. 3mo ago First seen · 103 lines · 25 tokens per session scan A d501c1d7e125

Subscribe to this mod's changes

browser-macros is a skill published in the GitHub repository m4ttstack/fast-browser (0 stars, last pushed 13d ago), licensed MIT. It adds 25 tokens to every session and 1,080 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

browser-macros compared with skills from other repositories

browser-macros next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
browser-macrosm4ttstack/fast-browserSkill013d agoMITA25Claude Code, Codex
browsebrowserbase/stagehandSkill26kyesterdayMITA109Claude Code
moli-webfetchlexmount/moliSkill25ktodayApache-2.0A90Codex
moli-websearchlexmount/moliSkill25ktodayApache-2.0A49Codex
moli-cdp-serverlexmount/moliSkill25ktodayApache-2.0A74Codex
stagehand-facadebrowserbase/stagehandSkill26kyesterdayMITA42Claude Code, Codex
surfnicobailon/surf-cliSkill706yesterdayMITA53Claude Code, Codex