首页龙虾技能列表 › Twitter Research — 技能工具

Twitter Research — 技能工具

v1.0.0

搜索Twitter/X上特定话题的最新内容并汇总报告。当用户说"搜Twitter"、"查看Twitter上关于XX的讨论"、"twitter research"、"X上最近在聊什么"时使用。

0· 408·0 当前·0 累计
by @sawzhang·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/25
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
可疑
medium confidence
Skill's stated purpose (search Twitter/X and summarize) matches its instructions, but it relies on local Chrome login/session and runtime installation of a third‑party CLI (browser-use) without declaring credentials or clearly limiting access—this mismatch and some instruction/tool inconsistencies are worth reviewing before use.
详细分析 ▾
用途与能力
Name/description (Twitter research) aligns with the runtime instructions: the SKILL.md describes automated browser scraping of X/Twitter and a fallback to fxtwitter/vxtwitter APIs, which are coherent for the stated task.
指令范围
Instructions require reusing the local Chrome login (-b real) and therefore implicitly rely on the user's browser session/cookies (sensitive local state) though no credential or permission is declared. The SKILL.md also instructs installing and invoking a CLI (browser-use) at runtime and uses WebSearch as a tool, but WebSearch is referenced in the text while not listed in the allowed-tools header — a mismatch that grants the agent broader discretion than the documented tool list. The skill also instructs clearing proxy env vars and expects Chrome to be running; these are actions that interact with local system state beyond a simple API call.
安装机制
The manifest has no install spec, but the instructions tell the agent to run `uv tool install browser-use && browser-use install` at runtime. That causes code to be downloaded/installed during execution (higher risk). The instruction forbids alternative install paths (e.g., curl install.sh) and mandates the uv installer; this reliance on a runtime installer is reasonable for browser automation but increases the attack surface and should be explicit in the registry metadata.
凭证需求
The skill declares no required env vars or credentials, yet it instructs reuse of the user's real Chrome profile (implying access to cookies/session tokens) and clears proxy environment variables. Access to a logged-in Chrome profile is effectively using local credentials/session state but is not declared or requested explicitly—this is disproportionate to the manifest, and users should be warned that their logged-in account will be used for scraping.
scan_findings_in_context
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/25

twitter-research 1.0.0 - Initial release: Enables structured Twitter/X topic search and summary reports via browser automation or fxtwitter API fallback. - Multi-keyword search: Supports up to 3-5 keyword groups, including bilingual queries and product/topic variants. - Automated environment setup: Detects/provisions browser-use CLI, cleans proxy interference, and ensures proper login/session handling. - Robust against rate limits: Implements interval controls and fallback escalation to maintain reliable results. - Aggregates, deduplicates, and categorizes tweets, then outputs a structured, sorted summary—including key trends and tool/project recommendations.

● 可疑

安装命令 点击复制

官方npx clawhub@latest install twitter-research
镜像加速npx clawhub@latest install twitter-research --registry https://cn.clawhub-mirror.com

技能文档

通过 Browser Use CLI 操控真实 Chrome 搜索 Twitter/X,抓取热门推文并汇总成结构化报告。如果 browser-use 不可用则降级到 fxtwitter API。

流程

Step 1: 确定搜索关键词

根据用户给的话题,生成 3-5 组搜索关键词:

  • 核心关键词: 用户原始话题(如 AI Agent
  • 细分关键词: 话题 + 限定词(如 AI Agent framework 2026
  • 关联产品/项目: 热门项目名(如 Claude CodeCursor
  • 中英文双搜: 同一话题分别用中文和英文搜索

告诉用户关键词列表后开始执行。

Step 2: 初始化浏览器环境

2a. 定义 wrapper 函数(消除代理干扰)

系统 SOCKS/HTTP 代理会破坏 browser-use 的 CDP 连接,必须清除。在 session 开始时定义一次:

bu() { ALL_PROXY= HTTP_PROXY= HTTPS_PROXY= http_proxy= https_proxy= all_proxy= browser-use "$@"; }

后续所有 browser-use 调用改用 bu

2b. 检测并自动安装 browser-use

if ! which browser-use &>/dev/null; then
  echo "INSTALLING browser-use..."
  uv tool install browser-use && browser-use install
fi
# 验证
which browser-use &>/dev/null && echo "READY" || echo "INSTALL_FAILED"

注意: 安装方式必须是 uv tool install browser-usecurl install.sh 只装 cookie 同步工具 profile-use,不是浏览器自动化 CLI。

2c. 清理旧 session 并启动

bu close 2>/dev/null; sleep 1
bu -b real open "https://x.com" 2>&1

如果报 CDP connection 错误,说明代理变量没清干净或 Chrome 未运行。-b real 需要本机 Chrome 已启动且已登录 Twitter。

Step 3: 逐个关键词搜索

对每个关键词执行:

# 导航到搜索页
bu open "https://x.com/search?q={URL编码的关键词}&src=typed_query&f=top"
sleep 3

# 获取热门标签内容 bu state 2>&1

解析 state 输出的方法:

state 返回 accessibility tree,推文结构如下:

提取时按 article 分块,从每块中收集上述字段。

滚动加载更多(可选):

bu scroll down && sleep 2 && bu state 2>&1

切换到"最新"标签:

从 state 中找到 最新 的索引号,然后:

bu click {索引号} && sleep 3 && bu state 2>&1

搜索下一个关键词

直接导航到新 URL(不要用搜索框填充,容易出错):

sleep 8  # Twitter 搜索限速间隔,不能低于 8 秒
bu open "https://x.com/search?q={下一个关键词}&src=typed_query&f=top"
sleep 3
bu state 2>&1

限速防护(关键!)

Twitter 搜索限速非常严格。每次搜索之间必须间隔 8-10 秒,否则搜索结果会一直转圈加载不出来。

症状识别:页面能显示搜索框和标签栏,但内容区域持续转圈(主页 /home 正常加载)。

恢复策略:

  • 停止搜索,等待 2-3 分钟让限速解除
  • 先访问主页 bu open "https://x.com/home" 验证网络正常
  • 再尝试搜索简单词(如 hello)验证搜索功能恢复
  • 恢复后继续,但加大间隔到 10 秒
  • 如果 5 分钟后仍无法搜索,降级到方式 B

Step 4: 降级方案 — fxtwitter API

如果 browser-use 不可用、未安装、或被 Twitter 限速:

# 1. 用 WebSearch 搜索(在 skill 中调用 WebSearch 工具)
#    query: "{关键词} site:x.com" 或 "{关键词} Twitter"

# 2. 从搜索结果提取推文 URL,用 fxtwitter API 获取详情 # URL 格式: https://x.com/{username}/status/{tweet_id} curl -s "https://api.fxtwitter.com/{username}/status/{tweet_id}"

# 3. fxtwitter 不可用时尝试 vxtwitter curl -s "https://api.vxtwitter.com/{username}/status/{tweet_id}"

Step 5: 清理

搜索结束后关闭 browser-use 会话:

bu close 2>/dev/null

Step 6: 汇总去重

将所有搜索结果合并:

  • 去重: 按推文 URL 去重(同一条可能在多个关键词下出现)
  • 排序: 按互动量(喜欢 + 转帖 + 书签)降序
  • 分类: 按话题主题分组

Step 7: 输出结构化报告

# Twitter {话题} 热门内容汇总({日期})

搜索关键词:{关键词1}、{关键词2}、...
数据来源:Twitter/X 热门 + 最新
采集方式:Browser Use CLI / fxtwitter API
采集时间:{时间}

一、{主题分类1}

1. {推文标题/摘要}

作者: {display_name} (@{handle}) | 时间: {time} | 互动: {likes} likes, {retweets} RT, {views} views
{推文正文}

要点: {一句话总结}


关键趋势总结

  • 趋势1: {描述}
  • ...

值得关注的项目/工具

项目名类型一句话描述推荐来源
.........@handle

常见问题排查

症状原因解决
socksio package not installed系统 SOCKS 代理干扰 CDPbu() wrapper 清除 CLI 进程的代理(Chrome 自身走系统代理,不受影响)
CDP connection: invalid HTTP response旧 session 残留bu close 后重试
Browser startup timeoutChromium 未安装browser-use install
state 只有空 div无登录态(Chromium 模式)-b real 复用真实 Chrome 登录态
搜索页持续转圈,主页正常Twitter 搜索限速(最常见)等 2-3 分钟恢复,加大间隔到 10 秒
curl install.sh 没装到 browser-use那个脚本只装 profile-useuv tool install browser-use
-b real 模式需要配代理吗?不需要Chrome 自己走系统代理,bu() 只清 CLI 进程的代理
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务