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 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.01293 |
| Opus 5.5 | $0.00020 | $0.00517 |
| Sonnet 5.5 | $0.00010 | $0.00259 |
| Haiku 4.5 | $0.00005 | $0.00129 |
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 1mo ago.
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 — 80 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-20260904-contenteditable-a11y-ref/、specs/REQ-20260903-mask-cursor-lifecycle/、specs/REQ-20260817-clipboard-handler/。
拿不准是否琐碎 → 先问用户,不要默认开写。
何时使用
- 改
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 }。Chrome 146+ 原生registerTool在非 origin-keyed 文档上抛SecurityErrorDOMException;SDK 会中和document/navigatornative 并把 JS polyfill 挂到 document 实例。polyfill 在originAgentCluster === false时也会抛空消息SecurityError,仅对 polyfill 实例绕过该检查。- 运行期唯一配置面:
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。- contenteditable:
browserState将自身声明contenteditable的编辑宿主标为textbox(显式 role 优先)、分配 ref、输出[contenteditable]token;fill用该 ref 填写。继承可编辑的子孙不单独占 ref。见REQ-20260904-contenteditable-a11y-ref。
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.
- 1mo ago Changed 19adc699f0b4
- 2mo ago Changed · +1 lines 8da711cfddc9
- 2mo ago Changed · +1 lines 182837c62b7c
- 2mo 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 (123 stars, last pushed 3d ago), licensed MIT. It adds 51 tokens to every session and 1,293 once invoked, about $0.0002 per session on Opus 5.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.
next-sdk-page-agent compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| next-sdk-page-agentopentiny/webmcp-sdk | Skill | 123 | 3d ago | MIT | A | 51 | Claude Code, Codex |
| webmcp-cli-skillopentiny/agent-skills | Skill | 19 | 1mo ago | none | A | 49 | Claude Code |
| interactive-loginyc-software/qm | Skill | 16k | yesterday | MIT | A | 46 | Claude Code, Codex |
| pinchtab-mcppinchtab/pinchtab | Skill | 11k | 10d ago | MIT | A | 52 | Claude Code, Codex |
| azure-messaging-webpubsub-javamicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 43 | Claude Code |
| cua-driverdavidondrej/skills | Skill | 4.3k | 3d ago | MIT | A | 68 | Claude Code, Codex |
| open-design-browsercompozy/compozy | Skill | 2.8k | yesterday | MIT | A | 56 | Claude Code, Codex |