mine-macros

A skill that examines recorded Fast Browser sessions and proposes reusable macros, which are saved browser procedures.

In plain words
What is it for?
It helps find repeated browser flows across at least two recorded sessions, account for previous macro failures, and prepare candidates for approval.
Why use it?
It prevents a one-off browser session from being treated as enough evidence for a reusable procedure and stops unapproved macros from being installed.

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/m4ttstack/fast-browser/mine-macros
Any agent
npx skills add m4ttstack/fast-browser --skill mine-macros
Clone the repo
git clone --depth 1 https://github.com/m4ttstack/fast-browser

Made for: Claude Code, Codex.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 889 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.00021 $0.00889
Opus 5 $0.00010 $0.00445
Sonnet 5 $0.00004 $0.00178
Haiku 4.5 $0.00002 $0.00089

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

Security

Grade A, and why

mine-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 yesterday.

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/mine-macros/SKILL.md · 91 lines

How it starts

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

Mine Macros

Turn repeated recorded flows into proposals. Never install a mined macro without explicit approval for that individual macro in the current conversation.

Fast path vs batch path

This skill is the batch path: it mines old recorded sessions for repeated macro candidates and requires evidence from at least two sessions. The immediate single-session path is flow distillation, owned by fast-browsing: right after an ad hoc solve, the just-performed session compiles into a flow via fast-browser flows compile, gated for anything mutating by the human running fast-browser flows approve. Neither path replaces the other. A single session is never macro evidence here, the 2+ session rule never migrates onto the flows path, and the flows fast path never installs a macro.

Recording gate

Read ~/.fast-browser/config.json first. If sessions.enabled is false, return:

Session recording is disabled; there are no sessions to mine.

Stop. Do not enumerate sessions, inspect other roots, or mutate macro state.

Mine sessions

  1. Repair first. Read ~/.fast-browser/macro-failures.md when present. Match each failed macro to recent sessions on the same origin and queue a repaired script as a proposal before new candidates.
  2. Collect direct sessions. Enumerate only direct session-* directories beneath ~/.fast-browser/sessions/. Do not mine nested directories or ~/.fast-browser/archive/. Parse each session.md into its ordered tool flow and report unparseable sessions as no-ops.
  3. Cluster repeated flows. Group by origin and similar ordered actions. Require evidence from at least two sessions. Treat repeated handwritten scripts for the same origin as strong candidates.
  4. Exclude known decisions. Drop flows covered by ~/.fast-browser/macros/MACROS.md or ~/.fast-browser/rejected-macros.md. A single filename-only macro run is evidence for an existing macro, not a new candidate.
  5. Draft safely. Parameterize values that vary; retain stable values. Follow the browser-macros authoring contract. Keep the complete script in memory or a temporary file outside ~/.fast-browser/macros/.
  6. Propose one at a time. Present the name, description, parameters, complete script, supporting session directories, and occurrence count. Request one decision for that macro: Approve, Reject, or Edit first. Wait for the answer before writing any disposition.

Read the full file on GitHub · 91 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. yesterday First seen · 91 lines · 21 tokens per session scan A ad40dcd3a23a

Subscribe to this mod's changes

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

Related

Other skills, from other repositories

webcmd-browser

Use when a live browser task requires Playwright interaction, authenticated handoff, visible UI verification, or ad-hoc page inspection.

agentrhq/webcmd · 30 tokens

moli-webfetch

Fetch, inspect, crawl, and capture live, JavaScript-rendered websites with Moli. Use when Codex needs current web content, web research, fact lookup, link following, a bounded crawl, client-rendered or response-gated content, network diagnostics, or a standalone HTML, Markdown, JSON, semantic-tree, viewport or…

lexmount/moli · 90 tokens

moli-cdp-server

Start Moli's CDP server and connect Playwright, Puppeteer, or raw CDP clients. Use to run a headless-browser CDP endpoint, replace a Chromium process, attach over CDP, enable real layout and screenshot surfaces, or diagnose CDP discovery, connection, and target startup—even when Moli is not named.

lexmount/moli · 74 tokens

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

nicobailon/surf-cli · 60 tokens

surf-codebase

Navigate and modify surf-cli codebase - Chrome extension + native host for AI browser automation. Use for surf-cli code work, architecture questions, implementing browser control/CDP/accessibility/network features.

nicobailon/surf-cli · 42 tokens

playwright-rs-usage

Procedural reference for using playwright-rs in Rust browser-automation code — object model (Browser/Context/Page/Locator), the locator!() macro, builder pattern for options, auto-wait semantics, adding the crate and installing its browsers, and how to capture / inspect traces for failure diagnosis. Use when writing…

padamson/playwright-rust · 98 tokens