Skip to main content
skill CX Codex

browser-replay — Claude Code skill: replay a browser session

Re-drives a recorded browser session against the same URL or a mutated variant. Handy for regression runs after a deploy.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill browser-replay -a claude-code
Open on GitHub

What browser-replay does

The skill walks a saved trajectory step by step: it opens a browser and fires the matching MCP tool (browser_click, browser_fill, browser_eval and the rest) with the arguments that were captured. Every line of the trajectory holds {ts, action, args, selector, result}.

A missing selector does not kill the run. The skill queries the browser-selectors namespace for an embedding-similar selector under the same <host>:<intent> and retries once, which is how it survives DOM drift. You need npx plus access to ruvector and @claude-flow/cli.

The verdict is the ratio of matched steps to total steps, with a default tolerance of 0.85 that --tolerance overrides. Timing and content variation across the network can produce false failures, so inject expected differences with --mutate or pin the run to a fixture. Needing more than one retry on a step means the site wants a fresh recording rather than another replay.

What it helps with

  • regression-test a UI flow after a deploy
  • reproduce a bug captured in an earlier session
  • compare two runs of one flow through browser-screenshot-diff
  • check whether a recorded session is replayable at all
  • fork a session and replay the parent before mutating

Example prompts for the agent

  • Replay session checkout-2024.rvf on the same URL and list the steps that did not match
  • Run login-flow.rvf with --url pointed at staging and --tolerance 0.9
  • Replay signup.rvf with --mutate so expected content differences are tolerated

How to install browser-replay

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill browser-replay -a claude-code

2Manually: put the files in place

~/.claude/skills/browser-replay/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/browser-replay/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about browser-replay

How do I install browser-replay in Claude Code?

Run npx skills add ruvnet/ruflo --skill browser-replay -a claude-code. The skill lands in ~/.claude/skills/browser-replay/SKILL.md.

What does browser-replay do?

It re-drives a recorded browser trajectory: opens a browser and calls the MCP tools in order with the captured arguments. When a selector is gone, it finds an embedding-similar one and retries.

Why does a replay sometimes fail when nothing broke?

Network nondeterminism — varying timing and content. Inject the differences you expect with --mutate, or pin the run to a fixture.

Source text

SKILL.md · MIT
---
name: browser-replay
description: Replay a recorded session trajectory against the same URL or a mutated variant; uses browser-selectors embedding similarity to recover from DOM drift
argument-hint: "<session-id> [--url <new-url>] [--mutate <json>] [--tolerance <0..1>]"
allowed-tools: mcp__plugin_ruflo-core_ruflo__browser_open mcp__plugin_ruflo-core_ruflo__browser_close mcp__plugin_ruflo-core_ruflo__browser_click mcp__plugin_ruflo-core_ruflo__browser_fill mcp__plugin_ruflo-core_ruflo__browser_type mcp__plugin_ruflo-core_ruflo__browser_press mcp__plugin_ruflo-core_ruflo__browser_select mcp__plugin_ruflo-core_ruflo__browser_check mcp__plugin_ruflo-core_ruflo__browser_uncheck mcp__plugin_ruflo-core_ruflo__browser_hover mcp__plugin_ruflo-core_ruflo__browser_wait mcp__plugin_ruflo-core_ruflo__browser_screenshot mcp__plugin_ruflo-core_ruflo__browser_snapshot mcp__plugin_ruflo-core_ruflo__browser_eval Bash Read
---

# Browser Replay

Re-drive a recorded session trajectory. Used for regression testing, deterministic re-runs, and as the verification path that `browser-record` plus `browser-selectors` actually produces something replayable.

> **This skill is the load-bearing assumption of the v0.2.0 architecture.** ADR-0001 Verification §4 requires ≥80% replay success across 10 distinct sites of varying drift profiles before the proposal moves from `Proposed` → `Accepted`. If you find replay unreliable, capture the failure modes in `findings.md` and report them up the ADR.

## When to use

- Regression-testing a UI flow after a deploy.
- Reproducing a bug captured in a prior session.
- Comparing two runs of the same flow for `browser-screenshot-diff`.
- Forking a session (`/ruflo-browser fork`) and replaying the parent before mutating.

## Steps

1. **Locate the source session**:
   ```bash
   npx -y [email protected] rvf status <session-id>.rvf
   ```
2. **Load the trajectory**:
   ```bash
   Read .../trajectory.ndjson
   ```
   Each line is `{ts, action, args, selector, result}`.
3. **Open a fresh browser** via `mcp__plugin_ruflo-core_ruflo__browser_open` (target URL = original or `--url` override).
4. **For each trajectory step**, dispatch the matching MCP tool (`browser_click`, `browser_fill`, `browser_eval`, etc.) with the recorded args.
5. **On selector miss**, do *not* fail immediately — query the `browser-selectors` namespace for an embedding-similar selector for the same `<host>:<intent>` and retry once:
   ```bash
   npx -y @claude-flow/cli@latest memory search --namespace browser-selectors \
     --query "<host> <intent>" --limit 5
   ```
6. **Record a new trajectory** for the replay run (allocate a fresh RVF container, lineage-tracked via `rvf derive`).
7. **Verdict**: tally matched-step / total-step ratio. Default tolerance threshold is 0.85 (configurable via `--tolerance`). Verdict goes into `findings.md`.

## Caveats

- Browserbase explicitly does not offer replay (rrweb session replay was deprecated). We're betting on selector-embedding recovery; expect noise on heavily drifted sites.
- Network nondeterminism (timing, content variation) can produce false-fail verdicts. Use `--mutate` to inject expected variation or pin to a fixture.
- For visual diff, chain into `browser-screenshot-diff` against the parent session id.
- If selector recovery requires more than one retry per step, log it. That's the signal that the site needs a re-record, not a replay.

© ruvnet · MIT · ruvnet/ruflo

Similar skills

All skills for Browser and scraping →

From the same set146

kg-traverse Explores AgentDB knowledge graph relationships starting from a seed entity. It pinpoints dependency chains and indirect connections when analyzing code impact. CX Codex +1 727installs cost-compact-context A skill that wraps getTokenOptimizer().getCompactContext() for token cost analysis. Retrieves compacted context from ReasoningBank, reports tokens saved via bridge measurements, and exposes agent-booster availability. CX Codex +1 726installs market-ingest Fetches price and volume history, normalizes candles into OHLCV vectors, and stores them for pattern detection or comparison. CX Codex +1 725installs vector-hyperbolic Places hierarchical data in the Poincaré ball: radius from tree depth, direction from a text embedding. For dependency trees, ontologies, class hierarchies. CX Codex +1 724installs browser-record Opens a named browser session, allocates an RVF container for it and records every action as a ruvector trajectory step. Useful when a browsing run has to be replayed or analysed later. CX Codex +1 718installs browser-form-fill Fills web forms using a structured JSON field map and saved selector templates. It automates data entry and form submission directly in browser sessions. CX Codex +1 717installs dossier-collect Builds a graph-based dossier from a user, file, symbol, ADR, URL, or concept. Use it to trace connected entities instead of answering one narrow question. CX Codex +1 701installs browser-extract Pulls text, tables and attribute values off a rendered page as structured JSON, with PII and prompt-injection checks running before anything reaches the model. CX Codex +1 697installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor