x-research
Skill227 starsChanged 10 months agoMITView on GitHub
Research high-performing X/Twitter content from tracked accounts using Apify's Tweet Scraper V2. Identifies outlier tweets, trending topics, and content patterns to inform content strategy.
- Reads credentials
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 87
If outliers contain video content:
- Very specific: line 101
Read {RUN_FOLDER}/outliers.json (and optionally {RUN_FOLDER}/video-analysis.json), then generate {RUN_FOLDER}/report.md.
- Distinctive: line 206
All output goes to timestamped run folders:
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
X/Twitter Research
Research high-performing tweets from tracked accounts, identify outliers, and optionally analyze video content for hooks and structure.
Prerequisites
APIFY_TOKENenvironment variable or in.envGEMINI_API_KEYenvironment variable or in.env(for video analysis)apify-clientandgoogle-genaiPython packages- Accounts configured in
.claude/context/x-accounts.md
Verify setup:
python3 -c "
import os
try:
from dotenv import load_dotenv
load_dotenv()
except ImportError:
pass
from apify_client import ApifyClient
assert os.environ.get('APIFY_TOKEN'), 'APIFY_TOKEN not set'
" && echo "Prerequisites OK"Workflow
1. Create Run Folder
RUN_FOLDER="x-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && echo "$RUN_FOLDER"2. Fetch Tweets
python3 .claude/skills/x-research/scripts/fetch_tweets.py \
--days 30 \
--max-items 100 \
--output {RUN_FOLDER}/raw.jsonParameters:
--days: Days back to search (default: 30)--max-items: Max tweets per account (default: 100)--handles: Override accounts file with specific handles
API Limits: Minimum 50 tweets per query required. Wait a couple minutes between runs.
3. Identify Outliers
python3 .claude/skills/x-research/scripts/analyze_posts.py \
--input {RUN_FOLDER}/raw.json \
--output {RUN_FOLDER}/outliers.json \
--threshold 2.0Output JSON contains:
total_posts: Number of tweets analyzedoutlier_count: Number of outliers foundtopics: Top hashtags, mentions, and keywordscontent_patterns: Analysis of what formats perform wellaccounts: List of accounts analyzedoutliers: Array of outlier tweets with engagement metrics
4. Analyze Videos with AI (Optional)
If outliers contain video content:
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
--input {RUN_FOLDER}/outliers.json \
--output {RUN_FOLDER}/video-analysis.json \
--platform x \
--max-videos 5Note: X/Twitter is primarily text-based. Video analysis is optional and only useful when outliers contain video posts.
5. Generate Report
Read {RUN_FOLDER}/outliers.json (and optionally {RUN_FOLDER}/video-analysis.json), then generate {RUN_FOLDER}/report.md.
Report Structure:
# X/Twitter Research Report
Generated: {date}
## Summary
- **Total tweets analyzed**: {total_posts}
- **Outlier tweets identified**: {outlier_count}
- **Outlier rate**: {percentage}%
## Top Performing Tweets (Outliers)
### 1. @{username} ({name})
> {tweet_text}
- **URL**: {url}
- **Date**: {created_at}
- **Engagement**: {likes} likes | {retweets} RTs | {replies} replies | {bookmarks} bookmarks
- **Engagement Score**: {score}
- **Engagement Rate**: {rate}%
- **Followers**: {followers}
[Repeat for top 15 outliers]
## Top Performing Hooks (if video analysis available)
### Hook 1: {technique} - @{username}
- **Opening**: "{opening_line}"
- **Why it works**: {attention_grab}
- **Replicable Formula**: {replicable_formula}
- [Watch Video]({url})
## Trending Topics
### Top Hashtags
[From outliers.json topics.hashtags]
### Top Keywords
[From outliers.json topics.keywords]
### Top Mentions
[From outliers.json topics.mentions]
## Content Patterns in Outliers
| Pattern | Count | Percentage |
|---------|-------|------------|
| Contains media | {count} | {pct}% |
| Contains external link | {count} | {pct}% |
| Thread format | {count} | {pct}% |
| Quote tweet | {count} | {pct}% |
| Asks a question | {count} | {pct}% |
| List/numbered format | {count} | {pct}% |
| Short (<100 chars) | {count} | {pct}% |
| Medium (100-200 chars) | {count} | {pct}% |
| Long (>200 chars) | {count} | {pct}% |
## Actionable Takeaways
[Synthesize patterns into 4-6 specific recommendations]
## Accounts Analyzed
[List accounts]Focus on actionable insights. Content patterns and trending topics are key for X/Twitter research.
Quick Reference
Full pipeline:
RUN_FOLDER="x-research/$(date +%Y-%m-%d_%H%M%S)" && mkdir -p "$RUN_FOLDER" && \
python3 .claude/skills/x-research/scripts/fetch_tweets.py -o "$RUN_FOLDER/raw.json" && \
python3 .claude/skills/x-research/scripts/analyze_posts.py -i "$RUN_FOLDER/raw.json" -o "$RUN_FOLDER/outliers.json"With video analysis (optional):
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py -i "$RUN_FOLDER/outliers.json" -o "$RUN_FOLDER/video-analysis.json" -p xThen read JSON files and generate the report.
Engagement Metrics
Engagement Score (weighted):
- Bookmarks: 4x (highest signal - saved for reference)
- Replies: 3x (active conversation)
- Retweets: 2x (amplification)
- Quotes: 2x (engagement with commentary)
- Likes: 1x (passive approval)
Outlier Detection: Tweets with engagement rate > mean + (threshold x std_dev)
Engagement Rate: (score / followers) x 100
Output Location
All output goes to timestamped run folders:
x-research/
└── {YYYY-MM-DD_HHMMSS}/
├── raw.json # Raw tweet data from Apify
├── outliers.json # Outliers with metadata and topics
├── video-analysis.json # AI video analysis (optional)
└── report.md # Final reportOther versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- r0undm1dn1ghty-star/ds_content-radar★ 094% same
Wrote their own version · 8
- yologdev/yoyo-evolve★ 1.9ksame name
- rohunvora/x-research-skill★ 1.2ksame name
- PostPlusAI/postplus-skills★ 27same name
- lleqsnoom/xskills★ 2same name
- agentbody/skills★ 1same name
- anotb/x-signal★ 1same name
- jpoindexter/theft-kit★ 1same name
- laodao-ai/laodao-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- content-plannerSkill
- instagram-researchSkill
- tiktok-researchSkill
- video-content-analyzerSkill
- youtube-researchSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

