AGENT SKILL

x-extract

Extract tweet content from x.com URLs without credentials using browser automation. Use when user asks to "extract tweet", "download x.com link", "get tweet content", or provides x.com/twitter.com URLs for content extraction. Works without Twitter API credentials.

License 许可
MIT
最近更新
2026-06-07
Stars
★ 0
Forks
1

01 前言 Front Matter

name
x-extract
description
Extract tweet content from x.com URLs without credentials using browser automation. Use when user asks to "extract tweet", "download x.com link", "get tweet content", or provides x.com/twitter.com URLs for content extraction. Works without Twitter API credentials.

03 SKILL.md 正文

X.com Tweet Extraction

Extract tweet content (text, media, author, metadata) from x.com URLs without requiring Twitter/X credentials.

How It Works

Uses OpenClaw's browser tool to load the tweet page, then extracts content from the rendered HTML.

Workflow

1. Validate URL

Check that the URL is a valid x.com/twitter.com tweet:

  • Must contain x.com/*/status/ or twitter.com/*/status/
  • Extract tweet ID from URL pattern: /status/(\d+)

2. Open in Browser

browser action=open profile=openclaw targetUrl=<x.com-url>

Wait for page load (targetId returned).

3. Capture Snapshot

browser action=snapshot targetId=<TARGET_ID> snapshotFormat=aria

4. Extract Content

From the snapshot, extract:

Required fields:

  • Tweet text: Look for role=article containing the main tweet content
  • Author: role=link with author name/handle (usually @username format)
  • Timestamp: role=time element

Optional fields:

  • Media: role=img or role=link containing /photo/, /video/
  • Engagement: Like count, retweet count, reply count (in role=group or role=button)
  • Thread context: If tweet is part of thread, note previous/next tweet references

5. Format Output

Output as structured markdown:

# Tweet by @username

**Author:** Full Name (@handle)  
**Posted:** YYYY-MM-DD HH:MM  
**Source:** <original-url>

---

<Tweet text content here>

---

**Media:**
- ![Image 1](<media-url-1>)
- ![Image 2](<media-url-2>)

**Engagement:**
- 👍 Likes: 1,234
- 🔄 Retweets: 567
- 💬 Replies: 89

**Thread:** [Part 2/5] | [View full thread](<thread-url>)

6. Download Media (Optional)

If user requests --download-media or "download images":

  1. Extract all media URLs from snapshot
  2. Use exec with curl or wget to download:
    curl -L -o "tweet-{tweetId}-image-{n}.jpg" "<media-url>"
    
  3. Report downloaded files with paths

Error Handling

If page fails to load:

  • Check if URL is valid
  • Try alternative: replace x.com with twitter.com (still works)
  • Some tweets may require login (controversial, age-restricted) - report to user

If content extraction fails:

  • X.com layout may have changed - check references/selectors.md
  • Provide raw snapshot to user for manual review
  • Report which fields were successfully extracted

Common Selectors

See references/selectors.md for detailed CSS/ARIA selectors used by x.com (updated as layout changes).

Limitations

  • No credentials: Cannot access protected tweets, DMs, or login-required content
  • Rate limiting: X.com may block excessive automated requests
  • Layout changes: Selectors may break if X updates their HTML structure
  • Dynamic content: Some content (comments, threads) may load lazily

Examples

Extract single tweet:

User: "Extract this tweet: https://x.com/vista8/status/2019651804062241077"
Agent: [Opens browser, captures snapshot, formats markdown output]

Extract with media download:

User: "Get the tweet text and download all images from https://x.com/user/status/123"
Agent: [Extracts content, downloads images to ./downloads/, reports paths]

Thread extraction:

User: "Extract this thread: https://x.com/user/status/456"
Agent: [Detects thread, extracts all tweets in sequence, formats as numbered list]

04 同仓库更多 Skills

javimosch
javimosch/open-claw-skills

crowd-prompting

A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.

★ 0
javimosch
javimosch/open-claw-skills

ceaser

Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).

★ 0
javimosch
javimosch/open-claw-skills

ceaser-send

Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.

★ 0
javimosch
javimosch/open-claw-skills

dilemm-ai

Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).

★ 0
javimosch
javimosch/open-claw-skills

moldium

Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.

★ 0
javimosch
javimosch/open-claw-skills

arxiv-paper-reviews

Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.

★ 0