leamsigc/shortsgenerator/facebook-research
Claude Code and agent skill by leamsigc/shortsgenerator
- community
Checking that the SKILL.md file is still in the repository.
Facebook page analytics tool with history tracking, competitor analysis, HTML report generation, viral engagement opportunity engine, and video template extraction. Scrape top-performing content, analyze engagement patterns, deconstruct viral videos, track performance trends over time (better/worse), research competitors (up to 5), generate replication scripts adapted to other topics, find unlimited engagement opportunities with high-like hooks and direct post links, download top 5 reels, transcribe with Whisper, analyze transcripts for patterns, and generate a reusable video template based on the best-performing video structure. Video Ideas Mode (shared video-idea-research playbook): the 10 videos with the most views in a week/month/year window → outlines → 5 video ideas × 3 scripts (viral / storytelling / inspiration) + YouTube metadata (title, description, tags, keywords) → REPORT.html. Output: self-contained HTML report with embedded charts. Uses Chrome DevTools CLI for all Facebook interactions.
Install
npx vskill@latest install leamsigc/shortsgenerator/facebook-researchSKILL.md
Facebook Research — Main Skill (v2.3)
Full workflow: Setup → Scrape → Analyze → Report → Engage → Template
Quick Start
Video Ideas Mode
Research a topic (or the page's niche) for the Facebook videos/reels getting the most views inside a window and build publishable ideas from them:
Runs the shared video-idea-research playbook: top-10 by views (watch pages show the count; window from the video dates) → outline extraction (hook / beats / CTA / format / duration — Whisper transcripts when needed) → 5 ideas drawn from the top 10 → 3 scripts per idea (viral viral_shorts, storytelling, inspiration motivational) → YouTube metadata (title via the youtube-title rubric, description, tags, keywords) → video-ideas.json and REPORT.html / ideas-report.md via node "$CLAUDE_SKILL_ROOT/scripts/build-ideas-report.js" <path> (script ships with the video-idea-research skill).
Architecture
Execution model (hybrid): scraping, reporting, reel download, and transcription run as bundled scripts in skills/facebook-research/scripts/ (Chrome DevTools Protocol). Skills resolve the data dir via CWD walk-up (./.fb-research), FB_RESEARCH_ROOT env, or --data-root. Dated runs live in projects/<name>/<YYYY-MM-DD_HHMMSS>/. Use the Chrome DevTools CLI directly for quick DOM reads, comment posting, and screenshots. Global-install safe (Muse ~/.claude/skills/ — Opencode also reads it).
Video Template Pipeline
This pipeline deconstructs the page's top 5 performing reels down to their DNA and builds a reusable template.
How It Works
- Download: Chrome DevTools navigates to each of the top 5 post insight pages, extracts the video source URL from the
<video>element, and downloads the MP4 file. - Transcribe: Whisper (local) processes each downloaded video and generates transcriptions (.txt) with timestamps.
- Analyze: All 5 transcripts are analyzed for:
- Hook pattern: First 5 seconds — what's the exact phrasing, tone, and pacing?
- Content structure: How is the narrative organized? (Tease → Context → Drama → CTA)
- Pacing: Sentence length, pause points, question frequency, emphasis words
- Vocabulary: Key phrases, power words, repetition patterns
- CTA structure: How is the call-to-action framed? Question format?
- Emotional arc: How does the video progress emotionally scene by scene
- Length & timing: Exact timing of each section
- Template: The #1 performing video (by views/engagement) is used as the reference. A reusable fill-in-the-blank template is generated.
Video Template Format (VIDEO-TEMPLATE.md)
The template is a structured, fillable document with:
Mapping New Content to the Template
Commands
| Action | Description | |
|---|---|---|
skill facebook-research-template | Run full pipeline: download → transcribe → analyze → template | |
| "regenerate the template" | Re-run template analysis without re-downloading | |
| "apply template to [topic]" | Generate a new script using the saved template |
Engagement Opportunity Engine (v3)
The engagement system visits competitor pages, scrapes their top posts and comments, and generates snarky/rage-bait comments that match the audience's real voice.
How It Works
- Visits each competitor page via Chrome DevTools
- Finds their most recent popular posts (sorted by engagement)
- Navigates into each post to get the real permalink URL
- Extracts the top 10 most-liked comments from the post
- Analyzes comment patterns: tone, slang (Mexican for Spanish pages), inside jokes
- Generates 3 comment variants per post:
- Hot take: Strong controversial opinion
- Sarcastic zinger: Short, meme-like jab
- Analysis + jab: Shows knowledge then takes a shot
- Takes screenshots of the post and comments section
- Saves everything with real post URLs for one-click action
Key Rules
- Match the audience's tone — if they're sarcastic, be sarcastic. Don't sound like a bot.
- Use Mexican slang for Spanish pages: "no mames", "wey", "qué pedo", "chingón", "neta", "carnal"
- Don't promote yourself — comments should look like they're from a passionate fan
- Rage-bait triggers: bad reffing, overrated players, controversial takes, hypocrisy
- 1-3 sentences max — short comments get more likes than long rants
Engagement Hook Formula
Comment Templates (Spanish with Mexican Slang)
| Type | Template | |
|---|---|---|
| Hot take | "No mames, [player] está bien sobrevalorado wey. [specific play] fue pura suerte. Neta que [team] merecía más." | |
| Sarcastic zinger | "Claro, y el árbitro no vio nada... como siempre. Qué pedo con este nivel, estamos en un mundial o qué?" | |
| Analysis + jab | "Estadísticamente [team] tuvo [X] oportunidades claras pero [player] las falló todas. Para eso mejor me quedo en mi casa carnal. Ándale." | |
| Rage bait | "A poco esto es fútbol? [ref/player/team] debería darle las gracias al árbitro. Valió madre el partido desde el minuto [X]." |
JSON Schema (engagement-opportunities.json)
Notes
- Requires Chrome logged into Facebook (Cookies imported via
/setup-browser-cookiesor manual login) - Video download requires being logged into Facebook (videos are gated behind authentication)
- Whisper is required:
pip install openai-whisper - ffmpeg is required for audio extraction if video download fails
- All output paths are relative to
dataRoot(resolved from CWD's.fb-research, orFB_RESEARCH_ROOT) - Each run creates
projects/<name>/<YYYY-MM-DD_HHMMSS>/and appends a snapshot topage-analytics-history.json(global) for trend tracking - User can ask for engagement opportunities ANY time, not just in the engage state
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/facebook-research/SKILL.md
Popularity
- Repository stars
- 348
- Repository forks
- 75
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leamsigc/shortsgenerator/facebook-research)