Skip to content

Spoon94/skill-vault / opencli

opencli

Verified

OpenCLI 全能助手 - 把任意网站/Electron 应用变成 `opencli <site> <command>` 的统一操作面。当 agent 要读写已登录网站、驱动真实浏览器、抓取页面、填表点击、修复失效适配器、给新站点写适配器、或把搜索/查询路由到最佳数据源时,都用这个 skill。这是合并了 5 个官方 opencli 子技能(usage/browser/adapter-author/autofix/smart-search)的统一入口,按任务类型路由到对应章节或 reference。

FileKindSize
SKILL.mdskill md20.9 KB
references/adapter-author.mdmarkdown3.7 KB
references/adapter/adapter-template.mdmarkdown21.2 KB
references/adapter/api-discovery.mdmarkdown17.0 KB
references/adapter/coverage-matrix.mdmarkdown5.5 KB
references/adapter/deep-recon.mdmarkdown10.3 KB
references/adapter/field-conventions.mdmarkdown5.2 KB
references/adapter/field-decode-playbook.mdmarkdown7.1 KB
references/adapter/jsdom-fixture-pattern.mdmarkdown7.9 KB
references/adapter/output-design.mdmarkdown4.7 KB
references/adapter/site-memory.mdmarkdown10.7 KB
references/adapter/site-memory/bilibili.mdmarkdown3.6 KB
references/adapter/site-memory/eastmoney.mdmarkdown3.8 KB
references/adapter/site-memory/gmail.mdmarkdown2.8 KB
references/adapter/site-memory/tonghuashun.mdmarkdown2.4 KB
references/adapter/site-memory/xueqiu.mdmarkdown2.8 KB
references/adapter/site-recon.mdmarkdown4.5 KB
references/adapter/strategy-selection.mdmarkdown2.3 KB
references/adapter/success-rate-pitfalls.mdmarkdown9.3 KB
references/adapter/typed-errors.mdmarkdown12.6 KB
references/autofix.mdmarkdown12.2 KB
references/browser.mdmarkdown4.2 KB
references/search/sources-ai.mdmarkdown3.1 KB
references/search/sources-info.mdmarkdown968 B
references/search/sources-media.mdmarkdown1.2 KB
references/search/sources-other.mdmarkdown935 B
references/search/sources-shopping.mdmarkdown795 B
references/search/sources-social.mdmarkdown1.2 KB
references/search/sources-tech.mdmarkdown1.1 KB
references/search/sources-travel.mdmarkdown506 B
references/smart-search.mdmarkdown5.9 KB

references/adapter/coverage-matrix.md

View on GitHub
# Coverage Matrix

skill 明确承诺能搞定什么、搞不定什么。动手前先看一眼这张表,判断目标站落在哪一格。

**状态标记**:
- ✅ **已验证**:有可跑通的真实 adapter / dry-run 证据
- 🟡 **已列招但未硬跑**:文档把方法写全了,但这一版没拿真实站点跑过;第一次遇到时按文档走,踩坑回来补 `site-memory`
- ❌ **不支持**:skill 明确不碰,走绕开方案

---

## 支持(skill 里有对应的招)

| 维度 | 支持 | 状态 | 走哪节 |
|------|------|------|-------|
| 页面形态 | 列表页 / 排行页 | ✅ | `adapter-template.md`(convertible.js / rank.js 类) |
| | 详情页(单对象) | ✅ | `adapter-template.md`(stock.js / holders.js 类) |
| | 时间序列(K 线 / 分钟线) | ✅ | `adapter-template.md`(kline.js) |
| | 嵌套列表(列表里含列表) | 🟡 | `adapter-template.md` + `output-design.md` 打平规则 |
| 站点类型 | SPA(React/Vue,JSON XHR) | ✅ | `site-recon.md` Pattern A + `api-discovery.md` §network |
| | SSR(HTML with inline data) | 🟡 | `site-recon.md` Pattern B + `api-discovery.md` §state |
| | JSONP / push/script[src] | ✅ | `site-recon.md` Pattern C + `api-discovery.md` §bundle(eastmoney / tonghuashun 已覆盖) |
| | SPA + 独立 BFF domain | 🟡 | `api-discovery.md` §bundle §suffix |
| Strategy(详见 `strategy-selection.md`) | 裸 `fetch()` 拿到 | ✅ | `PUBLIC_API`(一方文档化接口,最稳:fixes/adapter-year=1.18) |
| | cookie 透传 | ✅ | `COOKIE_API`(官方 web 接口 + 用户登录态,fixes/adapter-year=2.01) |
| | publish / upload / click / 表单 | ✅ | `UI_SELECTOR`(DOM 的 a11y / semantic 也是契约,fixes/adapter-year=1.92) |
| | hydration state / inline JSON | 🟡 | `DOM_STATE`(fixes/adapter-year=0.91 小样本 N=11,按 UI_SELECTOR 同档) |
| | page-context fetch(CORS / same-origin runtime) | 🟡 | `PAGE_FETCH`(无契约内部 endpoint,fixes/adapter-year=8.41,必须正向论证) |
| | 触发 UI 拦截响应 | 🟡 | `INTERCEPT`(无契约,fixes/adapter-year=8.69,必须正向论证) |
| 字段形态 | 自解释(`title / price / current`) | ✅ | 直接映射 |
| | 已登记代号 | ✅ | `field-conventions.md` 查表 |
| | 未登记代号 | 🟡 | `field-decode-playbook.md` 排序键对比法 |
| | 嵌套路径 `data.diff[].f2` | ✅ | `field-decode-playbook.md` §3 结构差分 |
| 分页 | `page` / `pn` / `pageNum` | ✅ | `adapter-template.md` 例子 |
| | `cursor` / `next_cursor` | ✅ | adapter 里 while 循环,收集到 limit |
| | `offset` / `start` | ✅ | 同上 |
| 响应格式 | JSON | ✅ | 默认 |
| | JSONP(`?callback=`) | ✅ | 去掉 callback 参数直接请求,返回仍是 JSON 字符串包裹 |
| | CSV 字符串(eastmoney kline) | ✅ | `response.split(',')` 按列序解 |
| | HTML 表格(tonghuashun) | 🟡 | `page.evaluate` 里用 `querySelectorAll` 拿 |

