browser-replay — скилл для Claude Code: повтор сессии в браузере
Прогоняет записанную сессию браузера заново — на том же адресе или на изменённом варианте. Пригодится для регресс-тестов после деплоя.
npx skills add ruvnet/ruflo --skill browser-replay -a claude-codeЧто делает browser-replay
Скилл берёт записанную траекторию сессии и повторяет её шаг за шагом: открывает браузер, вызывает нужный MCP-инструмент (browser_click, browser_fill, browser_eval и другие) с теми же аргументами, что были записаны. Каждая строка траектории — это {ts, action, args, selector, result}.
Если селектор не находится, шаг не падает сразу. Скилл ищет похожий селектор по эмбеддингу в пространстве browser-selectors для той же пары <host>:<intent> и пробует ещё раз. Так он переживает изменения в DOM. Для запуска нужен npx и доступ к ruvector и @claude-flow/cli.
Вердикт считается как доля совпавших шагов; порог по умолчанию — 0.85, меняется флагом --tolerance. Сетевой разброс по времени и контенту даёт ложные провалы, поэтому ожидаемые отличия лучше вносить через --mutate или привязывать прогон к фикстуре. Если на шаг уходит больше одной повторной попытки, это признак, что сайт пора записать заново, а не воспроизводить.
Какие задачи решает
- прогнать UI-сценарий после деплоя и увидеть, где он сломался
- воспроизвести баг, пойманный в прошлой сессии
- сравнить два прогона одного сценария через
browser-screenshot-diff - проверить, что записанная сессия вообще воспроизводима
- ответвить сессию и прогнать родительскую перед изменениями
Примеры запросов агенту
- Повтори сессию
checkout-2024.rvfна том же адресе и покажи, какие шаги не совпали - Прогони
login-flow.rvfс--urlна тестовый стенд и порогом--tolerance 0.9 - Воспроизведи сессию
signup.rvfс--mutate, чтобы учесть ожидаемые отличия в контенте
Как установить browser-replay
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill browser-replay -a claude-code2Вручную: положить файлы
~/.claude/skills/browser-replay/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/browser-replay/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill browser-replay -a codex2Вручную: положить файлы
.agents/skills/browser-replay/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill browser-replay -a cursor2Вручную: положить файлы
.cursor/skills/browser-replay/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo browser-replay2Вручную: положить файлы
.github/skills/browser-replay/SKILL.md1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill browser-replay -a gemini-cli2Командой платформы
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-browser/skills/browser-replayВручную: положить файлы
.devin/skills/browser-replay/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill browser-replay -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о browser-replay
Как установить browser-replay в Claude Code?
Выполните npx skills add ruvnet/ruflo --skill browser-replay -a claude-code. Скилл появится в ~/.claude/skills/browser-replay/SKILL.md.
Что делает browser-replay?
Повторяет записанную траекторию сессии браузера: открывает браузер и по очереди вызывает MCP-инструменты с записанными аргументами. Если селектор не найден, подбирает похожий по эмбеддингу и пробует снова.
Почему повтор иногда даёт ложный провал?
Из-за сетевой недетерминированности: разное время отклика и меняющийся контент. Ожидаемые отличия вносите через --mutate или привязывайте прогон к фикстуре.
Исходный текст
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