Skip to main content

x-reader

Read X/Twitter posts and replies. Use when user shares an x.com, twitter.com, or adhx.com link and wants to read, summarize, or analyze the post content and/or comment replies.

الانتقال إلى التثبيت

معلومات المصدر

المستودع
XHXIAIEIN/x-reader
آخر نشاط في المصدر
١٥ أبريل ٢٠٢٦ في ٠٤:٥١
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٠
التفرعات
٠

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

مستكشف الملفات
2 ملفات

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
x-reader
description
Read X/Twitter posts and replies. Use when user shares an x.com, twitter.com, or adhx.com link and wants to read, summarize, or analyze the post content and/or comment replies.
when_to_use
Trigger when the user pastes a URL matching x.com/*/status/*, twitter.com/*/status/*, or adhx.com/*/status/*. Also trigger on explicit requests like "read this tweet", "what does this post say", "show me the replies".
argument-hint
[tweet-url]
allowed-tools
["Bash(curl *)","Bash(python3 *)","mcp__plugin_chrome-devtools-mcp_chrome-devtools__select_page","mcp__plugin_chrome-devtools-mcp_chrome-devtools__list_pages","mcp__plugin_chrome-devtools-mcp_chrome-devtools__navigate_page","mcp__plugin_chrome-devtools-mcp_chrome-devtools__list_network_requests","mcp__plugin_chrome-devtools-mcp_chrome-devtools__get_network_request"]
# X/Twitter Post Reader Read tweet content and replies without Twitter API credentials. ## URL Parsing Extract `{username}` and `{statusId}` from the URL path segments. Supported formats: - `https://x.com/{user}/status/{id}` - `https://twitter.com/{user}/status/{id}` - `https://adhx.com/{user}/status/{id}` - `https://x.com/{user}/article/{id}` (long-form articles — use statusId from URL) ## Step 1: Fetch Tweet Content (ADHX API) ```bash curl -s "https://adhx.com/api/share/tweet/{username}/{statusId}" ``` No auth required. Returns JSON with these fields: - `text` — tweet body (empty string for article-only posts) - `author` — `{name, username, avatarUrl}` - `engagement` — `{replies, retweets, likes, views}` - `article` — present ONLY for long-form X Articles: - `article.title` — article title - `article.content` — full article body as Markdown (includes `![](url)` image references) - `article.coverImageUrl` — hero image **Handling articles vs tweets:** - If `article` field exists → the post is a long-form article. Use `article.title` and `article.content` for the body. - If `article` field is absent → regular tweet. Use `text` for the body. **Fallback** if ADHX is down: ```bash curl -s "https://api.fxtwitter.com/{username}/status/{statusId}" ``` ## Step 2: Fetch Replies (DevTools Network Interception) Replies are not available via any free API. Instead, intercept X.com's own GraphQL request: 1. **Find or open the X.com tab** via chrome-devtools-mcp: - `list_pages` to check if the tweet is already open - `select_page` to select the X.com tab, or `navigate_page` to open the tweet URL 2. **Navigate to the tweet page**: ``` navigate_page(type="url", url="https://x.com/{username}/status/{statusId}") ``` 3. **List network requests** filtered to fetch/xhr: ``` list_network_requests(resourceTypes=["fetch", "xhr"]) ``` 4. **Find the TweetDetail request** — look for a request URL containing `/graphql/` and `TweetDetail` with `focalTweetId` matching the statusId. 5. **Save the response** to a temp file: ``` get_network_request(reqid=<id>, responseFilePath="D:/Agent/tmp/tweet-replies-{statusId}.json") ``` 6. **Parse replies** using the bundled script: ```bash python3 ${CLAUDE_SKILL_DIR}/scripts/parse_replies.py "D:/Agent/tmp/tweet-replies-{statusId}.json" ``` The script returns JSON: ```json { "replies": [ {"author": "...", "username": "...", "text": "...", "likes": 123, ...} ], "cursor": "pagination_cursor_or_null" } ``` ## Step 3: Present Results Combine tweet content and replies into a readable summary: 1. **Tweet header**: author, date, engagement stats 2. **Tweet body**: full text (summarize if user asks) 3. **Top replies**: sorted by likes, show author + text + likes count ## Fallback If chrome-devtools-mcp is unavailable (no Chrome open, no DevTools connection), skip Step 2 and inform the user that only the tweet body is available without replies. ## Notes - ADHX API is free, no auth, no rate limit (be polite) - DevTools interception uses the user's logged-in Chrome session - Each page load returns ~30 top replies (ranked by relevance) - Clean up temp files in `D:/Agent/tmp/` after parsing
عرض على GitHub