twitter-x-scraping

twitter-x-scraping is a skill for Claude Code, Codex from swyxio/skills. It costs 37 tokens per session (3,752 once invoked), scanned A, original, MIT.

A web-scraping guide for collecting public posts from Twitter/X through Nitter-style mirror sites, with a browser fallback when an anti-bot challenge appears. It supports profiles, lists, and paginated results.

In plain words
What is it for?
Use it to gather posts from Twitter/X profiles or lists within a time window.
Why use it?
It provides a way to collect public timeline data without depending on a Twitter API key and handles pages that reject ordinary requests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to gather posts from Twitter/X profiles or lists within a time window.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/swyxio/skills/twitter-x-scraping
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add swyxio/skills --skill twitter-x-scraping
Clone the repo
git clone --depth 1 https://github.com/swyxio/skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for twitter-x-scraping

README.md
[![agentmods](https://agentmods.dev/badge/skills/swyxio/skills/twitter-x-scraping/github.svg)](https://agentmods.dev/skills/swyxio/skills/twitter-x-scraping)
Your own site
<a href="https://agentmods.dev/skills/swyxio/skills/twitter-x-scraping"><img src="https://agentmods.dev/badge/skills/swyxio/skills/twitter-x-scraping/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for twitter-x-scraping

Your own site · 80×15
<a href="https://agentmods.dev/skills/swyxio/skills/twitter-x-scraping"><img src="https://agentmods.dev/badge/skills/swyxio/skills/twitter-x-scraping.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 386
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.03752
Opus 5.5 $0.00015 $0.01501
Sonnet 5.5 $0.00007 $0.00750
Haiku 4.5 $0.00004 $0.00375

Measured 3mo ago against content hash f6992fc7332d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

twitter-x-scraping scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const res = await axios.get(url, {
twitter-x-scraping/SKILL.md · 412 lines

How it starts

The opening of the file, as written. The whole thing — 412 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: Scraping Nitter.net for Tweets

This codebase scrapes nitter.net — an open-source Twitter frontend — to collect tweets from a list or profile within a time window. The technique works without a Twitter API key.

Core Methodology

1. URL Structure

Nitter mirrors Twitter's URL layout:

Target Nitter path
Twitter List /i/lists/<listId>
User Profile /<handle>
Paginated append ?cursor=<cursor>

2. Fetch Strategy: axios → Playwright fallback

Start with plain HTTP (axios). If nitter serves an anti-bot challenge page (detected by the string "Verifying your request" in the HTML), permanently switch to a headed Playwright/Chrome session for the rest of the run.

// challengeSolver.ts — detect challenge
const CHALLENGE_MARKER = 'Verifying your request';
export function isChallengePage(html: string): boolean {
  return html.includes(CHALLENGE_MARKER);
}

// scrapeNitterList.ts — switch modes on detection
if (isChallengePage(html)) {
  useBrowserMode = true;
  const browserHtml = await fetchWithBrowser(url, debug);
  return { html: browserHtml, url };
}

3. Browser Anti-bot Bypass

When challenge is detected, launch a real system Chrome (not headless) with automation signals suppressed:

import { chromium } from 'playwright';

const browser = await chromium.launch({
  channel: 'chrome',
  headless: false,
  args: ['--disable-blink-features=AutomationControlled'],
});

const context = await browser.newContext({ locale: 'en-US' });
await context.addInitScript(() => {
  Object.defineProperty(navigator, 'webdriver', { get: () => undefined });
});

const page = await context.newPage();
await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 });

// Wait for challenge to auto-resolve
await page.waitForSelector('.timeline-item', { timeout: 30000 });
const html = await page.content();

Key: reuse a single browser/page instance across all subsequent fetches (singleton pattern) — don't re-launch per page.

Read the full file on GitHub · 412 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 412 lines · 37 tokens per session scan A f6992fc7332d

Subscribe to this mod's changes

twitter-x-scraping is a skill published in the GitHub repository swyxio/skills (203 stars, last pushed 8d ago), licensed MIT. It adds 37 tokens to every session and 3,752 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

twitter-x-scraping compared with skills from other repositories

twitter-x-scraping next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
twitter-x-scrapingswyxio/skillsSkill2038d agoMITA37Claude Code, Codex
gold-triagechromium/chromiumSkill26ktodayBSD-3-ClauseA104Claude Code, Codex
android-multiprofilechromium/chromiumSkill26ktodayBSD-3-ClauseA73Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k10d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.3ktodayMITA43Claude Code
cua-driverdavidondrej/skillsSkill4.4ktodayMITA68Claude Code, Codex
open-design-browsercompozy/compozySkill2.9kyesterdayMITA56Claude Code, Codex