Agent Skills › leamsigc/ShortsGenerator › reddit-research-generate

reddit-research-generate

GitHub

该技能用于Reddit内容研究流程的生成阶段。它读取已抓取的帖子,针对特定话题搜索相关视频并提取URL,随后调用short-generator制作YouTube短视频。支持从帖子或创意管道生成内容,最终可构建批量排期CSV。

skills/reddit-research-generate/SKILL.md leamsigc/ShortsGenerator

Trigger Scenarios

需要为Reddit帖子寻找配套视频素材 执行Reddit研究流程的视频生成步骤 基于特定话题搜索多媒体资源以制作短视频

Install

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

Use without installing

npx skills use leamsigc/ShortsGenerator@reddit-research-generate

指定 Agent (Claude Code)

npx skills add leamsigc/ShortsGenerator --skill reddit-research-generate -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": "reddit-research-generate",
    "version": "3.0.0",
    "description": "Generate state — reads scraped Reddit posts from .reddit-research\/,\nsearches DuckDuckGo for videos related to the SPECIFIC post topic\n(e.g., for a Klopp post: \"Jürgen Klopp German national team new era\nvideo\"), appends video URLs to each post's markdown file, then calls\nthe short-generator skill to produce a YouTube Short. Also generates\nShorts from the video-ideas pipeline (video-idea-research): each idea's\nviral script + its media links feed short-generator.\n",
    "allowed-tools": [
        "Bash",
        "Read",
        "Write",
        "Edit",
        "Glob",
        "Grep",
        "Question",
        "ChromeDevTools",
        "WebSearch",
        "Skill"
    ]
}

Reddit Research — Generate State (v3)

Takes scraped Reddit posts (with viral scripts already embedded), finds CONTEXT-RELEVANT videos, and generates Shorts.

CSV for MagicSync: after generating Shorts (ask the user), build the bulk-scheduling CSV with node "$CLAUDE_SKILL_ROOT/scripts/build-csv.js" <timestamp> (see the main reddit-research skill, Phase 3).

Key Improvement over v1

Video search queries must be specific to the post topic, not generic. Example:

  • Post about Klopp → search "Jürgen Klopp German national team new era coach 2026"
  • Post about Mbappé Paraguay → search "Mbappé Paraguay penalty controversy dark arts 2026"
  • Post about referee → search "Ilgiz Tantashev referee Paraguay France no cards 2026"

Before Running

  1. Ensure .reddit-research/<timestamp>/ exists with scraped posts (from Phase 1)
  2. Ensure Flask backend is running on port 8080
  3. Chrome DevTools available

Steps

1. Select Research Session

