← ClaudeAtlas

x-article-downloadlisted

Download X/Twitter content to local Markdown: a single tweet or long-form article (text, images, videos, linked GitHub repos) or an entire account in batch; auto-detects the content type and applies the right strategy. Use when the user shares an x.com or twitter.com link and wants to save, archive, analyze or translate it, or says 下载推文, 下载 X 文章, 保存这条推特, 批量下载账号, download tweet, archive X account, twitter to markdown.
hanzhangzzz/agent-skills-zh · ★ 1 · AI & Automation · score 73
Install: claude install-skill hanzhangzzz/agent-skills-zh
# X 内容下载器 将 X/Twitter 内容自动分类下载。支持: - **单条推文**:纯文字+图片、视频+转录、GitHub 仓库推荐帖 - **整账号批量下载**:获取某账号所有推文、批量下载图片、提取结构化内容 ## 触发条件 - 用户发送 `x.com/xxx/status/xxx` 或 `x.com/xxx/article/xxx` 链接 → 路径 A/B/C - 用户发送 `x.com/xxx` 或 `@xxx` 账号链接,要求下载"所有内容" → 路径 D - 用户说"下载这篇文章/视频"、"存下来"且链接是 X 的 → 路径 A/B/C - 用户说"下载这个账号所有推文/图片/提示词" → 路径 D ## 前置依赖 | 工具 | 用途 | 安装检查 | |------|------|---------| | xreach (agent-reach) | 批量获取推文、分页 | `which xreach` | | yt-dlp | 视频/推文信息获取、视频下载 | `which yt-dlp` | | whisper (openai-whisper) | 语音转文字 | `which whisper` | | ffmpeg | 音频提取 | `which ffmpeg` | | git | GitHub 仓库 clone | `which git` | --- ## 第零步:内容类型检测(必做,优先于一切) **在执行任何下载操作之前,先用浏览器打开推文,提取正文文本,判断内容类型。** ### 0.1 打开推文 + 提取文本 ``` browser_navigate → url = {用户给的链接} ``` 用 `browser_console` 提取正文和所有链接: ```javascript const article = document.querySelector('article[data-testid="tweet"]'); if (article) { const text = article.innerText; const links = Array.from(article.querySelectorAll('a[href]')).map(a => a.href); JSON.stringify({ text: text.substring(0, 10000), links }); } else { JSON.stringify({ text: '', links: [] }); } ``` ### 0.2 判断逻辑 根据提取到的文本和链接,按以下规则判断: | 条件 | 类型 | 执行路径 | |------|------|---------| | 文本中包含 ≥1 个 `github.com/xxx/xxx` 仓库链接 **且** 帖子主题是推荐/介绍工具库 | **GitHub 推荐帖** | → 执行 **路径 C** | | yt-dlp 检测到视频(有 duration/vcodec) | **视频帖** | → 执行 **路径 B** + 路径 A 的文本提取 | | 推文引用了 `x.com/i/article/xxx`(X Article),text 中无代码块 | **Article 引用帖** | → 记录,但**跳过 Article 内容**(Article 需登录);xreach text 的描述性文字作为参考 | | 推文引用了 `x.