with one click
twitter-harvest
用 Chrome 浏览器持续刷 Twitter,AI 评估筛选有价值内容和精彩评论,写入每日笔记
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
用 Chrome 浏览器持续刷 Twitter,AI 评估筛选有价值内容和精彩评论,写入每日笔记
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | twitter-harvest |
| description | 用 Chrome 浏览器持续刷 Twitter,AI 评估筛选有价值内容和精彩评论,写入每日笔记 |
| argument-hint | [可选:rounds=N | topic=AI,crypto] |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep, ToolSearch, mcp__chrome-devtools__evaluate_script, mcp__chrome-devtools__navigate_page, mcp__chrome-devtools__take_screenshot, mcp__chrome-devtools__take_snapshot, mcp__chrome-devtools__click, mcp__chrome-devtools__press_key, mcp__chrome-devtools__list_pages, mcp__chrome-devtools__select_page |
| user-invocable | true |
模拟用户真实刷 Twitter 体验:多数据源轮换采集 → 滚动阅读 → AI 两级筛选(高门槛,每轮最多 5 条)→ 看热门评论 → 写入笔记 → 继续刷下一波。全部轮次结束后生成「今日 Top 10 精选」。核心目标:捕捉极强信息差(新工具、新趋势、独家观点),而非堆量。
scripts/launch-chrome-cdp.shrounds=N → 刷 N 轮(默认 8 轮,即约 240 条推文)topic=关键词1,关键词2 → 只关注这些话题重要:使用 mcp__chrome-devtools__* 工具前,必须先用 ToolSearch 加载。
ToolSearch 加载所需的 chrome-devtools 工具(evaluate_script, navigate_page, take_screenshot, click, list_pages, select_page, new_page)list_pages 确认 Chrome 已连接list_pages 结果中查找 URL 包含 x.com 或 twitter.com 的已有 tabselect_page 选中该 tabnew_page 创建新 tab,URL 为 https://x.com/homeevaluate_script 确认 timeline 已加载,如果是登录页则告知用户并终止核心思想:不同数据源提供完全不同的内容,轮换使用避免重复。
每轮按以下策略选择数据源:
| 轮次 | 数据源 | 导航目标 | 说明 |
|---|---|---|---|
| 1-2 | For You 算法推荐 | x.com/home (默认 tab) | 算法推荐,覆盖面广 |
| 3-4 | Following 时间线 | x.com/home → 点击 "Following" tab | 纯关注者内容,按时间排序 |
| 5 | 💰 赚钱信息差搜索 | x.com/search?q=关键词&f=top | indie hacker / SaaS / ARR / launched / vibe coding |
| 6 | 💰 Crypto & 市场信号 | x.com/search?q=关键词&f=top | BTC / alpha / DeFi / airdrop / 宏观经济信号 |
| 7 | 关键词搜索(技术) | x.com/search?q=关键词&f=live | Claude / MCP / Agent / 开源工具 |
| 8 | 大牛主页深挖 | 直接访问大牛 profile 的 Replies tab | 发现他们参与的讨论串 |
For You → Following 切换:
// 点击 "Following" tab
(() => {
const tabs = document.querySelectorAll('[role="tab"]');
for (const tab of tabs) {
if (tab.textContent.includes('Following')) {
tab.click();
return 'switched to Following';
}
}
return 'Following tab not found';
})()
关键词搜索:
https://x.com/search?q=关键词&f=livesince:YYYY-MM-DD(当天日期),避免拉到旧内容和前几天重复的推文
Claude Code since:2026-03-04f=live + since:今天 结果太少(< 5 条),可放宽到 since:昨天f=top 不带时间限制——这会拉到一周甚至更久前的推文,导致大量重复("indie hacker" OR "solo founder" OR "$1M" OR ARR OR MRR OR "vibe coding" OR "launched" OR "built with") since:YYYY-MM-DD min_faves:50(BTC OR crypto OR Solana OR airdrop OR DeFi OR alpha) (buy OR sell OR signal OR opportunity) since:YYYY-MM-DD min_faves:100(Claude Code OR MCP OR Agent OR "open source") since:YYYY-MM-DDtopic= 参数自定义min_faves:N 过滤低质量内容Explore 热门:
https://x.com/explore/tabs/technology(如果不存在则用 x.com/explore)大牛主页深挖:
x.com/{handle} 浏览其最新推文和 Replies tab对每一轮(round)重复:
重复滚动提取:
evaluate_script 执行 JS 提取当前可见推文:(() => {
const articles = document.querySelectorAll('article[data-testid="tweet"]');
const tweets = [];
for (const article of articles) {
try {
const userLinks = article.querySelectorAll('a[role="link"]');
let author = '', handle = '';
for (const link of userLinks) {
const href = link.getAttribute('href') || '';
if (href.match(/^\/[^/]+$/) && !href.startsWith('/i/') && !href.startsWith('/search')) {
handle = href.replace('/', '');
const nameSpan = link.querySelector('span');
if (nameSpan) author = nameSpan.textContent || '';
break;
}
}
const textEl = article.querySelector('[data-testid="tweetText"]');
const text = textEl ? textEl.textContent : '';
if (!text) continue;
const timeEl = article.querySelector('time');
const timeParent = timeEl ? timeEl.closest('a') : null;
const tweetUrl = timeParent ? 'https://x.com' + timeParent.getAttribute('href') : '';
const timestamp = timeEl ? timeEl.getAttribute('datetime') : '';
const getMetric = (testId) => {
const el = article.querySelector(`[data-testid="${testId}"]`);
if (!el) return 0;
const txt = el.textContent.replace(/,/g, '').trim();
if (!txt) return 0;
if (txt.endsWith('K')) return Math.round(parseFloat(txt) * 1000);
if (txt.endsWith('M')) return Math.round(parseFloat(txt) * 1000000);
return parseInt(txt) || 0;
};
const hasMedia = article.querySelector('[data-testid="tweetPhoto"], video') !== null;
tweets.push({ author, handle, text: text.substring(0, 300), url: tweetUrl, timestamp, likes: getMetric('like'), retweets: getMetric('retweet'), replies: getMetric('reply'), has_media: hasMedia });
} catch (e) {}
}
return JSON.stringify(tweets);
})()
evaluate_script 滚动:() => { window.scrollBy(0, 5000); return 'scrolled'; }挑选本轮 likes 最高的 2-3 条推文(likes >= 100),逐一点进去:
navigate_page 到推文 URLevaluate_script 提取评论(跳过第一个 article 即原推):(() => {
const articles = document.querySelectorAll('article[data-testid="tweet"]');
const replies = [];
let isFirst = true;
for (const article of articles) {
if (isFirst) { isFirst = false; continue; }
try {
const userLinks = article.querySelectorAll('a[role="link"]');
let author = '', handle = '';
for (const link of userLinks) {
const href = link.getAttribute('href') || '';
if (href.match(/^\/[^/]+$/) && !href.startsWith('/i/') && !href.startsWith('/search')) {
handle = href.replace('/', '');
const nameSpan = link.querySelector('span');
if (nameSpan) author = nameSpan.textContent || '';
break;
}
}
const textEl = article.querySelector('[data-testid="tweetText"]');
const text = textEl ? textEl.textContent : '';
if (!text) continue;
const getMetric = (testId) => {
const el = article.querySelector(`[data-testid="${testId}"]`);
if (!el) return 0;
const txt = el.textContent.replace(/,/g, '').trim();
if (!txt) return 0;
if (txt.endsWith('K')) return Math.round(parseFloat(txt) * 1000);
if (txt.endsWith('M')) return Math.round(parseFloat(txt) * 1000000);
return parseInt(txt) || 0;
};
replies.push({ author, handle, text: text.substring(0, 200), likes: getMetric('like') });
} catch (e) {}
}
return JSON.stringify(replies);
})()
对本轮采集的推文做 AI 评估,采用两级筛选控制信息量:
第零级 — 排除条件(命中任一直接丢弃):
第一级 — 必要条件(至少满足一个):
第二级 — 每轮硬上限:
!! 标记 outstanding 推文(likes >= 1K 或 retweets >= 200)### Twitter #N (HH:MM) 💰 赚钱信息差默认关注话题关键词: AI, LLM, GPT, Claude, Agent, MCP, RAG, Cursor, 大模型, Rust, Go, TypeScript, Python, Vim, Neovim, Web3, crypto, BTC, ETH, Solana, DeFi, airdrop, startup, 创业, 独立开发, indie hacker, SaaS, ARR, MRR, vibe coding, side hustle, passive income, monetize, productivity, 效率, workflow, Obsidian
用户 topic= 指定时替换默认列表。
总结原则:
[->](url)(1.2K likes, 311 rt),省略 retweet 低于 10 的 rt 部分[img],含视频标 [video]!! 标记 outstanding 推文(likes >= 1K 或 retweets >= 200)锐评(💬):
如果发现质量极高的个人账号(非公司/媒体),检查是否已 follow:
(() => {
const btn = document.querySelector('[data-testid$="-follow"]');
if (btn) return 'not_following';
const ubtn = document.querySelector('[data-testid$="-unfollow"]');
if (ubtn) return 'already_following';
return 'unknown';
})()
如果未 follow 且符合大牛标准(持续高质量原创内容、有影响力),则点击 follow。
Read 今日 daily note,检查已有推文 URL 避免重复Edit 追加到 ## 记录 section(## 复盘 之前)Daily note 路径:归档/daily note/年/月/YYYY-MM-DD.md
不存在则创建:
---
date: YYYY-MM-DD
tags: [daily]
---
# YYYY-MM-DD
## 今日待办
- [ ]
## 记录
## 复盘
每轮写入格式(平铺列表,每轮 3-5 条,不需要分类标题):
### Twitter #N (HH:MM)
- **@author**: 核心观点一句话 [->](url) (1.2K likes, 311 rt) !! [img]
- 💬 锐评:有态度的一句话点评
- **@commenter**: 精彩评论 (56 likes)
- **@author**: 核心观点 [->](url) (350 likes)
- 💬 锐评
- **@author**: 核心观点 [->](url) (200 likes)
- 💬 锐评
> 本轮采集 N 条,筛选 M 条 | 数据源:For You / Following / 搜索"关键词" / Explore / @handle 主页
格式细节:
> blockquote 写统计,与列表之间空一行**分类名** 加粗行分组(不用 ####)全部轮次完成后,回顾所有已写入的推文,生成精选摘要插入到所有 ### Twitter #N 之前:
### 🐦 今日 Twitter 精选 (Top 10)
> 从 N 轮采集中精选最值得关注的 10 条
1. **@author**: 一句话核心观点 [->](url) ⭐
2. **@author**: 一句话核心观点 [->](url) ⭐
3. **@author**: 一句话核心观点 [->](url) ⭐
4. **@author**: 一句话核心观点 [->](url)
...
10. **@author**: 一句话核心观点 [->](url)
选取标准(按优先级):
格式:每条仅一句话 + 链接,不附评论、不标数据,极简扫描。⭐ 标记信息差最强的前 3 条。
Top 10 与后续各轮之间用 --- 分隔线隔开。
完成后输出总结:共刷 X 轮,采集 Y 条推文,筛选 Z 条写入 daily note,follow N 位大牛。
claude -p):全程无需用户交互一致性:
[->](url),不用 [→] 或其他变体(1.2K likes, 311 rt) 格式,K/M 缩写,低于 1000 写原数[img] [video],不用 emoji 📷!!,不用 🔥层次感:
### Twitter #N (HH:MM) 作为每轮标题- 无序列表- 💬 缩进在推文下方- **@handle**: 内容 缩进> blockquote--- 分隔简洁性: