social-media-scraper
Skill2 starsChanged 6 months agoMITView on GitHub
Skill that pulls and analyzes all data from social media posts. Fetches content from Instagram (reel, post, story), TikTok, Twitter/X and YouTube links. Collects all metadata including text, description, comments, like/share counts, date info, hashtags. Automatically transcribes with faster-whisper and applies visual analysis with Gemini Vision on posts containing video or audio. MANDATORY TRIGGERS: whenever a social media link is shared (instagram.com, tiktok.com, x.com, twitter.com, youtube.com, youtu.be), "read this tweet", "fetch this reel", "analyze this video", "look at this post", "what is the content of this link", or any message containing a social media URL.
- Reads credentials
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- Birdproxies-com/birdproxies-skillstheir own version, first seen Nov 15, 2026
- Humanleap/agent-skillstheir own version, first seen Oct 25, 2026
- massielvasquez193-dot/Claude-skillword for word, first seen Jun 10, 2026
- luis2404123/birdproxies-skillstheir own version, first seen Mar 3, 2026
Other versions4 projects use a version of this.
Word for word · 1
- massielvasquez193-dot/Claude-skill★ 0100% same
Edited · 0
None found.
Wrote their own version · 3
- Birdproxies-com/birdproxies-skills★ 0same name
- Humanleap/agent-skills★ 0same name
- luis2404123/birdproxies-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.
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 8 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 13
When this skill is invoked for the first time or when the user says "install", "configure", "setup", run the setup mode first.
- Very specific: line 25
Ask the questions one by one, letting the user answer each.
- Very specific: line 37
If yes: ask "Paste your Gemini API key:".
- Very specific: line 39
If no: mark GEMINI_ENABLED=false, do not install google-genai.
- Distinctive: line 86
When setup is complete, give the user a short summary (which platforms are active, whether Gemini is enabled, what language) and ask for a …
- Very specific: line 90
When the skill is running, read the ~/.social-media-scraper.env file and behave according to the selections.
- Very specific: line 98
If a link from a platform not in the PLATFORMS list arrives, ask the user "This platform is not installed, would you like to add it?".
- Distinctive: line 104
All data is fetched with the appropriate tool for the platform
- Distinctive: line 105
If video/audio content exists: download → extract audio with ffmpeg → transcribe with faster-whisper → analyze visuals/screen with Gemini → …
- Very specific: line 130
If bird is not installed: npm install -g @steipete/bird bird may need Chrome cookies to work, it auto-detects them.
- Very specific: line 169
If yt-dlp is not installed: pip install yt-dlp --break-system-packages Cookies may be required for TikTok: yt-dlp --cookies-from-browser …
- Distinctive: line 178
If video transcription is needed (when no captions are available):
- Distinctive: line 202
Delete temporary video and audio files (to save space)
- Very specific: line 204
If faster-whisper is not installed: pip install faster-whisper --break-system-packages If ffmpeg is not installed: brew install ffmpeg …
- Very specific: line 205
If ffmpeg is not installed: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)
- Very specific: line 232
If you use a .env file:
- Distinctive: line 310
Check whether each tool is installed before using it.
- Distinctive: line 317
If you get an error, try the next method, present only the result to the user
- Very specific: line 318
Use --cookies-from-browser chrome when cookies are needed
“Common” is measured: kept by at least 6 in 10 of the 3 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
Social Media Scraper
A skill that pulls all data from social media posts, analyzes them, and performs transcription + visual analysis for video/audio content.
First-Time Setup
When this skill is invoked for the first time or when the user says "install", "configure", "setup", run the setup mode first.
Setup Detection
Configuration file: ~/.social-media-scraper.env. If the file does not exist or the user requests reinstallation, ask the interactive questions below.
test -f ~/.social-media-scraper.env || echo "First-time setup required"Setup Questions
Ask the questions one by one, letting the user answer each. Based on the answers, create the ~/.social-media-scraper.env file and install only the tools for the selected platforms.
Question 1 — Platforms
"Which platforms do you want to use? Instagram, TikTok, Twitter/X, YouTube — pick all of them or only the ones you want. (default: all)"
Normalize the answer as a comma-separated lowercase list: instagram,tiktok,twitter,youtube.
Question 2 — Gemini visual analysis
"Should Gemini visual video analysis be enabled? This reads on-screen text, products, and scenes — it provides visual context that Whisper cannot translate. Enabling it requires a free Gemini API key (https://aistudio.google.com/apikey). Enable it? (default: yes)"
If yes: ask "Paste your Gemini API key:". Write the key into ~/.social-media-scraper.env but do not print to terminal, do not commit, do not log. Protect the file with chmod 600.
If no: mark GEMINI_ENABLED=false, do not install google-genai.
Question 3 — Transcription language
"What should the default transcription language be? Auto-detect (recommended — 99 languages), Turkish, English, or another ISO 639-1 language code (e.g. fr, de, es). (default: auto)"
Store the value as auto, tr, en or an ISO code.
Configuration File Format
~/.social-media-scraper.env:
# Active platforms (comma-separated)
PLATFORMS=instagram,tiktok,twitter,youtube
# Gemini video analysis
GEMINI_ENABLED=true
GEMINI_API_KEY=AIza...
# Transcription
TRANSCRIPTION_LANG=auto
WHISPER_MODEL=mediumInstallation Steps (based on answers)
Install only the tools for the selected platforms:
# Always required
pip install faster-whisper --break-system-packages
# ffmpeg: macOS → brew install ffmpeg | Linux → apt install ffmpeg
# Only if selected
# instagram:
pip install instaloader --break-system-packages
# tiktok or youtube:
pip install yt-dlp --break-system-packages
# twitter:
npm install -g @steipete/bird
# if gemini enabled:
pip install google-genai --break-system-packagesAfter Setup
When setup is complete, give the user a short summary (which platforms are active, whether Gemini is enabled, what language) and ask for a sample link to test.
Reading the Current Configuration
When the skill is running, read the ~/.social-media-scraper.env file and behave according to the selections. E.g. if GEMINI_ENABLED=false, skip the visual analysis step. If TRANSCRIPTION_LANG=tr, pass language="tr" to Whisper.
set -a
source ~/.social-media-scraper.env 2>/dev/null
set +aIf a link from a platform not in the PLATFORMS list arrives, ask the user "This platform is not installed, would you like to add it?".
General Flow
- The user shares a social media link
- The platform is auto-detected (from the URL)
- All data is fetched with the appropriate tool for the platform
- If video/audio content exists: download → extract audio with ffmpeg → transcribe with faster-whisper → analyze visuals/screen with Gemini → delete temporary files
- Transcription + visual analysis are merged into a full understanding
- Present results to the user in a clean and readable way
Platform Detection
Detect the platform by looking at the URL:
instagram.comorinstagr.am→ Instagramtiktok.com→ TikTokx.comortwitter.com→ Twitter/Xyoutube.comoryoutu.be→ YouTube
Per-Platform Tools
Twitter/X
Priority order:
birdCLI (npm package: @steipete/bird) — most comprehensive, tweet + reply thread + media info- Jina Reader (
curl -s "https://r.jina.ai/TWEET_URL") — fallback method - Reading via browser — last resort
bird CLI usage:
bird --urls "TWEET_URL"If bird is not installed: npm install -g @steipete/bird
bird may need Chrome cookies to work, it auto-detects them.
Priority order:
instaloader(pip package) — reel, post, story download and metadatainstagrapi(pip package) — more comprehensive API, may require login- yt-dlp — fallback video download
instaloader usage:
pip install instaloader --break-system-packages
instaloader -- -SHORTCODEThe shortcode is extracted from the URL: instagram.com/reel/SHORTCODE/ or instagram.com/p/SHORTCODE/
Fetching metadata (Python):
import instaloader
L = instaloader.Instaloader()
post = instaloader.Post.from_shortcode(L.context, "SHORTCODE")
print(f"Caption: {post.caption}")
print(f"Likes: {post.likes}")
print(f"Comment count: {post.comments}")
print(f"Date: {post.date}")
print(f"Hashtags: {post.caption_hashtags}")TikTok
Priority order:
- Download video + metadata with yt-dlp
- Fetch page content with Jina Reader
yt-dlp usage:
yt-dlp --write-info-json --write-comments -o "downloads/%(id)s.%(ext)s" "TIKTOK_URL"If yt-dlp is not installed: pip install yt-dlp --break-system-packages
Cookies may be required for TikTok: yt-dlp --cookies-from-browser chrome "URL"
YouTube
Video + metadata + comments with yt-dlp:
yt-dlp --write-info-json --write-comments --skip-download -o "downloads/%(id)s.%(ext)s" "YOUTUBE_URL"If video transcription is needed (when no captions are available):
yt-dlp -f "bestaudio" -o "downloads/audio.%(ext)s" "YOUTUBE_URL"Transcription (For Video/Audio Content)
Automatically transcribe every post containing video or audio. The user does not need to ask separately.
Steps:
- Download the video (with the appropriate tool per platform)
- Extract audio with ffmpeg:
ffmpeg -i video.mp4 -vn -acodec pcm_s16le -ar 16000 -ac 1 audio.wav- Transcribe with faster-whisper:
from faster_whisper import WhisperModel
model = WhisperModel("medium", compute_type="int8")
segments, info = model.transcribe("audio.wav")
print(f"Detected language: {info.language} ({info.language_probability:.0%})")
for segment in segments:
print(f"[{segment.start:.1f}s → {segment.end:.1f}s] {segment.text}")- Delete temporary video and audio files (to save space)
If faster-whisper is not installed: pip install faster-whisper --break-system-packages
If ffmpeg is not installed: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)
Video Analysis (Gemini Vision)
For posts containing video, transcribing the audio alone is not enough. On-screen text, displayed products, interfaces, logos, gestures, scene transitions — all of these are part of the meaning. Whisper only translates speech; use Gemini to analyze what appears on screen.
Flow
- Download the video (yt-dlp / instaloader / etc.)
- Transcribe audio with Whisper (section above)
- Upload the video with Gemini File API, analyze it
- Merge the two sources and present to the user
- Delete temporary files
API Key
The Gemini API key is read from the GEMINI_API_KEY environment variable. You can get an API key for free from Google AI Studio.
Setup:
export GEMINI_API_KEY="your_api_key_here"To add it permanently to your shell config:
echo 'export GEMINI_API_KEY="your_api_key_here"' >> ~/.zshrc # macOS / zsh
echo 'export GEMINI_API_KEY="your_api_key_here"' >> ~/.bashrc # Linux / bashIf you use a .env file:
export GEMINI_API_KEY=$(grep "^GEMINI_API_KEY=" .env | cut -d= -f2- | tr -d '"' | tr -d "'" | tr -d ' ')Important: ASCII file path
In Gemini SDK upload, httpx cannot convert non-ASCII characters (ı, ş, ç, ö, ğ) in the filename and crashes. Before uploading, copy the video to an ASCII path like /tmp/video.mp4.
Code (new SDK: google-genai)
The old google.generativeai package is deprecated. Use the new google-genai package:
import os, time, shutil
from google import genai
src = "downloads/instagram_reel.mp4"
tmp = "/tmp/scraper_video.mp4"
shutil.copy(src, tmp)
client = genai.Client() # read from GEMINI_API_KEY env var
f = client.files.upload(file=tmp)
while f.state.name == "PROCESSING":
time.sleep(3)
f = client.files.get(name=f.name)
if f.state.name != "ACTIVE":
raise RuntimeError(f"Gemini upload failed: {f.state.name}")
prompt = (
"What is happening in this video? Describe in detail: "
"on-screen text/titles, logos, product names, "
"interfaces (app/website), locations or people shown, "
"the narrative order and key scenes. "
"Respond in English."
)
resp = client.models.generate_content(model="gemini-2.5-flash", contents=[f, prompt])
visual_analysis = resp.text
client.files.delete(name=f.name)
os.remove(tmp)Install:
pip install google-genai --break-system-packagesMerging
Combine the Whisper transcript and Gemini visual analysis into a single narrative. Example structure:
- Speech (Whisper): "Today I'm going to show you a new product..."
- Screen/Visual (Gemini): "The video shows a product detail page on an e-commerce site, the user is focused on price and features, browsing interior/exterior images..."
Present it to the user in fluent paragraphs, merging "what they said" with "what they showed on screen".
Output Format
Present results to the user as follows (simple, readable, no lists):
Post info: Who posted, when, on which platform Content: The post's text or description Engagement: Like, comment, share, view counts Comments: Summary of standout comments (if there are many, pick the most notable ones) Transcription: Full text with timestamps if there is video/audio
The user may not be a technical person. Avoid jargon, explain in simple, fluent paragraphs. Summarize in natural language rather than long lists and tables.
Dependencies
These tools will be installed automatically when needed:
- bird CLI:
npm install -g @steipete/bird - instaloader:
pip install instaloader --break-system-packages - yt-dlp:
pip install yt-dlp --break-system-packages - faster-whisper:
pip install faster-whisper --break-system-packages - ffmpeg:
brew install ffmpeg(macOS) orapt install ffmpeg(Linux) - google-genai (Gemini Vision):
pip install google-genai --break-system-packages— requiresGEMINI_API_KEYenv var to use
Check whether each tool is installed before using it. Install if not.
Important Notes
- Video/audio files are temporary, deleted after transcription is taken
- Text data (transcript, comments, metadata) can be stored
- Some platforms may require login, in that case inform the user
- If you get an error, try the next method, present only the result to the user
- Use
--cookies-from-browser chromewhen cookies are needed
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.

