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/site-memory/xueqiu.md

View on GitHub
# xueqiu(雪球)

## 域名

| 用途 | 域名 |
|------|------|
| 行情 / 搜索 / 关注列表 | `stock.xueqiu.com` / `xueqiu.com` |
| 动态 / 评论 / 热帖 | `xueqiu.com` |
| 基金(蛋卷) | `danjuanfunds.com` |

## 默认鉴权

- `Strategy.COOKIE + browser: true`
- 核心 cookie:`xq_a_token`(匿名也有,登录后含用户身份)
- `page.evaluate` 里 `fetch(url, { credentials: 'include' })` 带 cookie
- 浏览器先访问一次 `xueqiu.com` 触发 cookie 下发,再去调接口(否则 `xq_a_token` 不存在 → 400)

## 已知 endpoint

- `GET stock.xueqiu.com/v5/stock/quote.json?symbol=SH600000` — 单股详情
- `GET stock.xueqiu.com/v5/stock/batch/quote.json?symbol=SH600000,SZ000001` — 批量报价
- `GET stock.xueqiu.com/v5/stock/chart/kline.json?symbol=SH600000&begin=<ts>&period=day&type=before&count=-100` — K 线
- `GET stock.xueqiu.com/v5/stock/screener/quote/list.json?market=CN&type=sh_sz` — 排行
  - 可选:`order_by=percent`(涨幅)/ `volume`(成交量)/ `amount`(成交额)/ `market_capital`
- `GET stock.xueqiu.com/v5/stock/search.json?keyword=<q>` — 搜索
- `GET xueqiu.com/statuses/hot/list.json?since_id=-1&max_id=-1&size=20&type=stock` — 热门帖
- `GET xueqiu.com/statuses/search.json?source=all&q=<q>` — 动态搜索
- `GET xueqiu.com/service/v5/stock/portfolio/list.json` — 关注组合(需登录)
- `GET xueqiu.com/v4/statuses/user_timeline.json?user_id=<uid>` — 用户动态

## 字段

字段基本人类可读(`symbol / name / current / chg / percent / volume / amount / market_capital / pe_ttm / pb`),详见 `../field-conventions.md` 的 xueqiu 节。

## 坑 / 陷阱

1. **必须先访问首页**:冷启动直接调 API 会 400 `cookie is invalid`,先 `page.goto('https://xueqiu.com/')` 再 fetch
2. **`symbol` 前缀硬编码**:SH/SZ/HK/US —— 港股 `00700` 是 `'HK00700'`,美股 `AAPL` 是 `'AAPL'`(无前缀)
3. **kline 的 `begin` 是毫秒 unix**,不是秒
4. **screener 的 `type`**:`sh_sz / hk / us` 必传,漏了拿空数组
5. **评论接口 `comments.json` 要传 `statusId`**,不是 `status_id`
6. **限频明显**:同 symbol 短时间反复调会 403,adapter 层建议加 300ms 间隔
7. **蛋卷基金(`danjuanfunds.com`)是独立子品牌**:cookie 域不同,要单独获取

## 可参考的 adapter

| 模板类型 | 参考文件 |
|---------|---------|
| 单股 / 批量报价 | `clis/xueqiu/stock.js` |
| K 线 | `clis/xueqiu/kline.js` |
| 排行 | `clis/xueqiu/hot-stock.js` |
| 热帖 / feed | `clis/xueqiu/hot.js` / `feed.js` |
| 关注 | `clis/xueqiu/watchlist.js` |
| 搜索 | `clis/xueqiu/search.js` |
| 评论 | `clis/xueqiu/comments.js` |
| 基金持仓(蛋卷) | `clis/xueqiu/fund-holdings.js` |

工具:`clis/xueqiu/utils.js` 有 `fetchWithRetry` + symbol normalize,直接用别重写。
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: 471kUpdated Claude CodeCodexVerifiedInstall
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