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,105 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.

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.

agentmods
npx agentmods add skills/opentiny/webmcp-sdk/page-agent
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.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.svg" alt="Measured on agentmods" 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,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.01105
Opus 5 $0.00026 $0.00553
Sonnet 5 $0.00010 $0.00221
Haiku 4.5 $0.00005 $0.00111

Measured yesterday against content hash 182837c62b7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

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

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 / 类型(含 A11yRoleRuleA11yConfigPageAgentToolOptions 等)
  • 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 / setPageAgentToolConfiga11yConfig 数组合并;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 actiontext 有值写剪切板、无值读剪切板;不依赖 index、不展示 mask;handler 见 page-tools/handlers/clipboard.ts

Read the full file on GitHub · 79 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. yesterday Changed · +1 lines 182837c62b7c
  2. 6d 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 (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.

Related

Other skills, from other repositories

webmcp-cli-skill

面向第三方 AI Agent 的安装与执行指南:如何使用 webmcp-cli 与浏览器页面交互。包含已注入 WebMCP 工具的页面领域专用工具说明。.

opentiny/agent-skills · 49 tokens

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.

jackwener/OpenCLI · 67 tokens

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…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

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.

yc-software/qm · 46 tokens

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.

pinchtab/pinchtab · 52 tokens

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.

microsoft/skills · 43 tokens