
Qiaomu Opencli Oneshot
This is a focused workflow for generating OpenCLI commands when you know exactly what you want: give it a URL and a one-line goal, and it walks you through a 4-step process of opening the page, capturing the API calls, writing a TypeScript adapter, and testing. The source includes decision trees for authentication strategies (public, cookie, header, intercept) and three ready-to-use templates depending on whether you're dealing with simple cookie auth, complex headers like Twitter's GraphQL, or need to intercept requests for heavily protected APIs. It's the quick-start version of the fuller opencli-explorer skill, meant for when you're not exploring a whole site but just need to wrap one specific endpoint into a CLI command fast.
- skills.sh installs
- 1K
- GitHub stars
- 998
- last updated
- Aug 21, 2026
Install
$ npx -y skills add joeseesun/qiaomu-opencli-skills --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/qiaomu-opencli-skills
- Categories
- Backend & APIs, Testing & QA
- First seen
- Jun 3, 2026