Agent Skillsleamsigc/ShortsGenerator › twitter-research

twitter-research

GitHub

Twitter/X内容研究工具,支持单主题探索和多主题趋势发现。通过Chrome DevTools CLI抓取数据,生成脚本、受众评分及HTML报告,并可选调用短视频生成技能。

skills/twitter-research/SKILL.md leamsigc/ShortsGenerator

Trigger Scenarios

需要调研Twitter特定话题的热门帖子和互动数据 希望基于宽泛类别自动发现多个流行趋势并生成视频脚本

Install

npx skills add leamsigc/ShortsGenerator --skill twitter-research -g -y
More Options

Use without installing

npx skills use leamsigc/ShortsGenerator@twitter-research

指定 Agent (Claude Code)

npx skills add leamsigc/ShortsGenerator --skill twitter-research -a claude-code -g -y

安装 repo 全部 skill

npx skills add leamsigc/ShortsGenerator --all -g -y

预览 repo 内 skill

npx skills add leamsigc/ShortsGenerator --list

SKILL.md

Frontmatter
{
    "name": "twitter-research",
    "states": [
        "twitter-research-setup    — Gather topic, audience params, optional seed accounts",
        "twitter-research-scrape   — Search X by topic, collect 10+ posts across accounts",
        "twitter-research-analyze  — Score audiences, generate content drafts",
        "twitter-research-report   — Generate HTML report + engagement responses",
        {
            "twitter-research-topics   — TOPICS MODE": "auto-detect trending topics in a category, create [topic-research].md files, optionally generate Shorts via short-generator"
        }
    ],
    "version": "3.0.0",
    "description": "Twitter\/X content research tool with two modes:\n1. SINGLE-TOPIC MODE — explore 10+ posts across the platform based on a\n   TOPIC the user chooses, generate scripts + audience scores + HTML report.\n2. TOPICS MODE — given a broad category (e.g. \"futbol mexico europa usa\")\n   and a TARGET AUDIENCE, auto-detect the top 5-10 currently-trending\n   topics, and for each one create a standalone [topic-research].md file\n   with: viral title, news context, media\/video links, 2 TTS-ready short\n   video scripts (virality + shock), and source post + engagement stats.\n   Optionally hands each topic to the short-generator skill to produce a\n   finished Short video from the collected video links + script.\n\nUses X search + trending content via Chrome DevTools CLI (no API key\nrequired).\n",
    "allowed-tools": [
        "Bash",
        "Read",
        "Write",
        "Edit",
        "Glob",
        "Grep",
        "Question",
        "ChromeDevTools",
        "WebSearch",
        "Skill"
    ]
}

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 5 required sections (see below).
  4. 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.

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.

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)

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
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

Version History

  • 7b83166 Current 2026-08-29 02:31

Same Skill Collection

skills/facebook-research-analyze/SKILL.md
skills/facebook-research-engage/SKILL.md
skills/facebook-research-report/SKILL.md
skills/facebook-research-scrape/SKILL.md
skills/facebook-research-setup/SKILL.md
skills/facebook-research/facebook-research-template/SKILL.md
skills/ig-research-analyze/SKILL.md
skills/ig-research-report/SKILL.md
skills/ig-research-scrape/SKILL.md
skills/ig-research-setup/SKILL.md
skills/ig-research-transcribe/SKILL.md
skills/ig-research/SKILL.md
skills/list-workflows/SKILL.md
skills/new-workflow/SKILL.md
skills/onboard/SKILL.md
skills/reddit-research-generate/SKILL.md
skills/reddit-research-scrape/SKILL.md
skills/reddit-research/SKILL.md
skills/short-generator/SKILL.md
skills/twitter-research-analyze/SKILL.md
skills/twitter-research-report/SKILL.md
skills/twitter-research-scrape/SKILL.md
skills/twitter-research-setup/SKILL.md
skills/twitter-research-topics/SKILL.md
skills/workflow-conventions/SKILL.md
skills/facebook-research-grow/SKILL.md
skills/facebook-research/SKILL.md

Metadata

Files
0
Version
7b83166
Hash
8a4312f7
Indexed
2026-08-29 02:31

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 21:47
浙ICP备14020137号-1 $Carte des visiteurs$