X Twitter Reader
Use this skill to acquire source content from X/Twitter. Translation, summarization, critique, or archiving are downstream tasks; first extract the original post, thread, or Article faithfully.
What This Skill Returns
Prefer structured content over visual page scraping. A good extraction includes:
- original source URL and resolved X/Twitter URL when available
- post id, author name, screen name, timestamp, and language
- engagement metrics when available: likes, reposts, replies, quotes, views, bookmarks
- post text and linked URLs
- media references with type, URL, width, and height when available
- long-form Article title and full Article text when present
- reply-thread items when the user asks for thread or conversation context
Do not translate, summarize, or rewrite during extraction unless the user explicitly asks for that downstream output. If the user asks to translate an X URL, first extract with this skill, then translate the extracted content.
Primary Workflow
Prerequisites and privacy boundary:
- Require
uv; check with command -v uv and stop if it is unavailable. Do
not install it implicitly.
- The bundled script pins the PyPI package
twitter-cli==0.8.5 and requires
Python 3.10+. uv may download the fixed dependency and a compatible Python
into its cache on first run.
twitter-cli may reuse TWITTER_AUTH_TOKEN / TWITTER_CT0 or a logged-in
Arc, Chrome, Edge, Firefox, or Brave session. Tell the user before the first
credentialed run and obtain approval. Never print or persist cookies or
tokens.
Normalize the URL:
- Accept only HTTPS
x.com and twitter.com URLs.
- Reject
t.co; ask for the expanded X/Twitter URL instead of following a
redirect that may target an unrelated site.
- Preserve the original URL in the output metadata.
- Ignore URL query parameters when identifying the status id.
Run the bundled extractor from this skill directory:
uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format markdown
For machine-readable output or debugging, request JSON:
uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format json
If the user wants a saved artifact, pass --output:
uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format markdown --output /tmp/x-content.md
Only use browser snapshots when the structured extractor fails or when the user asks about visual layout. X pages often hide Articles behind login, so snapshots are not authoritative for long-form content.
Choosing Modes
The extractor defaults to --mode auto:
- For normal status URLs, it calls
twitter tweet --json and emits the main post plus available replies.
- If the post contains Article fields, it emits the Article title and full Article text.
- For Article-looking URLs, it tries Article extraction first.
- It does not contact Jina Reader unless the user explicitly approves that
third-party fallback and the command includes
--allow-jina.
Use explicit modes when needed:
# Long-form Article only
uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode article --format markdown
# Post and replies
uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode tweet --format markdown
# Explicit Jina fallback
uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode jina --allow-jina --format markdown
Jina Reader receives the query-free X URL and may cache or meter the request.
Use it only for public URLs after approval. The script ignores ambient
JINA_API_KEY by default; add --use-jina-api-key only when the user explicitly
authorizes use of that configured credential.
Output Guidance
When reporting extraction results to the user:
- State whether the result is a post, reply thread, Article, or fallback reader output.
- Keep the original content separate from downstream analysis.
- Preserve headings, bullet lists, blockquotes, and code-like snippets in Article text.
- If media was not downloaded, say that media URLs were collected but not downloaded.
- If extraction is partial, explicitly say what failed and which fallback was used.
For long outputs, save the Markdown to /tmp or a user-requested path and summarize the location plus key metadata in chat.
Common Failures And Fallbacks
twitter-cli package missing: run the bundled script through the documented
uv run --no-project --python 3.10 ... command instead of calling python
directly.
- X page requires login: do not stop at browser login; use the structured extractor.
- Article text missing in
tweet mode: rerun with --mode article.
- Jina returns only a preview or fails: prefer
twitter-cli data. Jina is an
explicitly authorized fallback, not the source of truth.
- Rate limits or upstream X changes: return the exact command, error text, and attempted fallback so the user can decide whether to retry later.
Verification Checklist
Before treating extraction as successful, confirm at least one of these is true:
- the JSON contains
articleTitle and non-empty articleText for an Article;
- the JSON contains non-empty
text for the requested post;
- the Markdown output includes source metadata and non-empty content;
- for media requests, media URLs are present or the extractor explicitly reports none.
1---2name: x-twitter-reader3description: Fetch original posts, threads, Articles, metadata, links, and media from X/Twitter URLs. Use when a task depends on the source content.4---56# X Twitter Reader78Use this skill to acquire source content from X/Twitter. Translation, summarization, critique, or archiving are downstream tasks; first extract the original post, thread, or Article faithfully.910## What This Skill Returns1112Prefer structured content over visual page scraping. A good extraction includes:1314- original source URL and resolved X/Twitter URL when available15- post id, author name, screen name, timestamp, and language16- engagement metrics when available: likes, reposts, replies, quotes, views, bookmarks17- post text and linked URLs18- media references with type, URL, width, and height when available19- long-form Article title and full Article text when present20- reply-thread items when the user asks for thread or conversation context2122Do not translate, summarize, or rewrite during extraction unless the user explicitly asks for that downstream output. If the user asks to translate an X URL, first extract with this skill, then translate the extracted content.2324## Primary Workflow2526Prerequisites and privacy boundary:2728- Require `uv`; check with `command -v uv` and stop if it is unavailable. Do29 not install it implicitly.30- The bundled script pins the PyPI package `twitter-cli==0.8.5` and requires31 Python 3.10+. `uv` may download the fixed dependency and a compatible Python32 into its cache on first run.33- `twitter-cli` may reuse `TWITTER_AUTH_TOKEN` / `TWITTER_CT0` or a logged-in34 Arc, Chrome, Edge, Firefox, or Brave session. Tell the user before the first35 credentialed run and obtain approval. Never print or persist cookies or36 tokens.37381. Normalize the URL:39 - Accept only HTTPS `x.com` and `twitter.com` URLs.40 - Reject `t.co`; ask for the expanded X/Twitter URL instead of following a41 redirect that may target an unrelated site.42 - Preserve the original URL in the output metadata.43 - Ignore URL query parameters when identifying the status id.442. Run the bundled extractor from this skill directory:4546 ```bash47 uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format markdown48 ```49503. For machine-readable output or debugging, request JSON:5152 ```bash53 uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format json54 ```55564. If the user wants a saved artifact, pass `--output`:5758 ```bash59 uv run --no-project --python 3.10 scripts/fetch_x_content.py 'https://x.com/user/status/123' --format markdown --output /tmp/x-content.md60 ```61625. Only use browser snapshots when the structured extractor fails or when the user asks about visual layout. X pages often hide Articles behind login, so snapshots are not authoritative for long-form content.6364## Choosing Modes6566The extractor defaults to `--mode auto`:6768- For normal status URLs, it calls `twitter tweet --json` and emits the main post plus available replies.69- If the post contains Article fields, it emits the Article title and full Article text.70- For Article-looking URLs, it tries Article extraction first.71- It does not contact Jina Reader unless the user explicitly approves that72 third-party fallback and the command includes `--allow-jina`.7374Use explicit modes when needed:7576```bash77# Long-form Article only78uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode article --format markdown7980# Post and replies81uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode tweet --format markdown8283# Explicit Jina fallback84uv run --no-project --python 3.10 scripts/fetch_x_content.py URL --mode jina --allow-jina --format markdown85```8687Jina Reader receives the query-free X URL and may cache or meter the request.88Use it only for public URLs after approval. The script ignores ambient89`JINA_API_KEY` by default; add `--use-jina-api-key` only when the user explicitly90authorizes use of that configured credential.9192## Output Guidance9394When reporting extraction results to the user:9596- State whether the result is a post, reply thread, Article, or fallback reader output.97- Keep the original content separate from downstream analysis.98- Preserve headings, bullet lists, blockquotes, and code-like snippets in Article text.99- If media was not downloaded, say that media URLs were collected but not downloaded.100- If extraction is partial, explicitly say what failed and which fallback was used.101102For long outputs, save the Markdown to `/tmp` or a user-requested path and summarize the location plus key metadata in chat.103104## Common Failures And Fallbacks105106- `twitter-cli` package missing: run the bundled script through the documented107 `uv run --no-project --python 3.10 ...` command instead of calling `python`108 directly.109- X page requires login: do not stop at browser login; use the structured extractor.110- Article text missing in `tweet` mode: rerun with `--mode article`.111- Jina returns only a preview or fails: prefer `twitter-cli` data. Jina is an112 explicitly authorized fallback, not the source of truth.113- Rate limits or upstream X changes: return the exact command, error text, and attempted fallback so the user can decide whether to retry later.114115## Verification Checklist116117Before treating extraction as successful, confirm at least one of these is true:118119- the JSON contains `articleTitle` and non-empty `articleText` for an Article;120- the JSON contains non-empty `text` for the requested post;121- the Markdown output includes source metadata and non-empty content;122- for media requests, media URLs are present or the extractor explicitly reports none.