Skip to main content
ClaudeWave
Skill1.2k estrellas del repoactualizado yesterday

x-scraper

x-scraper enables automated scraping of X (Twitter) content through a browser connected to Chrome DevTools Protocol. It provides two scripts: one captures tweets from specified user timelines with optional keyword filtering, and another retrieves the logged-in user's home feed (For You or Following tabs). Output supports Markdown, RSS, and JSON formats, making it useful for timeline archival, keyword monitoring, and feed aggregation workflows.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/inclusionAI/AWorld /tmp/x-scraper && cp -r /tmp/x-scraper/examples/skill_agent/skills/x-scraper ~/.claude/skills/x-scraper
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# X 抓取 (x-scraper)

## 概述

通过已连接 CDP 的浏览器(agent-browser)抓取 X (Twitter) 内容,包含两个脚本:

1. **scrape_x_user.sh** — 抓取指定用户时间线,可选关键词过滤
2. **scrape_x_home.sh** — 抓取当前登录用户的首页推荐流(For you / Following)

输出格式统一支持 Markdown / RSS / JSON。

## 工具路径

- 用户抓取:`./scrape_x_user.sh`
- 首页推荐:`./scrape_x_home.sh`
- 依赖:`agent-browser`(CDP 已连接且已登录 X)、`python3`

---

## 1. 用户帖子抓取 (scrape_x_user.sh)

按用户名抓取最新帖子,可选关键词搜索过滤。

### 用法

```bash
././scrape_x_user.sh [-u <username>] [-k <keyword>] [-p <cdp_port>] [-n <max_scrolls>] [-o <output_file>] [-f <format>]
```

### 参数

| 参数 | 说明 | 默认 |
|------|------|------|
| `-u` | X 用户名(不带 @) | Alibaba_Qwen |
| `-k` | 搜索关键词(可选,不指定则抓取用户全部最新帖子) | - |
| `-p` | CDP 端口 | 9222 |
| `-n` | 最大滚动次数 | 10 |
| `-o` | 输出文件路径 | stdout |
| `-f` | 格式:`md` \| `rss` \| `json` | md |

### 示例

```bash
././scrape_x_user.sh
././scrape_x_user.sh -k qwen3
././scrape_x_user.sh -u chenchengpro -k claw -f rss -o feed.xml
././scrape_x_user.sh -u chenchengpro -f json -n 20 -o data.json
```

---

## 2. 首页推荐流抓取 (scrape_x_home.sh)

抓取当前登录用户的 X 首页推荐内容,支持 For you / Following 两个 Tab 切换。

### 用法

```bash
././scrape_x_home.sh [-t <tab>] [-p <cdp_port>] [-n <max_scrolls>] [-o <output_file>] [-f <format>]
```

### 参数

| 参数 | 说明 | 默认 |
|------|------|------|
| `-t` | 推荐 Tab:`foryou` \| `following` | foryou |
| `-p` | CDP 端口 | 9222 |
| `-n` | 最大滚动次数 | 5 |
| `-o` | 输出文件路径 | stdout |
| `-f` | 格式:`md` \| `rss` \| `json` | md |

### 输出字段

每条帖子包含:`author`(作者名 + handle)、`time`(ISO 时间戳)、`text`(正文)、`link`(帖子链接)、`hasMedia`(是否含图片/视频)、`retweet`(转推/置顶上下文)

### 示例

```bash
././scrape_x_home.sh                           # 抓取 For you 推荐流
././scrape_x_home.sh -t following -n 10        # 抓取 Following 时间线
././scrape_x_home.sh -f json -o feed.json      # JSON 输出到文件
././scrape_x_home.sh -n 3 -f rss -o home.xml   # 少量抓取,RSS 输出
```
ad_image_createSkill

Create ad-ready product images (single or collage) by back-solving sub-image sizes from target output ratio, grounding scene design with media_comprehension, generating images via image_generator with strict request params and actor-count control, and pairing each deliverable with a short social tagline for 小红书/抖音.

ad_video_createSkill

Create ad-ready product video from product images, with or without character/subject images. The workflow leverages AI-powered image composition, scene understanding, and video generation. Video prompts should follow commercial shot language—visual hooks, product presence, hero shots, detail showcase, function expression, and dynamic visuals.

agent-browserSkill

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

app_evaluatorSkill

A professional skill for App Evaluation (evaluating app's performance with score) and App Improvement (giving professional suggestions for improving the app's performance).

embedded-video-pip-smooth-playbackSkill

>-

last_7_days_newsSkill

Search and summarize the latest 7 days of AI news and X discussions using public sources plus browser-based X collection. Use for recent AI news, trends, X discussions, industry briefs, and summaries organized into hot topics, viewpoints, and opportunity areas.

media_comprehensionSkill

An intelligent assistant specialized in handling media files (images/audio/video). **Only for media file analysis**, does not handle document types.\n\n✅ Media files that can be processed:\n- Images: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg\n- Audio: .mp3, .wav, .m4a, .flac, .aac, .ogg\n- Video: .mp4, .avi, .mov, .mkv, .webm, .flv\n\n❌ Files that cannot be processed (please do not trigger this skill):\n- Documents: .pdf, .doc, .docx, .txt, .md, .rtf\n- Spreadsheets: .xlsx, .xls, .csv, .tsv\n- Presentations: .pptx, .ppt, .key\n- Code: .py, .js, .ts, .java, .cpp, .go, .rs\n- Archives: .zip, .tar, .gz, .rar, .7z\n- Executables: .exe, .bin, .app, .dmg\n- Databases: .db, .sqlite, .sql\n- Configuration files: .json, .xml, .yaml, .yml, .toml, .ini\n- Web pages: .html, .htm, .css\n\n**Trigger conditions**: When the user explicitly requests to analyze image/audio/video content, or when the file extension belongs to the aforementioned media types.".

optimizerSkill

Analyzes and automatically optimizes existing agents by improving system prompts and tool configuration.