Use opencli CLI to interact with social/content websites (Bilibili, Zhihu, Twitter/X, YouTube, Weibo, 小红书, V2EX, Reddit, HackerNews, 雪球, BOSS直聘 etc.) via the...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install opencli-skill或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install opencli-skill⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/opencli-skill/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: opencli description: | Use opencli CLI to interact with social/content websites (Bilibili, Zhihu, Twitter/X, YouTube, Weibo, 小红书, V2EX, Reddit, HackerNews, 雪球, BOSS直聘 etc.) via the user's Chrome login session. ALWAYS prefer opencli over playwright/browser automation for these supported sites. Triggers: user asks to browse, search, fetch hot/trending content, post, or read messages on any supported site; 查B站热门, 搜知乎, 看微博热搜, 发推, 搜YouTube, 查股票行情 etc. ---
CLI tool that turns websites into CLI interfaces, reusing Chrome's login state. Zero credentials needed.
Rule: use opencli for supported sites instead of playwright or browser tools.
opencli <site> <command> [--option value] [-f json]
Common flags (all commands):
-f json — machine-readable output (preferred for parsing)--limit N — number of results (default varies, usually 20)-f table|json|yaml|md|csv# 读取/浏览
opencli bilibili hot --limit 10 -f json
opencli zhihu hot -f json
opencli weibo hot -f json
opencli twitter timeline -f json
opencli hackernews top --limit 20 -f json
opencli v2ex hot -f json
opencli reddit hot -f json
opencli xiaohongshu feed -f json
# 搜索
opencli bilibili search --keyword "AI" -f json
opencli zhihu search --keyword "大模型" -f json
opencli twitter search --query "claude AI" -f json
opencli youtube search --query "LLM tutorial" -f json
opencli boss search --query "AI工程师" --city "上海" -f json
# 互动(写操作)
opencli twitter post --text "Hello from CLI!"
opencli twitter reply --url "https://x.com/.../status/123" --text "Great post!"
opencli twitter like --url "https://x.com/.../status/123"
# 个人数据
opencli bilibili history -f json
opencli twitter bookmarks -f json
opencli xueqiu watchlist -f json
When displaying results to the user:
# | 原标题 | 中文翻译 | 链接 | 关键指标...title format🔗 — compact clickable iconExample:
| # | 原标题 | 中文翻译 | 链接 | 分 | 评论 |
|---|--------|---------|------|-----|------|
| 1 | The 49MB web page | 那个 49MB 的网页 | [🔗](https://...) | 388 | 196 |
核心原则:永远不说"不支持",先尝试 opencli,失败或无命令时自动切换 Playwright。
用户请求
↓
opencli 有对应命令?
├─ 是 → 执行 opencli
└─ 否 → 直接用 Playwright MCP 打开对应页面完成任务
↓
Playwright 报错 / 无法连接?
└─ 引导用户安装桥接插件(见下方)
| 场景 | 网址 | Playwright 操作 | |------|------|----------------| | 知乎私信 | https://www.zhihu.com/messages | navigate → snapshot 读取列表 | | 知乎通知 | https://www.zhihu.com/notifications | navigate → snapshot | | 微博发帖 | https://weibo.com | navigate → 点击输入框 → type → 发送 | | 小红书私信 | https://www.xiaohongshu.com/im | navigate → snapshot | | B站私信 | https://message.bilibili.com | navigate → snapshot | | Twitter DM | https://x.com/messages | navigate → snapshot |
1. mcp__playwright__browser_navigate → 目标 URL
2. mcp__playwright__browser_snapshot → 读取页面结构
3. 根据需要:browser_click / browser_type / browser_scroll
4. 将结果整理后呈现给用户
如果 Playwright 报错(连接失败 / 无法控制浏览器),告知用户:
> "需要在 Chrome 安装 Playwright MCP Bridge 插件才能控制浏览器。 > 安装步骤: > 1. 打开 Chrome,访问 Chrome Web Store > 2. 搜索 "Playwright MCP" 或 "MCP Bridge" > 3. 点击「添加到 Chrome」 > 4. 安装后确保 Chrome 已登录目标网站 > 5. 重新告诉我你的需求,我来帮你完成"
当 opencli 不支持某个网站时,不要放弃——自己创建!
1. opencli <site> --help → 报错?说明不支持
2. opencli generate <url> → 尝试自动生成(成功则结束)
3. 自动生成失败 → 手动创建 YAML:
a. 用 Playwright 打开目标页面
b. browser_evaluate 探索 DOM 结构(找 data-test 属性、class 规律)
c. 确认选择器后写入 ~/.opencli/clis/<site>/top.yaml
d. opencli <site> top -f json → 验证输出
site: <sitename>
name: <command>
description: <描述>
domain: <domain>
strategy: public
browser: true
args:
limit:
type: int
default: 10
pipeline:
- navigate: https://<url>
- evaluate: |
(async () => {
const limit = ${{ args.limit }};
// DOM 抓取逻辑
return results;
})()
columns: [rank, name, ...]
| 站点 | 命令 | 文件 | 关键选择器 | |------|------|------|-----------| | producthunt | top | ~/.opencli/clis/producthunt/top.yaml | button[data-test="vote-button"] → 父容器 → [data-test^="post-name-"],tagline: nameEl.parentElement.querySelector('span.mt-0\\.5') |
browser_evaluate 先探结构:document.querySelector('...').innerHTMLdata-test 属性最稳定,其次 class 中的语义词nameEl.parentElement.querySelector('span...'))seen = new Set(),防止重复产品See references/commands.md for all 55 commands with complete argument details.
安装 opencli 后,可以对 AI 说这些话来触发它
Help me get started with opencli
Explains what opencli does, walks through the setup, and runs a quick demo based on your current project
Use opencli to use opencli CLI to interact with social/content websites (Bilibili,...
Invokes opencli with the right parameters and returns the result directly in the conversation
What can I do with opencli in my marketing & growth workflow?
Lists the top use cases for opencli, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/opencli-skill/ 目录(个人级,所有项目可用),或 .claude/skills/opencli-skill/(项目级)。重启 AI 客户端后,用 /opencli-skill 主动调用,或让 AI 根据上下文自动发现并使用。
opencli 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
opencli 可免费安装使用。请查阅仓库了解许可证信息。
Use opencli CLI to interact with social/content websites (Bilibili, Zhihu, Twitter/X, YouTube, Weibo, 小红书, V2EX, Reddit, HackerNews, 雪球, BOSS直聘 etc.) via the...
opencli 属于「Marketing & Growth」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my marketing & growth tasks using opencli
Identifies repetitive steps in your workflow and sets up opencli to handle them automatically