browser-record
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Record
浏览器记录
Primitive on which every other browser skill composes. Opens a named browser session, allocates an RVF container for it, and binds every action to a ruvector trajectory step. You do not run a browser session in this plugin without invoking this skill (or one that wraps it).
这是所有其他浏览器技能构建的基础组件。它会打开一个命名的浏览器会话,为其分配RVF容器,并将每一个操作绑定到ruvector轨迹步骤。如果不调用此技能(或封装它的技能),请勿在此插件中运行浏览器会话。
When to use
使用场景
- Starting any browser interaction that is not a one-off throwaway probe.
- Exploring a site interactively while preserving the trace for later replay or analysis.
- Establishing a reusable session that downstream skills (,
browser-extract,browser-form-fill) will compose.browser-test
- 启动任何非一次性的浏览器交互操作。
- 交互式浏览网站的同时保留操作轨迹,以便后续重放或分析。
- 建立可复用的会话,供下游技能(、
browser-extract、browser-form-fill)调用。browser-test
Steps
操作步骤
- Allocate session id and RVF container:
bash
SID="$(date +%Y%m%d-%H%M%S)-${TASK_SLUG:-record}" npx -y ruvector@0.2.25 rvf create "$SID.rvf" --kind browser-session npx -y ruvector@0.2.25 hooks trajectory-begin --session-id "$SID" --task "$1" - Open the browser via with the URL.
mcp__claude-flow__browser_open - Snapshot the initial state: for the accessibility tree,
browser_snapshotfor a baseline image.browser_screenshot - For each interaction, record a trajectory step before and after:
bash
npx -y ruvector@0.2.25 hooks trajectory-step \ --session-id "$SID" --action click --args '{"selector":"#login"}' --result ok - End cleanly:
bash
npx -y ruvector@0.2.25 hooks trajectory-end --session-id "$SID" --verdict pass npx -y ruvector@0.2.25 rvf compact "$SID.rvf" - Index in AgentDB under :
browser-sessionsbashnpx -y @claude-flow/cli@latest memory store --namespace browser-sessions \ --key "$SID" --value "{rvf_id:$SID,host:...,task:...,verdict:pass}"
- 分配会话ID和RVF容器:
bash
SID="$(date +%Y%m%d-%H%M%S)-${TASK_SLUG:-record}" npx -y ruvector@0.2.25 rvf create "$SID.rvf" --kind browser-session npx -y ruvector@0.2.25 hooks trajectory-begin --session-id "$SID" --task "$1" - 通过打开浏览器并访问指定URL。
mcp__claude-flow__browser_open - 快照初始状态:使用获取可访问性树,使用
browser_snapshot获取基准截图。browser_screenshot - 针对每一次交互,在操作前后记录轨迹步骤:
bash
npx -y ruvector@0.2.25 hooks trajectory-step \ --session-id "$SID" --action click --args '{"selector":"#login"}' --result ok - 干净结束会话:
bash
npx -y ruvector@0.2.25 hooks trajectory-end --session-id "$SID" --verdict pass npx -y ruvector@0.2.25 rvf compact "$SID.rvf" - 在AgentDB的命名空间下建立索引:
browser-sessionsbashnpx -y @claude-flow/cli@latest memory store --namespace browser-sessions \ --key "$SID" --value "{rvf_id:$SID,host:...,task:...,verdict:pass}"
Caveats
注意事项
- Until the MCP tool ships (ADR-0001 §7), this skill drives the lifecycle from inside its own bash steps. Do not call
browser_session_recorddirectly without these wrappers.mcp__claude-flow__browser_open - The session id format is fixed: . Downstream
<YYYYMMDD-HHMMSS>-<task-slug>parses this./ruflo-browser ls - is expensive (full HTML dump per nav). Off by default.
--with-dom - AIDefence gates apply at extraction time, not at navigation time. is a primitive; redaction is the responsibility of skills that read content (
browser-record,browser-extract).browser-test
- 在MCP工具发布前(参考ADR-0001 §7),此技能通过自身的bash步骤驱动生命周期。请勿绕过这些封装直接调用
browser_session_record。mcp__claude-flow__browser_open - 会话ID格式固定:。下游的
<YYYYMMDD-HHMMSS>-<task-slug>命令会解析此格式。/ruflo-browser ls - 选项开销较大(每次导航都会导出完整HTML),默认关闭。
--with-dom - AIDefence防护在提取阶段生效,而非导航阶段。是基础组件;内容脱敏由读取内容的技能(
browser-record、browser-extract)负责。browser-test