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 mxyhi/ok-skills --skill opencli-adapter-authorgit clone --depth 1 https://github.com/mxyhi/ok-skillsWrote 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/mxyhi/ok-skills/opencli-adapter-author)<a href="https://agentmods.dev/skills/mxyhi/ok-skills/opencli-adapter-author"><img src="https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-adapter-author/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/mxyhi/ok-skills/opencli-adapter-author"><img src="https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-adapter-author.svg" alt="Reviewed on agentmods" width="80" 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.00088 | $0.05328 |
| Opus 5 | $0.00044 | $0.02664 |
| Sonnet 5 | $0.00018 | $0.01066 |
| Haiku 4.5 | $0.00009 | $0.00533 |
Grade A, and why
opencli-adapter-author 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 6d 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.
This is a copy
91% identical to opencli-adapter-author — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.
opencli-adapter-author
你是要给一个站点写 adapter 的 agent。这份 skill 目标:简单站点争取 30 分钟内从零到通过 opencli browser verify;复杂、私有协议或写操作站点以证据完整和安全为先,不为了时限猜接口。
全程用现有工具:opencli browser * / opencli doctor / opencli browser init / opencli browser verify。没有新命令。
调试浏览器型 adapter 时,优先直接带上 --trace on --keep-tab true --window foreground。--trace on 每轮都落 trace artifact,summary.md 是失败/成功复盘入口;--keep-tab true --window foreground 让 tab lease 保留且浏览器窗口在前台,方便核对最终页面状态。
前置:看你落在哪
先拿 coverage-matrix.md 快速自测。三个问题:
- 数据在浏览器里看得到吗?(否 → 先解决鉴权)
- 数据是 HTTP/JSON/HTML 吗?(否 → 不在 skill 范围)
- 需要实时推送吗?(是 → 找同数据 HTTP 接口;没有就放弃)
三个都 yes 继续。
顶层决策树
先定 strategy,再写 adapter。 每次进入 Step 3/4 后、写代码前,必须产出一段 strategy note。没有这段 note,不要开始写 clis/<site>/<name>.js。
核心判断不是 "API 比 DOM 高级",而是 数据源有没有外部契约。实测维护成本显示:公开/官方接口最稳;UI/DOM 语义通常也有用户可见契约;站内未文档化 XHR/GraphQL/signature endpoint 最容易漂。不要为了 "API-first" 把稳定的 UI/DOM 实现盲目迁到无契约内部接口。
Strategy: PUBLIC_API | COOKIE_API | PAGE_FETCH | INTERCEPT | DOM_STATE | UI_SELECTOR
Contract: stable | visible-ui | internal-unstable
Evidence:
- observed request/state: <endpoint / state global / UI-only signal>
- auth source: <none / browser cookie / csrf from meta / localStorage / page runtime>
- replay result: <status + content-type + non-empty sample shape>
If Strategy is PAGE_FETCH or INTERCEPT:
- why PUBLIC_API / COOKIE_API are unavailable:
- why UI_SELECTOR / DOM_STATE are not safer:
- why the maintenance cost is acceptable:
Strategy classes:
| Strategy | 契约级别 | 用在什么时候 | 证据要求 |
|---|---|---|---|
PUBLIC_API |
stable | 不需要登录,Node-side fetch 直接拿到目标数据 |
200 + JSON/HTML 含目标数据,不是埋点/广告 |
COOKIE_API |
stable | Node-side fetch + page.getCookies() / header helper 能拿数据 |
cookie/CSRF 来源清楚,replay 非空 |
UI_SELECTOR |
visible-ui | publish/upload/click/表单,或页面语义比内部接口更稳 | selector 有语义锚点;错误路径是 typed error |
DOM_STATE |
visible-ui | 数据在 hydration state / bootstrap JSON / SSR HTML 里 | state key / script JSON / HTML 结构明确 |
PAGE_FETCH |
internal-unstable | 只能在页面上下文 fetch 才能复用 same-origin/session/runtime |
opencli browser eval fetch(...) 非空;必须解释为什么避不开内部接口 |
INTERCEPT |
internal-unstable | 请求签名复杂,但页面自己能自然发出请求 | 触发 UI 后能截到目标 response;必须解释为什么 UI/DOM 不够 |
What ships with it
18 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/adapter-template.md 21 KB
- references/api-discovery.md 16 KB
- references/coverage-matrix.md 5.5 KB
- references/deep-recon.md 10 KB
- references/field-conventions.md 5.2 KB
- references/field-decode-playbook.md 7.0 KB
- references/jsdom-fixture-pattern.md 7.8 KB
- references/output-design.md 4.7 KB
- references/site-memory.md 11 KB
- references/site-memory/bilibili.md 3.6 KB
- references/site-memory/eastmoney.md 3.8 KB
- references/site-memory/gmail.md 2.8 KB
- references/site-memory/tonghuashun.md 2.4 KB
- references/site-memory/xueqiu.md 2.8 KB
- references/site-recon.md 5.3 KB
- references/strategy-selection.md 8.7 KB
- references/success-rate-pitfalls.md 9.4 KB
- references/typed-errors.md 13 KB
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.
- 6d ago Changed · +25 lines f1acca32328f
- 10d ago First seen · 257 lines · 88 tokens per session scan A 0a0997e6da28
opencli-adapter-author is a skill published in the GitHub repository mxyhi/ok-skills (484 stars, last pushed yesterday), licensed Apache-2.0. It adds 88 tokens to every session and 5,328 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to opencli-adapter-author, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
browser-testing-with-devtools
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…
awesome-content-publisher
Publishes a prepared batch of scheduled posts to the user's own accounts through their live browser (Playwright MCP bridge): bridge and format preflights, per-platform login checks that never automate a login, a persistent ledger that prevents duplicate posts across restarts, timezone-mapped scheduling that can idle…
qa-loop
Runs an interactive localhost QA session that accepts issues, screenshots, routes, and browser evidence; watches app, API, browser, and network errors; reproduces and fixes each defect; verifies the result; and creates one local commit per fix. Use when asked to start QA, QA a local app, fix localhost issues as they…
agent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
content-script-developer
Expert in browser extension content scripts, DOM integration, and safe page augmentation across modern web apps. Use when building or updating a browser-extension content script, injecting UI into third-party pages, or handling SPA navigation and dynamic DOM changes.
browser-testing-with-devtools
A guide for testing web pages and browser-based applications in a real Chrome browser through Chrome DevTools. It checks what is actually rendered and how the page behaves at runtime.