steel-browser

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Steel Browser Skill

Steel Browser 技能

Use this skill to produce reliable, executable
steel browser
workflows for agent-driven automation.
使用本skill为Agent驱动的自动化生成可靠、可执行的
steel browser
工作流。

Why this skill exists

本skill的设计背景

steel browser
keeps broad command compatibility with
agent-browser
while adding Steel-native session lifecycle and endpoint handling. Agents get better results when they use named sessions, deterministic mode selection, and task-specific command patterns instead of one-off ad-hoc commands.
steel browser
agent-browser
保持广泛的命令兼容性,同时新增了Steel原生的会话生命周期和端点处理能力。相较于一次性临时命令,Agent使用命名会话、确定性模式选择和任务专属命令模式时能获得更好的执行效果。

Use this workflow

工作流使用说明

  1. Identify the operating mode first.
  2. Start or attach a named session before interactive work.
  3. Run task commands in small verifiable steps.
  4. Validate results (
    wait
    ,
    snapshot
    ,
    get ...
    ) before moving on.
  5. Stop sessions when the task is done unless the user asks to keep them alive.
  1. 首先确定运行模式。
  2. 在交互操作前启动或挂载一个命名会话。
  3. 拆分为小的可验证步骤执行任务命令。
  4. 进入下一步前验证结果(
    wait
    snapshot
    get ...
    )。
  5. 任务完成后停止会话,除非用户要求保持会话运行。

Mode selection rules

模式选择规则

  • Use cloud mode by default.
  • Use self-hosted mode if the user specifies
    --local
    ,
    --api-url
    , or self-hosted infrastructure.
  • Keep mode consistent for all commands in a sequence.
Read references/steel-browser-lifecycle.md for full lifecycle and endpoint precedence details.
  • 默认使用云模式。
  • 如果用户指定
    --local
    --api-url
    或自托管基础设施,则使用自托管模式。
  • 同一序列中的所有命令需保持模式一致。
完整的生命周期和端点优先级说明请查阅references/steel-browser-lifecycle.md

Session discipline

会话规范

  • Prefer
    --session <name>
    across all commands in one workflow.
  • Parse and preserve session
    id
    from
    steel browser start
    when needed for downstream tooling.
  • Treat
    connect_url
    as display-safe metadata; do not treat it as a raw secret-bearing URL.
  • 同一个工作流的所有命令优先使用
    --session <name>
    参数。
  • 必要时解析并保留
    steel browser start
    返回的会话
    id
    ,供下游工具使用。
  • connect_url
    视为可安全展示的元数据,不要将其作为携带密钥的原始URL处理。

Task execution pattern

任务执行模板

Use this skeleton and adapt commands to the task:
bash
SESSION="task-$(date +%s)"
steel browser start --session "$SESSION"
steel browser open <url> --session "$SESSION"
steel browser snapshot -i --session "$SESSION"
使用以下框架,根据任务调整命令:
bash
SESSION="task-$(date +%s)"
steel browser start --session "$SESSION"
steel browser open <url> --session "$SESSION"
steel browser snapshot -i --session "$SESSION"

perform interactions/extraction commands

执行交互/内容提取命令

steel browser stop --session "$SESSION"

For command families and examples, read [references/steel-browser-commands.md](references/steel-browser-commands.md).
steel browser stop --session "$SESSION"

命令族和示例请查阅[references/steel-browser-commands.md](references/steel-browser-commands.md)。

Migration behavior

迁移规则

When users provide
agent-browser
commands or scripts:
  1. Convert command prefix from
    agent-browser
    to
    steel browser
    .
  2. Preserve original behavior intent.
  3. Add Steel lifecycle commands (
    start
    ,
    stop
    ,
    sessions
    ,
    live
    ) when explicit session control is needed.
Read references/migration-agent-browser.md.
当用户提供
agent-browser
命令或脚本时:
  1. 将命令前缀从
    agent-browser
    转换为
    steel browser
  2. 保留原有行为意图。
  3. 需要明确会话控制时,添加Steel生命周期命令(
    start
    stop
    sessions
    live
    )。
请查阅references/migration-agent-browser.md

Troubleshooting behavior

故障排查规则

On auth, local runtime, stale sessions, or attach errors:
  1. Diagnose with
    sessions
    ,
    live
    , and mode/endpoint checks.
  2. Provide a minimal corrective command sequence.
  3. Retry the original action sequence.
Read references/troubleshooting.md.
遇到认证、本地运行时、会话过期或挂载错误时:
  1. 使用
    sessions
    live
    命令以及模式/端点检查进行诊断。
  2. 提供最小化的修正命令序列。
  3. 重试原操作序列。
请查阅references/troubleshooting.md

Response format

响应格式

When giving users commands, prefer this structure:
  1. Mode
    : cloud/self-hosted and why.
  2. Session
    : chosen session name and lifecycle steps.
  3. Commands
    : exact executable sequence.
  4. Checks
    : what output confirms success.
If the user asks for terse output, keep the same order but shorten prose.
向用户提供命令时,优先使用以下结构:
  1. Mode
    :云/自托管模式及选择原因。
  2. Session
    :选定的会话名称和生命周期步骤。
  3. Commands
    :准确的可执行序列。
  4. Checks
    :可确认执行成功的输出特征。
如果用户要求简洁输出,保持相同顺序但简化文字描述。

Guardrails

使用约束

  • Do not print or request raw API keys in command output.
  • Do not mix cloud and local mode in one flow unless explicitly transitioning.
  • Do not assume an existing active session without checking.
  • For inherited command uncertainty, use
    steel browser <command> --help
    .
  • 不要在命令输出中打印或索要原始API密钥。
  • 除非明确进行切换,不要在一个流程中混用云模式和本地模式。
  • 未检查前不要假设存在活跃会话。
  • 对继承的命令存在疑问时,使用
    steel browser <command> --help
    查询。

Reference routing table

参考文档路由表

  • Lifecycle, endpoint precedence, attach rules: references/steel-browser-lifecycle.md
  • Complete command families and examples: references/steel-browser-commands.md
  • Migration from upstream command usage: references/migration-agent-browser.md
  • Error handling and recovery playbooks: references/troubleshooting.md
  • 生命周期、端点优先级、挂载规则: references/steel-browser-lifecycle.md
  • 完整命令族和示例: references/steel-browser-commands.md
  • 从上游命令用法迁移: references/migration-agent-browser.md
  • 错误处理和恢复方案: references/troubleshooting.md