
Qiaomu Opencli Oneshot
This is a focused workflow for generating a single OpenCLI command when you know exactly what you want to scrape. You give it a URL and a one-liner goal, then follow four steps: open the page, capture the API call via network inspection, write a TypeScript adapter using one of the provided templates (cookie-based, header-based, or intercept mode), and test it. The skill includes a decision tree for figuring out which auth strategy you need based on whether a simple fetch works, whether you need credentials or custom headers, or whether you have to intercept browser requests. If you're building out a full site integration or exploring multiple endpoints, the author points you to opencli-explorer instead. This is the speedrun version.
- skills.sh installs
- 529
- GitHub stars
- 962
- last updated
- Jul 14, 2026
Install
$ npx -y skills add joeseesun/opencli-skill --skill qiaomu-opencli-oneshot --agent claude-codeInstalls into .claude/skills of the current project.
Files
CLI-ONESHOT — 单点快速 CLI 生成
给一个 URL + 一句话描述,4 步生成一个 CLI 命令。 完整探索式开发请看 opencli-explorer skill。
输入
| 项目 | 示例 |
|---|---|
| URL | https://x.com/jakevin7/lists |
| Goal | 获取我的 Twitter Lists |
流程
Step 1: 打开页面 + 抓包
1. browser_navigate → 打开目标 URL
2. 等待 3-5 秒(让页面加载完、API 请求触发)
3. browser_network_requests → 筛选 JSON API
关键:只关注返回 application/json 的请求,忽略静态资源。
如果没有自动触发 API,手动点击目标按钮/标签再抓一次。
Step 2: 锁定一个接口
从抓包结果中找到那个目标 API。看这几个字段:
| 字段 | 关注什么 |
|---|---|
| URL | API 路径 pattern(如 /i/api/graphql/xxx/ListsManagePinTimeline) |
| Method | GET / POST |
| Headers | 有 Cookie? Bearer? CSRF? 自定义签名? |
| Response | 数据在哪个路径(如 data.list.lists) |
Step 3: 验证接口能复现
在 browser_evaluate 中用 fetch 复现请求:
// Tier 2 (Cookie): 大多数情况
fetch('/api/endpoint', { credentials: 'include' }).then(r => r.json())
// Tier 3 (Header): 如 Twitter 需要额外 header
const ct0 = document.cookie.match(/ct0=([^;]+)/)?.[1];
fetch('/api/endpoint', {
headers: { 'Authorization': 'Bearer ...', 'X-Csrf-Token': ct0 },
credentials: 'include'
}).then(r => r.json())
Sponsors
Details
- Repository
- github.com/joeseesun/opencli-skill
- First seen
- Jun 3, 2026