agentleFS
patrick-fupatrick-fu/awesome-skills/x-twitter-reader/SKILL.md

x-twitter-reader

Skill69 starsChanged 11 days agoMITView on GitHub

Fetch original posts, threads, Articles, metadata, links, and media from X/Twitter URLs. Use when a task depends on the source content.

  • Reads credentials

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to acquire source content from X/Twitter.

    line 10
  2. Distinctive:

    Prefer structured content over visual page scraping.

    line 14
  3. Distinctive:

    Do not translate, summarize, or rewrite during extraction unless the user explicitly asks for that downstream output.

    line 24
  4. Distinctive:

    Run the bundled extractor from this skill directory:

    line 46
  5. Very specific:

    If the user wants a saved artifact, pass --output:

    line 58
  6. Distinctive:

    Only use browser snapshots when the structured extractor fails or when the user asks about visual layout.

    line 64
  7. Distinctive:

    If the post contains Article fields, it emits the Article title and full Article text.

    line 71
  8. Distinctive:

    Use explicit modes when needed:

    line 76
  9. Very specific:

    Use it only for public URLs after approval.

    line 90
  10. Distinctive:

    When reporting extraction results to the user:

    line 96
  11. Distinctive:

    Keep the original content separate from downstream analysis.

    line 99
  12. Distinctive:

    If media was not downloaded, say that media URLs were collected but not downloaded.

    line 101
  13. Distinctive:

    If extraction is partial, explicitly say what failed and which fallback was used.

    line 102
  14. Distinctive:

    Before treating extraction as successful, confirm at least one of these is true:

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.
  1. 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.
  2. 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
  3. 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
  4. 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
  5. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.