x-tweet-by-handle
Scrapes tweets from an X (Twitter) user profile timeline given a handle, with selectable mode: tweets, tweets+replies, or media-only. Returns normalized per-tweet data including text, author profile, engagement counts, media, hashtags, mentions, and cursor for pagination
Install / Use
npx skills add browser-act/skills --skill x-tweet-by-handleInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of x-tweet-by-handle
x-tweet-by-handle scores 91/100 on our quality scale, 1017th of 4,698 Development & Engineering skills we index (top 22%).
Its SKILL.md is 10 KB long, well organised into 14 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 6,001 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so x-tweet-by-handle is actively maintained.
- Our last check on 2026-10-28 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit ā read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-06. Automated pattern scan on 2026-10-06. It catches known dangerous patterns, not every risk ā read a skill before letting an agent act on it.
x-tweet-by-handle compared with similar skills
All 4 of these similar skills score higher than x-tweet-by-handle; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| x-tweet-by-handle (this skill)by browser-act | 91 | 6.0k | 3mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install x-tweet-by-handle?
- Run
npx skills add browser-act/skills --skill x-tweet-by-handle. The install tabs above show the steps for each supported agent. - Which AI agents does x-tweet-by-handle work with?
- It is written for Cursor and Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is x-tweet-by-handle safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is x-tweet-by-handle still maintained?
- The repository was last updated about 3 months ago, so x-tweet-by-handle is actively maintained.
Skill content
View source on GitHubname: x-tweet-by-handle description: "Scrapes tweets from an X (Twitter) user profile timeline given a handle, with selectable mode: tweets, tweets+replies, or media-only. Returns normalized per-tweet data including text, author profile, engagement counts, media, hashtags, mentions, and cursor for pagination. Use when user mentions X user tweets, Twitter user tweets, profile timeline, user feed, @handle tweets, scrape Twitter user, scrape X account, get all tweets from a user, scrape user timeline, download user posts, export tweets from user, with_replies tab, replies tab Twitter, media tab Twitter, photos of user Twitter, videos of user Twitter, latest tweets from user, recent tweets from account, KOL tweets, influencer tweet history, account post extraction, twitter handle scraper, x handle scraper, get tweets by username, monitor a Twitter account, monitor an X account, daily tweet export from handle, scrape from:username, twitter profile posts, x profile posts, by handle, by username. Also applies to building a creator backlog, tracking competitor accounts, populating quote-tweet research datasets, or any paginated bulk collection driven by a single user handle."
X ā Tweets by Handle
X handle + timeline mode ā normalized list of that user's tweets (or replies / media-only) with author, engagement, media, cursor.
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Collect tweets from one or more X user profile timelines, selectable between the default tweets tab, the tweets-and-replies tab, and the media-only tab, returning structured per-tweet data and pagination cursors.
Prerequisites
- Active X session in the browser (left sidebar shows logged-in avatar / @handle).
- Network capture is enabled in the browser-act session.
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session ā skip this step.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
2. Login Verification
If login status for X has been confirmed in the current session ā skip this step.
Otherwise: open https://x.com and observe the left sidebar:
- User avatar or @handle visible ā logged in, continue
- "Sign in" / "Log in" prompt visible ā not logged in, inform the user and assist the login flow
User refuses or cannot log in ā terminate execution.
Capability Components
This Skill's operational boundary = what the user can manually do in their browser. It only reads tweet data already shown to the user, never bypassing authentication. The browser's own JS signs the GraphQL request; the Skill triggers it via URL navigation and reads the response from network traffic. Python scripts under
scripts/only build URLs and parse responses ā they do not call X directly. Run them through the bash tool.
Network Capture: profile timeline (tweets / replies / media)
Step 1 ā build the profile URL for the desired mode:
URL=$(python scripts/build-profile-url.py '{handle}' --mode {mode})
Parameters:
handle(positional): X handle without@, case-insensitive.--mode: one oftweets(default ā triggersUserTweets),replies(triggersUserTweetsAndReplies),media(triggersUserMedia).
Step 2 ā navigate and capture the first page:
network requests --clearnavigate "$URL"wait stable --timeout 25000(timeout is normal on X; proceed even if it fires)- Determine the endpoint name to filter by ā
UserTweets,UserTweetsAndReplies, orUserMediamatching the chosen mode:network requests --type xhr,fetch --filter UserTweets(when--mode tweets)network requests --type xhr,fetch --filter UserTweetsAndReplies(when--mode replies)network requests --type xhr,fetch --filter UserMedia(when--mode media)
- Take the latest matching entry's
request_id. network request <request_id>ā save full output to a file (e.g.tmp/x-profile-page-1.txt).- Parse with the matching
--sourceflag:python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_tweets(fortweets)python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_replies(forreplies)python scripts/parse-tweets.py --json-file tmp/x-profile-page-1.txt --source user_media(formedia)
Endpoint characteristic: URL contains /i/api/graphql/<hash>/UserTweets (or UserTweetsAndReplies / UserMedia). The query hash rotates; always filter by name.
Step 3 ā paginate via scroll:
network requests --clearscroll down --amount 5000wait stable --timeout 10000network requests --type xhr,fetch --filter <EndpointName>ā take the newest entry'srequest_idnetwork request <request_id>ā save totmp/x-profile-page-N.txtpython scripts/parse-tweets.py --json-file tmp/x-profile-page-N.txt --source <source>
Repeat Step 3 until any termination condition is met:
- Accumulated unique tweet count reaches the user's target.
count == 0on the current page.cursor_bottomis unchanged across two consecutive pages.
Error handling: if no matching request appears after a scroll, wait 3 s and retry once. If the page redirects to a "This account doesn't exist" or "Account suspended" view (visible in state output), terminate with an explanatory result. Pinned tweets appear at the top of the first page ā they are normal tweets and are included in the output; de-duplicate by id when merging if a pinned tweet would also appear later in chronological order.
Output example:
{
"tweets": [
{
"type": "tweet",
"id": "2068333045510291908",
"url": "https://x.com/NASA/status/2068333045510291908",
"twitter_url": "https://twitter.com/NASA/status/2068333045510291908",
"text": "The official FIFA World Cup ball went to space! ...",
"created_at": "Thu Jun 20 18:30:11 +0000 2026",
"lang": "en",
"source": "Twitter Web App",
"retweet_count": 4586,
"reply_count": 1812,
"like_count": 24499,
"quote_count": 240,
"bookmark_count": 1730,
"view_count": 2098235,
"is_reply": false,
"is_retweet": false,
"is_quote": false,
"quote_id": null,
"quote_url": null,
"in_reply_to_id": null,
"in_reply_to_user": null,
"in_reply_to_user_id": null,
"conversation_id": "2068333045510291908",
"hashtags": ["FIFAWorldCup"],
"mentions": [],
"urls": [],
"media": [
{"type": "photo", "url": "https://pbs.twimg.com/media/abcd.jpg", "expanded_url": "https://x.com/NASA/status/2068333045510291908/photo/1", "alt_text": null}
],
"card": null,
"place": null,
"author": {
"id": "11348282",
"user_name": "NASA",
"name": "NASA",
"url": "https://x.com/NASA",
"is_verified": false,
"is_blue_verified": true,
"verified_type": "Government",
"profile_picture": "https://pbs.twimg.com/profile_images/.../photo.jpg",
"description": "Explore the universe ...",
"location": "Pale Blue Dot",
"followers": 92137231,
"following": 305,
"created_at": "Wed Dec 19 20:20:32 +0000 2007"
}
}
],
"count": 20,
"cursor_top": "DAAHCgABHLo27Q8__-s...",
"cursor_bottom": "DAAHCgABHLo27Q8__-s..."
}
Pagination
Network Capture Pagination: triggered by scroll down. X's page JS inserts the previous response's cursor_bottom into the next request's variables.cursor. Termination: count == 0, cursor_bottom does not advance across two consecutive pages, or user target reached.
Success Criteria
count >= 1 on the first page (unless the account has zero tweets in the chosen mode) AND every tweet has non-null id, text, created_at, author.user_name, like_count, retweet_count, reply_count AND each subsequent page's cursor_bottom differs from the previous page's until termination.
Known Limitations
- Protected (locked) accounts return zero tweets unless the logged-in session follows that account.
- Suspended or deleted accounts return an error page; the Skill will detect via empty
countand a redirect to/account_suspendedor/account/accessand terminate the loop. view_countisnullfor very new or low-traffic tweets where X has not yet emittedviews.count.--mode mediareturns tweets that contain native media only; pure-text or quote-only tweets are skipped by X server-side.- Sustained polling triggers per-session throttling; stay under ~150 timeline calls per 15-minute window per session (
x-rate-limit-remainingshows the live budget). - The page may never reach
network-idle;wait stablewill frequently time out ā proceed to read network anyway.
Execution Efficiency
- Batch orchestration: write a bash script that iterates handles serially in one session; for parallelism, fan out across multiple stealth browsers each with its own login.
- Test before batch execution: run one handle end-to-end (page 1 + page 2) first.
- Reduce redundant pre-operations: keep the same session for many sequential handles ā
navigatereuses the SPA. - Error resumption: persist
cursor_bottom+ accumulated tweet IDs to disk after every page; a crash mid-batch resumes from the last good cursor. - De-duplicate by
id: pinned tweets reappear when chronological order catches up; merge byid.
Experience Notes
Path: {working-directory}/browser-act-skill-forge-memories/x-tweet-scraper-x-tweet-by-handle.memory.md (working directory is determined by the Agent running the Skill, typically the project root or current working directory)
Before execution: If the file exists, read it first ā it records unexpected situations encountered during past executions (e.g., a strategy has become ineffective); adjust strategy order accordingly.
After execution: If an unexpected situation is encountered (strategy became ineffective, page redesigned, anti-scraping upgraded, better path discovered), append a line:
{YYYY-MM-DD}: {what happened} ā {conclusion}
Normal execution does not write to the file. Do not record what handle was scraped or how many tweets were returned ā those are task outputs, not experience.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code ā from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k𤯠LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit ā see the Safety scan above for what the skill file itself contains.
