SkillsGrove
SkillsGrove/動画制作/leamsigc/ShortsGenerator/twitter-research

twitter-research

インストール

$npx skills add https://github.com/leamsigc/ShortsGenerator --skill twitter-research
$git clone --depth 1 https://github.com/leamsigc/ShortsGenerator.git /tmp/ShortsGenerator && mkdir -p ~/.claude/skills && cp -r /tmp/ShortsGenerator/skills/twitter-research ~/.claude/skills/twitter-research
この Agent Skill をインストールしてください:https://github.com/leamsigc/ShortsGenerator/tree/7e4e16b8c5cb51f61836265189e3a89282228e40/skills/twitter-research — まず SKILL.md とスクリプトを読み、安全であることを確認してから、私のスキルフォルダにインストールしてください。

概要

原文の説明 · MITTwitter/X content research tool with three modes: 1. SINGLE-TOPIC MODE — explore 10+ posts across the platform based on a TOPIC the user chooses, generate scripts + audience scores + HTML report. 2. TOPICS MODE — given a broad category (e.g. "futbol mexico europa usa") and a TARGET AUDIENCE, auto-detect the top 5-10 currently-trending topics, and for each one create a standalone [topic-research].md file with: viral title, news context, media/video links, 2 TTS-ready short video scripts (virality + shock), source post + engagement stats, and an SEO-optimized YouTube title (youtube-title subskill, calibrated on the channel's own CTR/view data). Optionally hands each topic to the short-generator skill to produce a finished Short video from the collected video links + script. 3. VIDEO IDEAS MODE — research the topic on X for the video posts getting the most views inside a window (week/month/year), extract each top performer's outline, draw 5 video ideas from the top 10, and write 3 scripts per idea (viral / storytelling / inspiration) plus the YouTube metadata block (title, description, tags, keywords). Final report ranks the top 10 videos + the 5 fully-scripted ideas (shared playbook: `skill video-idea-research`). Uses X search + trending content via Chrome DevTools CLI (no API key required).
以下の SKILL.md は leamsigc/ShortsGenerator(コミット 7e4e16b)から MIT ライセンスに基づいて転載しています。本文は変更しておらず、ファイル先頭のメタデータのみ省略し、画像はリンクとして表示し、非常に長いファイルは途中までの表示としています。Copyright 2024 leamsigc。ライセンス:LICENSE。表示しているのは指示ファイルのみです。スクリプト等は元のリポジトリをご覧ください。

Twitter/X Research — Main Skill (v3)

Two modes: Single-Topic Mode and Topics Mode.

Architecture

skills/twitter-research/         # Skill (bundled, global-installable via ~/.claude/skills/)
├── SKILL.md
└── scripts/                     # Bundled — no external .twitter-research/scripts needed
    ├── package.json
    ├── scrape.js
    ├── report-html.js
    └── report-topics-html.js

.twitter-research/               # Tool data directory (project root, auto-resolved via CWD walk-up)
└── <YYYY-MM-DD_HHMMSS>/         # One folder per research session (dated)
    ├── config.json
    ├── raw-posts.json
    ├── audience-scores.json
    ├── content-drafts.json
    ├── engagement-responses.json
    ├── REPORT.html
    ├── topic-research-<slug>.md # Topics mode: one per trending topic (per-session, not root)
    ├── topics-report.md         # Topics mode index
    └── screenshots/

Execution model (hybrid): heavy lifting runs as bundled scripts in skills/twitter-research/scripts/. Skills resolve dataRoot via CWD walk-up (./.twitter-research), TWITTER_RESEARCH_ROOT, or --data-root. Global-install safe (~/.claude/skills/).

Quick Start

# Single-Topic Mode (original)
/twitter-research <topic> [limit:<number>] [accounts:<account1,account2>]

# Topics Mode (NEW — research trending topics + optional Short generation)
/twitter-research topics:<category> audience:<target audience> [limit:<number>] [shorts:<on|off>]

Examples:

  • /twitter-research social media scheduling tools limit:15
  • /twitter-research topics:futbol mexico audience:aficionados liga mx shorts:on limit:10
  • /twitter-research topics:champions league audience:fans de futbol europeo

Topics Mode (NEW)

Runs the full pipeline: research → topic files → optional Short videos.

Command Parameters

Param Meaning Example
topics:<category> Broad category/region to detect trending topics in topics:futbol mexico europa usa
audience:<text> Target audience description audience:aficionados de la liga mx
limit:<n> Max topics to research (default 5, max 10) limit:8
`shorts:<on off>` Auto-call short-generator after research (default off)

Workflow (state: skill twitter-research-topics)

  1. Discover trending topics — use X trending (getdaytrends.com/es/mexico or x.com/explore) + WebSearch for the category/region. Pick the top N football (or category-relevant) topics currently hot.
  2. Research each topic — for each, pull news context, media/video links, and real engagement stats from X search (10+ posts, real numbers).
  3. Create [topic-research].md files — one per topic in .twitter-research/, containing the 6 required sections (see below).
  4. SEO YouTube titles — for each topic, load skill youtube-title and generate the best SEO-targeted, attention-grabbing title (5 candidates scored on keyword, ALL-CAPS power word, specificity, stake, length — calibrated on the channel's own CTR/views data). Save as section 6.
  5. Optional Short generation — if shorts:on, for each topic hand off to skill short-generator with: the viral script + the collected video links + context. Script is shown for user approval, then the video is generated and downloaded from the provided links. Uses the section 6 title for upload.

Required sections in each [topic-research].md file

  1. Title of the topic + viral title for a video
  2. Context of the topic / news (what happened, why it's hot)
  3. Video or image links related to the news
  4. 2 short video scripts — one for virality, one for shock value. Format specifically for short vertical content, readable by a TTS (short punchy sentences, hooks, CTA).
  5. Link to the source post + engagement stats + how hot the topic is.
  6. SEO YouTube title — recommended title + 2 A/B alternates + description keywords (via youtube-title subskill).

Output Structure (Topics Mode)

.twitter-research/<YYYY-MM-DD_HHMMSS>/
  ├── topic-research-<slug>.md        # one per trending topic (per-session)
  └── topics-report.md                # summary index (per-session)
  # legacy: loose topic-research-*.md at .twitter-research/ root (migrated on next run)

Video Ideas Mode

Research the topic on X video posts and produce video ideas built from the top 10 by views. Full protocol: skill video-idea-research (top-10 ranking → outline extraction → 5 ideas → viral/storytelling/inspiration scripts → YouTube metadata → REPORT.html).

/twitter-research ideas:<topic> [window:week|month|year] [limit:10] [ideas:5] [length:standard] [lang:es]

Examples:

  • /twitter-research ideas:futbol mexicano window:month
  • /twitter-research ideas:"liga mx árbitros" window:week ideas:5 length:short

X-specific research notes

Step How (X)
Collect candidates x.com/search?q=<topic>&f=video (+ min_faves: for quality); Latest tab for the window
Window filter since:/until: operators (since:2026-09-10 until:2026-10-10) or keep only posts timestamped inside the window
Views open the status page (/status/<id>) — the view count is on the analytics row; record real numbers only, else views: null
Ranking metric views inside window; fallback likes + 2×retweets when views are hidden
Velocity views / ageDays — breakouts beat big accounts
Outline caption text = the hook; open the video post + top replies for beats/CTA; download via short-generator when the clip matters
Output video-ideas.json + ideas-report.md + REPORT.html in the session folder via node "$CLAUDE_SKILL_ROOT/scripts/build-ideas-report.js" <path> (script ships with the video-idea-research skill)

Single-Topic Mode (original v2 workflow)

Workflow

Phase 1: Setup (skill twitter-research-setup)

  1. Ask user for the research topic (e.g., "social media scheduling tools", "Liga MX")
  2. Ask for minimum posts to collect (default: 10, recommend 10-15)
  3. Ask for optional seed accounts to bootstrap the search (can be empty)
  4. Define target audience keywords and niche
  5. Set up output directory structure
  6. Ensure Chrome is configured for X/Twitter access

Phase 2: Scrape (skill twitter-research-scrape)

  1. Run the scraper: node "$CLAUDE_SKILL_ROOT/scripts/scrape.js" <timestamp> # fallback: node ./skills/twitter-research/scripts/scrape.js <timestamp>
    • Searches X by topic (Top + Latest tabs), scrolls, extracts 10+ posts from different accounts
    • Optionally visits seed accounts from config and keeps topic-relevant posts
    • Deduplicates by URL, ranks by engagement, saves raw-posts.json
  2. If search fails or returns too few results, the skill falls back to Chrome DevTools CLI for manual extraction, or broaden the query via topic keywords.

Phase 3: Analyze (skill twitter-research-analyze)

  1. Score audience segments 1-10 based on engagement data
  2. Generate social media post drafts from top content
  3. Generate video script drafts from top content
  4. Identify content patterns and angles that work on that topic

Phase 4: Report (skill twitter-research-report)

  1. Generate pre-defined engagement responses (3 per topic post)
  2. Run node "$CLAUDE_SKILL_ROOT/scripts/report-html.js" <timestamp> to generate a self-contained HTML report
  3. Include direct links to all source posts + content playbook

Output Structure

.twitter-research/
  └── <YYYY-MM-DD_HHMMSS>/
      ├── config.json                   # Research parameters (topic, limits)
      ├── raw-posts.json                # 10+ topic posts with metrics (across accounts)
      ├── audience-scores.json          # Audience segment scores
      ├── content-drafts.json           # Generated post & script drafts
      ├── engagement-responses.json     # Pre-defined responses per topic post
      └── REPORT.html                   # Self-contained final report

Key Features

Feature Description
Topic-based research Searches X for a user-chosen topic, collects 10+ posts across accounts
Video ideas mode Top-10 videos by views → outlines → 5 ideas × 3 scripts + YouTube metadata (via video-idea-research)
No API key Uses Chrome DevTools CLI — works with X's web interface
Engagement responses 3 pre-written responses per topic post (value add / discussion / agree)
Audience scoring Scores audience segments 1-10 by engagement potential
Content generation Social media posts + video scripts from top content
HTML report Self-contained, styled, with clickable post links
ライセンス全文を見る(MIT)
MIT License

Copyright (c) 2024 leamsigc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.