🟡 的维度意思:方法在文档里,但这一版没拿真实站点跑过端到端。第一次遇到时按文档走,遇到和文档不一致的地方记到 `~/.opencli/sites/<site>/notes.md`,下一次再打开就是 ✅。

---

## 不支持(承认搞不定,skill 不教)

| 场景 | 原因 | 绕开方案 |
|------|------|---------|
| 首次登录获取 token | 需要用户真实输入账密 | 让用户先在 browser session 里手动登录,adapter 拿 cookie 就行 |
| 复杂 anti-bot(captcha) | 反爬拒流量 | 放弃,换同数据的其他站点 |
| 加密字段(客户端 crypto) | 要破解 bundle 逆向 | 换 endpoint;实在不行发请求到 intercept 让页面自己解 |
| WebSocket 流式数据 | 状态管理复杂 | 退回 HTTP 轮询版本(多数站都有) |
| 私有 binary 协议 | 非 HTTP/WS | 不在 skill 范围 |
| 视觉化图表(只有 canvas) | 数据埋在渲染层 | 找对应 API;找不到就放弃 |
| 签名算法涉及静态密钥 | 需要长期跟踪 bundle 变更 | 走 `Strategy.INTERCEPT`,让页面自己发带签名的请求 |
| 频控 / rate-limit 严格 | 多发几次就 429 | adapter 层控并发 + 加退避;但 skill 不解决 |

---

## 决定用不用 skill 的快速自测

三个问题:

1. **数据能在浏览器里看到吗?** 看不到(登录墙 / 付费墙)→ 先解决鉴权,再回来
2. **数据来源是 HTTP/JSON/HTML 之一吗?** 不是(binary / 加密)→ 不在 skill 范围
3. **需不需要每秒推送?** 需要 → 找同数据 HTTP 接口;没有就放弃

三个都 yes 再往下走。

---

## 本轮硬验证 / 当前证据

| 类型 | 证据 adapter | 覆盖维度 |
|------|-------------|---------|
| PUBLIC + 自解释字段 + SPA | `~/.opencli/clis/coingecko/top.js`(本轮 dry run) | `Strategy.PUBLIC` + REST JSON + 自解释字段 + 列表页 |
| COOKIE + 代号字段 + JSONP | `clis/eastmoney/*.js` × 13(PR #1091 merged) | `Strategy.PUBLIC`(匿名 `ut=`)+ JSONP + f-代号 + 列表/详情/K 线 |
| COOKIE + SPA | `clis/bilibili/*.js` × 10+(已存在) | `Strategy.COOKIE + browser:true` + wbi 签名 |

**本 PR 新增的 skill 还未硬验证的维度**:🟡 行,尤其 SSR Pattern B + Bearer/CSRF + 未登记代号解码。这些放到第一批真实用户 adapter 写作中打磨,skill 文档先落,踩坑回来补 `site-memory`。合 PR 之前先拿 coingecko 跑第二轮(带着第一轮写出的 `~/.opencli/sites/coingecko/`)验证 memory 命中 → endpoint re-verify → 字段抽查 → 写 adapter 这条回路。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 470kUpdated Claude CodeCodexUnverifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall