Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/opentiny/webmcp-sdk/page-agentnpx skills add opentiny/webmcp-sdk --skill page-agentgit clone --depth 1 https://github.com/opentiny/webmcp-sdkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/opentiny/webmcp-sdk/page-agent)<a href="https://agentmods.dev/skills/opentiny/webmcp-sdk/page-agent"><img src="https://agentmods.dev/badge/skills/opentiny/webmcp-sdk/page-agent.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01105 |
| Opus 5 | $0.00026 | $0.00553 |
| Sonnet 5 | $0.00010 | $0.00221 |
| Haiku 4.5 | $0.00005 | $0.00111 |
Grade A, and why
next-sdk-page-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
next-sdk Page Agent Skill
动手前(硬门禁)
先遵守根 AGENTS.md「任务分流」。修改下列任一内容前,必须先创建或更新 packages/next-sdk/specs/REQ-YYYYMMDD-slug/(仅当用户明确豁免时可例外):
- 公开 API / 类型(含
A11yRoleRule、A11yConfig、PageAgentToolOptions等) consoleCloudPageAgentToolOptions或其他默认/预设行为- 无障碍树构建、剪枝、Static-Lift、序列化语义
- 需要更新
docs/webmcp-sdk/page-agent-tool.md的行为说明
近期示例:specs/REQ-20260722-console-layout-landmark/、specs/REQ-20260817-clipboard-handler/、specs/REQ-20260903-mask-cursor-lifecycle/。
拿不准是否琐碎 → 先问用户,不要默认开写。
何时使用
- 改
packages/next-sdk/page-tools/** - 注册或配置
registerPageAgentTool - 调整
a11yConfig、站点预设consoleCloudPageAgentToolOptions - 改
runtime.ts挂载的 page-agent API
权威长文:docs/webmcp-sdk/page-agent-tool.md
入口
| 入口 | 用途 |
|---|---|
index.ts |
完整浏览器侧导出 |
core.ts |
无 DOM 精简入口(不含完整 page-agent API) |
runtime.ts |
CDN/IIFE:挂 API,不自动 registerPageAgentTool |
关键 API(符号级)
import {
registerPageAgentTool,
getPageAgentToolConfig,
setPageAgentToolConfig,
defineA11yConfig,
consoleCloudPageAgentToolOptions,
isConsoleCloudHost,
buildA11yTree,
searchA11yTree,
PAGE_AGENT_TOOL_CALL_EVENT,
PAGE_AGENT_TOOL_RESULT_EVENT,
} from '@opentiny/next-sdk'
registerPageAgentTool(options?):注册page-agent-tool,内部调用initializeBuiltinWebMCP()(默认forcePolyfill: true,覆盖会崩溃的 Chromium 实验性 native);重复调用为 replace 式重新初始化。返回{ showMask, hideMask }。- 运行期唯一配置面:
getPageAgentToolConfig/setPageAgentToolConfig(a11yConfig数组合并;enableHighlight/cursorMode覆盖;支持mode: 'replace')。 cursorMode:'actionOnly'(默认,仅操作类出光标) /'always'/'never'。无参showMask()默认不出光标;操作类结束后若遮罩仍开着且cursorMode !== 'always'则收光标。always下显式{ showCursor: false }仍可临时隐藏;never覆盖显式showCursor: true。whitelist/blacklist中的选择器字符串在构建无障碍树时 动态解析。A11yRoleRule.name:可选声明可访问名(不改 DOM),用于 landmark / 布局容器在 YAML 中保留分区名。- 站点预设:云控制台用
consoleCloudPageAgentToolOptions+isConsoleCloudHost()(含ti-app-layout-*landmark)。 clipboardaction:text有值写剪切板、无值读剪切板;不依赖index、不展示 mask;handler 见page-tools/handlers/clipboard.ts。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +1 lines 182837c62b7c
- 6d ago First seen · 78 lines · 51 tokens per session scan A 2a1cb494c932
next-sdk-page-agent is a skill published in the GitHub repository opentiny/webmcp-sdk (117 stars, last pushed 2d ago), licensed MIT. It adds 51 tokens to every session and 1,105 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
webmcp-cli-skill
面向第三方 AI Agent 的安装与执行指南:如何使用 webmcp-cli 与浏览器页面交互。包含已注入 WebMCP 工具的页面领域专用工具说明。.
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
interactive-login
How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.
pinchtab-mcp
Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.
azure-messaging-webpubsub-java
Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.