opencli-adapter-author

opencli-adapter-author is a skill for Claude Code from mxyhi/ok-skills. It costs 88 tokens per session (5,328 once invoked), scanned A, a copy of opencli-adapter-author, Apache-2.0.

A guide for writing OpenCLI adapters for websites. It takes an agent from investigating how a site's data is exposed through implementing an adapter and verifying it.

In plain words
What is it for?
Creating a new site adapter or adding a command to an existing one, including checking authentication, inspecting requests or page state, coding the adapter, and running verification.
Why use it?
It helps choose an appropriate way to access the site's data and gather evidence before code is written. This reduces guesswork when deciding between a public interface, browser state, network requests, or page controls.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Creating a new site adapter or adding a command to an existing one, including checking authentication, inspecting requests or page state, coding the adapter, and running verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mxyhi/ok-skills/opencli-adapter-author
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 mxyhi/ok-skills --skill opencli-adapter-author
Clone the repo
git clone --depth 1 https://github.com/mxyhi/ok-skills

Made for: Claude Code.

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 opencli-adapter-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/mxyhi/ok-skills/opencli-adapter-author/github.svg)](https://agentmods.dev/skills/mxyhi/ok-skills/opencli-adapter-author)
Your own site
<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.

agentmods 80×15 button for opencli-adapter-author

Your own site · 80×15
<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>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,328 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.
Origin 91% copy Near-identical to another mod 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.00088 $0.05328
Opus 5 $0.00044 $0.02664
Sonnet 5 $0.00018 $0.01066
Haiku 4.5 $0.00009 $0.00533

Measured 6d ago against content hash f1acca32328f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

Origin

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.

opencli/opencli-adapter-author/SKILL.md · 282 lines

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 快速自测。三个问题:

  1. 数据在浏览器里看得到吗?(否 → 先解决鉴权)
  2. 数据是 HTTP/JSON/HTML 吗?(否 → 不在 skill 范围)
  3. 需要实时推送吗?(是 → 找同数据 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 不够

Read the full file on GitHub · 282 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. 6d ago Changed · +25 lines f1acca32328f
  2. 10d ago First seen · 257 lines · 88 tokens per session scan A 0a0997e6da28

Subscribe to this mod's changes

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.

Related

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…

addyosmani/agent-skills · 68 tokens

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…

khasky/awesome-agent-skills · 148 tokens

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…

shipshitdev/skills · 81 tokens

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.

shipshitdev/skills · 51 tokens

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.

shipshitdev/skills · 51 tokens

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.

vinvcn/addyosmani-agent-skills-zh · 67 tokens