ls -d .reddit-research/*/

Read the index.json to get the post list and select the most recent session.

2. For Each Post, Search for Context-Relevant Videos

For each post, construct a targeted search query based on the post title and content:

Post Topic Search Query
Klopp Germany "Jürgen Klopp German national team new era coach 2026 video"
Mbappé Paraguay "Mbappé Paraguay penalty controversy dark arts dirty game 2026 video"
Olise card "Michael Olise yellow card Galarza simulation dive 2026 video"
Ancelotti Ferguson "Carlo Ancelotti Alex Ferguson only coach more experienced video 2026"
Referee 1/10 "Ilgiz Tantashev referee Paraguay France no yellow cards 2026 video"
Mbappé insult "Mbappé insult Paraguay player Spanish mother 2026 video"
Galarza elbow "Galarza elbow Kounde no foul VAR controversy 2026 video"
Galarza punches "Galarza punch Mbappe 38th minute Paraguay France 2026 video"

Use Chrome DevTools on DuckDuckGo Videos

chrome-devtools navigate_page --url "https://duckduckgo.com/"
chrome-devtools fill "<search_input_uid>" "<specific_search_query>"
chrome-devtools press_key "Enter"

Wait for results. Click the "Videos" tab:

chrome-devtools take_snapshot
# Find the Videos tab/link and click it
chrome-devtools click "<videos_tab_uid>"

Then extract video URLs (YouTube, TikTok, Instagram, etc.):

() => {
  const links = document.querySelectorAll('a[href*="youtube.com/watch"], a[href*="youtu.be"], a[href*="tiktok.com"], a[href*="instagram.com/reel"], a[href*="vimeo.com"], a[href*="dailymotion.com"]');
  const results = [];
  const seen = new Set();
  links.forEach(a => {
    const href = a.getAttribute('href');
    let actualUrl = href;
    try {
      const u = new URL(href);
      if (u.hostname.includes('duckduckgo') && u.searchParams.get('uddg')) {
        actualUrl = decodeURIComponent(u.searchParams.get('uddg'));
      }
    } catch(e) {}
    if (actualUrl && !seen.has(actualUrl)) {
      seen.add(actualUrl);
      results.push({ title: a.innerText?.trim() || a.getAttribute('title') || '', url: actualUrl });
    }
  });
  return JSON.stringify(results.slice(0, 8));
}

Fallback: WebSearch

If Chrome DevTools yields fewer than 3 video URLs:

websearch "<specific_search_query> video"

Extract video URLs from results. Prefer YouTube, TikTok, Instagram Reel URLs.

3. Append Sourced Videos to Post Markdown File

Read the post's markdown file. Find the ## Sourced Videos section (or add it). Append the discovered video URLs:

## Sourced Videos

1. [Video Title](<video_url>)
2. [Video Title](<video_url>)
...

4. Call short-generator for Each Post

The markdown file already contains:

  • Title
  • Post content
  • Top comments
  • Viral video script (in Spanish)
  • Sourced video URLs

To generate the Short, call the short-generator:

/short-generator <post_title> voice:M5 hashtags:<keyword1,keyword2> sources:youtube,tiktok,instagram ratio:9:16 music:off subtitle_position:center,bottom

When the short-generator asks for:

  • Script: Use the script already saved in the ## Viral Video Script (Spanish) section
  • Video URLs: Provide the URLs from ## Sourced Videos
  • Voice: M5 (Daniel)
  • Subtitle position: center,bottom
  • Language: Spanish
  • Hashtags: Extract keywords from the post title (e.g., Klopp, Germany, football)

5. Track Generation Status

Append to each post's markdown file:

## Short Generation

- **Status**: ✅ Generated / ❌ Failed
- **Voice**: M5
- **Language**: Spanish
- **Subtitle Position**: center,bottom
- **Generated At**: <YYYY-MM-DD HH:MM:SS>

7. Generate from the Video Ideas Pipeline (video-ideas.json)

When the session has video-ideas.json (from the video-idea-research playbook), each idea is already production-ready:

  1. Read .reddit-research/<timestamp>/video-ideas.json.
  2. Ask the user which idea(s) to produce (rank order by view estimate).
  3. Use the idea's scripts.viral as the script (or storytelling / inspiration per the user's pick) — paste-ready, pure spoken text.
  4. Use the idea's mediaLinks as the sourced video URLs (Step 2 search is then optional — links already collected).
  5. Upload title/description/tags/keywords come from the idea's youtube metadata block — never invent new ones.
  6. Then run Step 4's short-generator call with those values.

8. Report Completion

✅ Shorts Generation Complete!

Session: .reddit-research/<timestamp>/
Posts processed: 10/10
Generated: X
Failed: Y

Video files:
- http://localhost:8080/static/generated_videos/<file1>.mp4
- http://localhost:8080/static/generated_videos/<file2>.mp4
...

Version History

  • 7e4e16b Current 2026-10-20 01:52

    更新错误处理逻辑,并根据不同话题优化研究技能的适配性。

  • 7b83166 2026-08-29 02:31

Same Skill Collection

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/list-workflows/SKILL.md
skills/new-workflow/SKILL.md
skills/onboard/SKILL.md
skills/reddit-research-scrape/SKILL.md
skills/short-generator/SKILL.md
skills/twitter-research-scrape/SKILL.md
skills/twitter-research-setup/SKILL.md
skills/workflow-conventions/SKILL.md
skills/facebook-research-analyze/SKILL.md
skills/facebook-research-grow/SKILL.md
skills/facebook-research/SKILL.md
skills/ig-research/SKILL.md
skills/reddit-research/SKILL.md
skills/twitter-research-analyze/SKILL.md
skills/twitter-research-report/SKILL.md
skills/twitter-research-topics/SKILL.md
skills/twitter-research/SKILL.md
skills/video-idea-research/SKILL.md
skills/youtube-title/SKILL.md

Metadata

Files
0
Version
7e4e16b
Hash
7f53d51b
Indexed
2026-08-29 02:31

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-27 00:48
浙ICP备14020137号-1