twitter-x
Skill9 starsChanged 7 months agoMITView on GitHub
Read, capture, compose, analyze, or post Twitter/X content. ALWAYS use this skill the moment a Twitter/X link is shared or mentioned — any x.com or twitter.com URL (a tweet/status, thread, profile, or X-native article), or any reference to a tweet, thread, retweet, DM, X post, or a Twitter @handle. Also use for every Twitter/X task: reading or summarizing a post, capturing a tweet's text + images, composing tweets/threads, scoring viral potential, searching/discovering, monitoring keywords, posting or engaging via API, growing an audience, and content strategy. If the user shares an x.com / twitter.com link with no other instruction, default to reading and capturing it with this skill.
- Reads credentials
- Sends data out
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- anthropic-multi-agent-research-system-skillSkill
- apply-selectionsSkill
- bootstrap-dogfood-projectSkill
- brainstormSkill
- branch-choiceSkill
- cc-adoption-scoutSkill
- claude-guardianSkill
- continueSkill
- end-sessionSkill
- executing-plansSkill
- five-advisorsSkill
- get-work-doneSkill
- git-branch-lifecycleSkill
- githubSkill
- grill-meSkill
- hook-transcript-fixture-testSkill
- instagramSkill
- linkedinSkill
- modern-data-pipeline-diagramSkill
- pattern-qualitySkill
- platform-event-live-probeSkill
- plugin-lifecycleSkill
- promote-to-coreSkill
- prompt-auto-enhanceSkill
- provision-reportSkill
- redditSkill
- review-new-claude-featuresSkill
- save-sessionSkill
- scan-discovery-reportSkill
- scan-repoSkill
- scan-urlSkill
- self-improveSkill
- skill-evaluatorSkill
- skill-masterSkill
- ssot-workflow-auditSkill
- start-sessionSkill
- synthesize-hubSkill
- synthesize-projectSkill
- verify-effect-at-destinationSkill
- workflow-doc-reviewerSkill
- writing-plansSkill
- writing-skillsSkill
- youtube-transcriptSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 69
Mode 1 (Read): no credential required — the fetch ladder handles it.
- Very specific: line 71
Modes 2/3/9 (Compose/Score/Strategy): no external prerequisite — proceed directly.
- Very specific: line 72
If a needed credential is missing with no declared fallback for that mode: report every missing item in ONE list and ask the user to supply …
- Distinctive: line 125
After fetching, do whatever the user asked: summarize, analyze, extract key points, translate, etc.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Twitter/X Comprehensive Skill
Request: $ARGUMENTS
Determine which mode to use based on the user's request, then follow that section.
Prerequisites
- Tools/CLIs:
curl(all modes);jq(Mode 5 thread/media posting only) - Credentials/env (mode-dependent):
- Mode 1 Option B only —
JINA_API_KEY - Modes 4/5/6/7/8 (API search, post/engage, social, health, monitor) —
X_API_KEY,X_API_SECRET,X_ACCESS_TOKEN,X_ACCESS_TOKEN_SECRET; optionalX_API_BEARER_TOKEN(full-archive search, trends) - Mode 4 no-API fallback —
rnetinstalled + browser cookies configured
- Mode 1 Option B only —
- Services/network: reachable
adhx.com,fxtwitter/fixupxmirrors,r.jina.ai,api.x.com; a logged-in Claude-in-Chrome/Playwright session as the declared last-resort fetch fallback (Mode 1) - User inputs & decisions: which mode to run (see QUICK REFERENCE); for Mode 5, explicit approval before any POST/DELETE call (CRITICAL RULE 4)
- Declared fallbacks: Mode 1 fetch ladder ADHX → fxtwitter mirror → Jina Reader → logged-in browser; Mode 4 API search → cookie-based
rnetsearch when no API keys — both legal, no mid-run user input needed
STEP 0: Preflight
Determine the mode from the request first, then verify only what that mode needs:
- Mode 1 (Read): no credential required — the fetch ladder handles it; check
JINA_API_KEYonly if the user has pre-selected Option B. - Modes 4/5/6/7/8 (API-based): confirm
X_API_KEY/X_API_SECRET/X_ACCESS_TOKEN/X_ACCESS_TOKEN_SECRETare set and non-empty. If missing and the request is Mode 4 (search), check for thernet+ cookies fallback before treating it as missing. - Modes 2/3/9 (Compose/Score/Strategy): no external prerequisite — proceed directly.
- If a needed credential is missing with no declared fallback for that mode: report every missing item in ONE list and ask the user to supply it now. Modes 5/6/7/8 HARD-STOP without credentials — posting/social/monitoring actions cannot proceed on guesses.
STEP 1: Read Post
Fetch any X/Twitter post as structured data for analysis.
Option A: ADHX API (no auth required)
Extract username and statusId from URL patterns:
x.com/{user}/status/{id}twitter.com/{user}/status/{id}
curl -s "https://adhx.com/api/share/tweet/{username}/{statusId}"Response schema:
{
"id": "statusId",
"url": "original URL",
"text": "tweet body (empty if article)",
"author": { "name": "...", "username": "...", "avatarUrl": "..." },
"createdAt": "timestamp",
"engagement": { "replies": 0, "retweets": 0, "likes": 0, "views": 0 },
"article": {
"title": "...", "previewText": "...",
"coverImageUrl": "...", "content": "full markdown"
}
}Option B: Jina Reader (free, requires JINA_API_KEY)
curl -s -H "Authorization: Bearer $JINA_API_KEY" \
"https://r.jina.ai/https://x.com/{user}/status/{id}"Returns plain-text extraction including author, timestamp, text, images, and thread replies.
Fallback order & limits
Direct WebFetch of an x.com URL returns HTTP 402 (login wall) — never rely on it for X. Try, in order:
- ADHX (Option A) — best first choice; structured JSON incl. full
article.contentfor X-native long-form articles. - fxtwitter / fixupx mirror —
api.fxtwitter.com/{user}/status/{id}for text + media; direct media atd.fxtwitter.com/{user}/status/{id}/photo/N.jpg, text-only att.fxtwitter.com. - Jina Reader (Option B) —
r.jina.ai/<url>for clean extraction incl. thread replies. - Logged-in browser (Claude-in-Chrome / Playwright) — the only fully reliable path for multi-tweet threads and anything steps 1–3 truncate (mirrors often return only the root tweet); use when the others come back incomplete.
For a NON-X public article, prefer Jina Reader (r.jina.ai/<url>) or plain WebFetch — ADHX/fxtwitter are X-only. Images in a post still need vision OCR after download; treat OCR as best-effort, not character-exact.
After fetching, do whatever the user asked: summarize, analyze, extract key points, translate, etc.
STEP 2: Compose Tweet
Craft an optimized tweet or thread. Apply these rules:
Read: references/compose-tweet.md for detailed step 2: compose tweet reference material.
STEP 3: Viral Potential Scoring
Score a tweet's viral potential using the 19-element system based on X's open-source recommendation algorithm.
Read: references/viral-potential-scoring.md for detailed step 3: viral potential scoring reference material.
Score: XX/100 (Grade: X)
Breakdown
| Factor | Score | Notes |
| Reply Potential | X/22 | ... |
| ... | ... | ... |
Penalties Applied
(if any)
Top 3 Improvements
- [Specific actionable improvement]
- [Specific actionable improvement]
- [Specific actionable improvement]
Optimized Version
[Rewritten tweet applying the improvements]
---
## STEP 4: Search & Discover
Search tweets, users, and trends. Requires API credentials.
### Environment Variables RequiredX_API_KEY, X_API_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET Optional: X_API_BEARER_TOKEN (for full-archive search)
### Search Commands (via Twitter API v2)
**Search recent tweets (last 7 days):**
```bash
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/tweets/search/recent?query=QUERY&max_results=100&tweet.fields=created_at,public_metrics,author_id"Search with filters:
"AI agents" lang:en -is:retweet— English original tweets only"claude code" has:links min_faves:10— With links, 10+ likesfrom:username since:2025-01-01— From specific user since date
Get trending topics:
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/trends/by/woeid/1"User lookup:
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/users/by/username/USERNAME?user.fields=public_metrics,description,created_at"Cookie-Based Search (no API key — uses rnet)
If no API keys are available and rnet + browser cookies are configured:
# Search via GraphQL (returns 200+ tweets per query)
python rnet_twitter.py search "keyword" --mode top --count 200
python rnet_twitter.py search "keyword" --mode latest --min_faves 50Analysis After Search
- Sort by engagement (likes, retweets, impressions, quotes)
- Identify top-performing content patterns
- Extract common hooks, formats, and topics
- Generate trend report with posting recommendations
STEP 5: Post & Engage
Post tweets, reply, like, retweet, and manage engagement. Requires API credentials.
Post a Tweet
curl -s -X POST "https://api.x.com/2/tweets" \
-H "Authorization: OAuth ..." \
-H "Content-Type: application/json" \
-d '{"text": "Your tweet text here"}'Post a Thread
Post tweets sequentially, each replying to the previous:
# Tweet 1 (get the ID from response)
TWEET1_ID=$(curl -s -X POST "https://api.x.com/2/tweets" \
-H "Authorization: OAuth ..." \
-d '{"text": "1/N: Thread opener"}' | jq -r '.data.id')
# Tweet 2 (reply to tweet 1)
curl -s -X POST "https://api.x.com/2/tweets" \
-H "Authorization: OAuth ..." \
-d "{\"text\": \"2/N: Next point\", \"reply\": {\"in_reply_to_tweet_id\": \"$TWEET1_ID\"}}"Engagement Actions
| Action | Method | Endpoint |
| Like | POST | /2/users/:id/likes with {"tweet_id": "..."} |
| Unlike | DELETE | /2/users/:id/likes/:tweet_id |
| Retweet | POST | /2/users/:id/retweets with {"tweet_id": "..."} |
| Unretweet | DELETE | /2/users/:id/retweets/:tweet_id |
| Bookmark | POST | /2/users/:id/bookmarks with {"tweet_id": "..."} |
| Reply | POST | /2/tweets with {"text": "...", "reply": {"in_reply_to_tweet_id": "..."}} |
| Quote | POST | /2/tweets with {"text": "...", "quote_tweet_id": "..."} |
| Hide reply | PUT | /2/tweets/:id/hidden with {"hidden": true} |
| Delete | DELETE | /2/tweets/:id |
Post with Media
# Step 1: Upload media
MEDIA_ID=$(curl -s -X POST "https://upload.twitter.com/1.1/media/upload.json" \
-F "media=@image.jpg" \
-H "Authorization: OAuth ..." | jq -r '.media_id_string')
# Step 2: Post with media
curl -s -X POST "https://api.x.com/2/tweets" \
-H "Authorization: OAuth ..." \
-d "{\"text\": \"Check this out\", \"media\": {\"media_ids\": [\"$MEDIA_ID\"]}}"Post with Poll
curl -s -X POST "https://api.x.com/2/tweets" \
-H "Authorization: OAuth ..." \
-d '{"text": "Which is better?", "poll": {"options": ["Option A", "Option B"], "duration_minutes": 1440}}'Rate Limits
| Action | Limit |
| Post tweets | 300 / 15 min |
| Like | 1000 / 24 hr |
| Follow | 400 / 24 hr |
| DM | 1000 / 15 min |
| Search | 450 / 15 min (app), 180 / 15 min (user) |
STEP 6: Follower & Social Management
Follower Analysis
# Get followers
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/users/:id/followers?max_results=1000&user.fields=public_metrics,created_at"
# Get following
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/users/:id/following?max_results=1000&user.fields=public_metrics,created_at"Follow / Unfollow
# Follow
curl -s -X POST "https://api.x.com/2/users/:id/following" \
-H "Authorization: OAuth ..." -d '{"target_user_id": "TARGET_ID"}'
# Unfollow
curl -s -X DELETE "https://api.x.com/2/users/:source_id/following/:target_id" \
-H "Authorization: OAuth ..."Mute / Block
# Mute
curl -s -X POST "https://api.x.com/2/users/:id/muting" \
-H "Authorization: OAuth ..." -d '{"target_user_id": "TARGET_ID"}'
# Block
curl -s -X POST "https://api.x.com/2/users/:id/blocking" \
-H "Authorization: OAuth ..." -d '{"target_user_id": "TARGET_ID"}'Unfollow Recommendations (Growth Hygiene)
Flag accounts to unfollow based on:
- Inactive: No tweets in 90+ days
- Non-engagers: Never liked/replied to your content
- Low-value ratio: Following/follower ratio > 10
- Bot indicators: Default avatar, <5 tweets, created recently
STEP 7: Account Health & Growth
Read: references/account-health-growth.md for detailed step 7: account health & growth reference material.
STEP 8: Keyword Monitoring
Set up ongoing monitoring for keywords, competitors, or brand mentions.
Manual Check
curl -s -H "Authorization: Bearer $X_API_BEARER_TOKEN" \
"https://api.x.com/2/tweets/search/recent?query=KEYWORD%20-is:retweet&max_results=100&tweet.fields=created_at,public_metrics&sort_order=relevancy"Monitoring Report Format
## Keyword Monitor: "KEYWORD"
Period: [date range]
Total mentions: X
Sentiment: Positive X% / Neutral X% / Negative X%
### Top Tweets (by engagement)
1. @user (XX likes, XX RTs): "tweet text..."
2. ...
### Trends
- Volume: [increasing/stable/decreasing] vs last period
- Key themes: [list emerging topics]
- Notable accounts discussing: [list]
### Recommended Actions
- [Reply to high-engagement tweets about X]
- [Create content addressing trending subtopic Y]STEP 9: Content Strategy & Planning
Generate a content calendar or strategy plan.
Weekly Content Template
| Day | Type | Focus |
| Mon | Value thread | In-depth tutorial or guide |
| Tue | Engagement tweet | Question, poll, or hot take |
| Wed | Build in public | Progress update, lesson learned |
| Thu | Value tweet | Quick tip or insight |
| Fri | Engagement tweet | Weekend discussion starter |
| Sat | Curated thread | Best resources or tools roundup |
| Sun | Light / personal | Story, reflection, or meme |
Content Pillar Framework
Define 3-5 content pillars (topics you consistently post about):
Pillar 1: [Core expertise] — 40% of content
Pillar 2: [Industry insights] — 25% of content
Pillar 3: [Personal journey] — 20% of content
Pillar 4: [Community / engagement] — 15% of contentRepurposing Strategy
| Source | Twitter Format |
| Blog post | Thread (key points as tweets) |
| YouTube video | Thread summary + video link in reply |
| Podcast episode | 3-5 standalone quote tweets |
| Newsletter | Best insight as single tweet |
| GitHub release | Build-in-public announcement thread |
CRITICAL RULES
- Character limits are sacred — Never exceed 280 chars per tweet. Always show count.
- No hashtag spam — Max 2 hashtags, at the end. Zero is often better.
- Links kill reach — Put URLs in the first reply, not the main tweet.
- Confirm before posting — Always show the user what will be posted and get explicit approval before any POST/DELETE API call.
- Rate limit awareness — Track API usage and warn before hitting limits.
- No credential exposure — Never log or display API keys, tokens, or cookies.
- Disclose AI authorship — If asked, note the tweet was AI-assisted.
- Score before posting — When composing, always run the viral scoring (Mode 3) and suggest improvements before the user posts.
QUICK REFERENCE
| User Says | Mode |
| "Read/summarize this tweet" + URL | Mode 1: Read |
| "Write/compose/draft a tweet about..." | Mode 2: Compose |
| "Score/check/rate this tweet" | Mode 3: Score |
| "Search Twitter for..." | Mode 4: Search |
| "Post/tweet/reply/like/retweet..." | Mode 5: Post & Engage |
| "Show my followers / who to unfollow" | Mode 6: Social |
| "Check my account health / shadowban" | Mode 7: Health |
| "Monitor keyword X" | Mode 8: Monitor |
| "Create a content plan / strategy" | Mode 9: Strategy |
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
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.

