browser-intent
它能做什么
这项技能让智能体接收关于网页的自然语言指令并加以执行,例如点击登录按钮。适合希望用文字描述操作,而不是编写选择器的人。
适用场景
- ✓当某个元素用文字描述比用选择器定位更容易时。
- ✓当一次性的页面操作不值得编写选择器链时。
- ✓当页面经常变化、精确选择器总是失效时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-intent/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请打开账户页面,点击写着“下载我的发票”的按钮。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体把指令和页面一起发送给页内智能体工具,该工具把页面转为文字并决定执行哪个操作,然后返回结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Browser Intent
Natural-language layer on top of the low-level browser_* selector tools. Where browser-extract and browser-form-fill compose selector-based primitives (browser_click, browser_fill, browser_snapshot), browser-intent lets the caller say what they want ("Click the login button", "Fill the search box with cats and submit") and delegates execution to page-agent — in-page injected JS that turns the DOM into text and drives an LLM tool-call loop against it.
When to use
- The target element is easier to describe in words than to select reliably (dynamic class names, ambiguous structure, A/B-tested markup).
- A one-shot interaction where writing out a selector chain isn't worth it.
- Prefer
browser_click/browser_fill/browser_snapshotdirectly when you already know the exact selector or ref (@e1) —browser_actadds LLM latency + cost that a direct selector call doesn't.
Steps
- Call
browser_actwith ataskstring, and optionallyurl(navigates first) andsession(default"default"):mcp__plugin_ruflo-core_ruflo__browser_act({ task: "Click the login button", url: "https://example.com/account", session: "my-session" }) - Read the response contract:
{ success: true, result, steps, history, contentFlagged, llmSource }— the intent executed.resultis the AIDefence-gated final text page-agent produced;historyis the full step trace (reflection + action + tool result per step);stepsishistory.length.{ success: true, degraded: true, reason, hint }— page-agent isn't installed, or no OpenAI-compatible LLM provider is configured. Never treatdegraded: trueas an error to retry — surface thehintand fall back to selector-basedbrowser_*tools instead.{ success: false, error, ... }— a real failure (browser open failed, injection failed, execution timed out, or page-agent's ownexecute()reportedsuccess:false).
- On
contentFlagged: true, the returnedresulthas already been redacted by AIDefence (PII or a prompt-injection/threat pattern was detected in the page-agent output) — do not attempt to recover the original text. - Prefer a recorded session (
browser-record) when the interaction matters enough to replay later;browser_actitself does not open an RVF container — it operates on whatever session id you pass (or"default").
Provider requirements (why this degrades so often)
page-agent calls its LLM directly from the browser page context via a plain OpenAI-compatible POST {baseURL}/chat/completions. That means:
- A bare
ANTHROPIC_API_KEYis not sufficient — Anthropic's native API is a different shape (/v1/messages). - Configure one of:
OPENROUTER_API_KEY(OpenRouter, OpenAI-compatible),OLLAMA_API_KEY(Ollama Cloud, OpenAI-compatible), orCLAUDE_FLOW_PAGE_AGENT_BASE_URL+CLAUDE_FLOW_PAGE_AGENT_API_KEYfor a custom OpenAI-compatible endpoint. - The real provider key never enters the page:
browser_actstarts a short-lived loopback HTTP proxy that holds the key server-side and injects the realAuthorizationheader itself. The page only ever sees a127.0.0.1URL and a placeholder key string.
Caveats
page-agentis anoptionalDependenciesentry (npm i page-agentif the doctor/degraded hint asks for it) — this plugin stays fully operational without it; you simply lose the natural-language layer and fall back to selector-based tools.- The npm bundle's demo auto-init tail (which would otherwise construct a second
PageAgentinstance against Alibaba's public test endpoint) is stripped before injection — you should never see traffic to apage-ag-testing-*host from this tool. - Every successful
browser_actcall best-effort records the intent + resulting trajectory into thebrowsermemory namespace (ADR-174 distillation loop). This is fire-and-forget — a memory-store failure never fails the tool call. timeoutMs(default 120000) bounds how longbrowser_actpolls forexecute()to settle; a slow multi-step intent may need a higher value.
常见问题
它需要 AI 服务提供商吗?
需要。这项技能需要已配置的 OpenAI 兼容服务提供商;如果没有,功能会降级。
它比直接使用选择器更便宜吗?
不便宜。这项技能说明,它会增加语言模型的延迟和成本,因此如果你知道选择器,直接使用更好。
它会不可靠吗?
可能会。用文字描述操作不如选择器精确,所以请检查结果。
详情
作者的原始描述
Execute a natural-language browser intent via page-agent (browser_act) when the target is easier to describe than to select — degrades gracefully when page-agent or an OpenAI-compatible LLM provider isn't configured
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1578
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。