next-sdk-page-agent

next-sdk-page-agent is a skill for Claude Code, Codex from opentiny/webmcp-sdk. It costs 51 tokens per session (1,293 once invoked), scanned A, original, MIT.

A development guide for the page-agent features of the @opentiny/next-sdk, including browser tools and accessibility settings.

In plain words
What is it for?
Use it when modifying page tools, registering page-agent tools, configuring accessibility trees, changing console-cloud defaults, or updating the related documentation.
Why use it?
It identifies the required checks and project documentation before changing public APIs, accessibility behavior, runtime injection, or page-tool configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it when modifying page tools, registering page-agent tools, configuring accessibility trees, changing console-cloud defaults, or updating the related documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/opentiny/webmcp-sdk/page-agent
Install

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.

Any agent
npx skills add opentiny/webmcp-sdk --skill page-agent
Clone the repo
git clone --depth 1 https://github.com/opentiny/webmcp-sdk

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for next-sdk-page-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/opentiny/webmcp-sdk/page-agent/github.svg)](https://agentmods.dev/skills/opentiny/webmcp-sdk/page-agent)
Your own site
<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.

agentmods 80×15 button for next-sdk-page-agent

Your own site · 80×15
<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>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash 19adc699f0b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

packages/next-sdk/skills/page-agent/SKILL.md · 80 lines

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 文档上抛 SecurityError DOMException;SDK 会中和 document/navigator native 并把 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)。
  • clipboard action: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。

Read the full file on GitHub · 80 lines

Changes

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.

  1. 1mo ago Changed 19adc699f0b4
  2. 2mo ago Changed · +1 lines 8da711cfddc9
  3. 2mo ago Changed · +1 lines 182837c62b7c
  4. 2mo ago First seen · 78 lines · 51 tokens per session scan A 2a1cb494c932

Subscribe to this mod's changes

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.

Related

next-sdk-page-agent compared with skills from other repositories

next-sdk-page-agent next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
next-sdk-page-agentopentiny/webmcp-sdkSkill1233d agoMITA51Claude Code, Codex
webmcp-cli-skillopentiny/agent-skillsSkill191mo agononeA49Claude Code
interactive-loginyc-software/qmSkill16kyesterdayMITA46Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k10d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.2kyesterdayMITA43Claude Code
cua-driverdavidondrej/skillsSkill4.3k3d agoMITA68Claude Code, Codex
open-design-browsercompozy/compozySkill2.8kyesterdayMITA56Claude Code, Codex