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 instructions/opentiny/webmcp-sdk/agents-mdgit 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/instructions/opentiny/webmcp-sdk/agents-md)<a href="https://agentmods.dev/instructions/opentiny/webmcp-sdk/agents-md"><img src="https://agentmods.dev/badge/instructions/opentiny/webmcp-sdk/agents-md.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 | $0.02095 | $0.02095 |
| Opus 5 | $0.01047 | $0.01047 |
| Sonnet 5 | $0.00419 | $0.00419 |
| Haiku 4.5 | $0.00210 | $0.00210 |
Grade A, and why
webmcp-sdk AGENTS.md 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 3d 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 — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
本文件是 OpenTiny NEXT-SDKs 对 所有编码 Agent 的唯一横切约束源(AGENTS.md 开放标准)。
人类文档见 README.md / CONTRIBUTING.zh-CN.md;原理见 docs/ai-engineering/。
改某个包时:先读本文 → 再读该包 packages/<pkg>/AGENTS.md(若有)→ 再按需打开 Skill / Spec。不要整仓灌上下文。
任务分流(动手前硬门禁 — 所有 Agent 必须先做)
收到任何编码类需求后,在写业务代码之前先完成分流;不得跳过。拿不准时 先问用户,不要默认开写。
| 判定 | 条件(命中任一即成立) | 动手前必须完成 |
|---|---|---|
| Bug | 修复错误行为 / 回归 /「复现:」类描述 | 在主责包 test/ 写或更新含中文 复现: 的用例,再改代码 |
| 非琐碎 Feature | 见下方「必须建 Spec」清单 | 先建 packages/<pkg>/specs/REQ-YYYYMMDD-slug/(requirements.md + design.md + tasks.md),再按 tasks.md 实现 |
| 琐碎豁免 | 仅文案/注释/单行日志/纯排版,且不改行为与 API | 可免 Spec;PR / 回复中写明豁免理由 |
必须建 Spec(非琐碎 Feature)
命中 任一 即视为非琐碎,禁止以「只改几行 / 只是预设」为由豁免:
- 新增或修改 对外导出的 API / 类型(含可选字段,如配置项、
A11yRoleRule新属性) - 改变 运行时默认行为或站点预设(如
consoleCloudPageAgentToolOptions、默认 a11y 规则) - 改变 无障碍树 / 序列化 / 剪枝 / 工具协议 等可观察语义
- 跨模块或跨包协作,或需要多步任务拆解才能说清验收
- 需要补用户文档 / 迁移说明才能安全使用
允许的琐碎豁免(须显式声明)
- 错别字、注释、与行为无关的格式化
- 单测断言文案微调(不改变断言意图)
- 已有 Spec 的
tasks.md内已列出的纯执行项(Spec 已存在则直接做任务,不必新建)
错误示范(禁止)
- 用户说「给控制台布局加 landmark」→ 直接改
console-cloud.ts(漏 Spec) - 「顺手」扩展公开类型字段却声称琐碎
- 先实现再补 Spec 且不告知用户(允许事后补建,但须在当次会话补齐并标明状态)
上下文工程(硬规则)
- 质量 > 数量:少而准;禁止一次加载大量无关文件。
- 就近原则:Spec →
packages/<pkg>/specs/;测试 →packages/<pkg>/test/;包约定 → 包AGENTS.md;薄 Skill →packages/<pkg>/skills/。 - 按需 Skill:大 Skill 经
pnpm install→pnpm skills:sync落到.agents/skills/(不进 Git)。 - 完成定义必须可验证:写清命令(如
pnpm test)与期望。
一页纸架构
通信流:App ↔ document.modelContext(浏览器内置 WebMCP / polyfill)↔ page-agent-tool 等工具 ↔ Agent / WebAgent ↔ LLM(UI:TinyRobot / @opentiny/next-remoter)。
主推:initializeBuiltinWebMCP() + document.modelContext.registerTool / registerPageAgentTool。不要在约束与新代码中再推广已不推荐的 WebMcpServer / WebMcpClient。
| 包 | 职责 |
|---|---|
@opentiny/next-sdk |
浏览器 WebMCP(polyfill/桥接)+ page-tools + agent + remoter API |
@opentiny/next-remoter |
Vue3 聊天 UI |
@opentiny/next-wxt |
浏览器扩展 |
@opentiny/webmcp-cli |
注入 CLI |
| 示例 / docs | doc-ai*、playground、docs/ VitePress |
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.
- 3d ago First seen · 136 lines · 2,095 tokens per session scan A dfcf89d61fe4
webmcp-sdk AGENTS.md is an instructions file published in the GitHub repository opentiny/webmcp-sdk (117 stars, last pushed 8d ago), licensed MIT. It adds 2,095 tokens to every session, about $0.0105 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 instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.