WhoBuilt

Build a YouTube Research Agent in 15 Minutes

Sep 10, 2025· 15 min· 14K views·Watch on YouTube

Speaker

Peter Yang, a creator and tutorial host, shows how to build a YouTube research agent with Claude Code in a tutorial on his channel.

Explore implementation options

Yang starts in Plan Mode and asks Claude to compare three ways to gather YouTube data. The YouTube Data API is reliable but needs a Google Cloud account and key, and has quotas and potential costs; scraping page HTML may be unreliable. He chooses yt-dlp, an open-source tool that does not require an API key.

Set permissions and write a spec

Yang uses /permissions to allow file access and commands such as npm and yt-dlp without repeated approval prompts. He then asks Claude to draft a spec for a slash command that fetches a channel's 20 newest videos, ranks the top 10 by views, and suggests insights and future video titles. He reviews the output, removes upload dates and peak performance time frames, and settles on three title suggestions.

Turn the spec into a build plan

Yang asks Claude to create a detailed to-do list from the reviewed spec. Claude produces 12 tasks, and Yang chooses to begin with the first seven, leaving error handling and caching for later. He describes exploring options, writing and reviewing a spec, and then planning tasks before coding as his preferred project workflow.

Test the command on one channel

Yang runs /YouTube on his Peter Yang YT channel and reviews the generated YouTube-research.md file. The analysis identifies tutorial formats and title phrases that appear to perform well, and suggests future videos, though Yang says some suggestions are questionable. He also spots truncated titles and checks that the video links work.

Add batch channel analysis

Yang updates the spec and command so that, when no channel is specified, Claude processes a YouTube-channels.md list. He tests the feature with five channels, including Lenny's Podcast and channels belonging to Greg, Tina, and Jeff. The resulting analyses identify topics and formats associated with higher views, such as founder interviews for Lenny's Podcast and AI productivity tools for Tina.

Takeaways

  • Compare data sources before building; weigh reliability, setup, quotas, and cost.
  • Review the output format in a spec before asking Claude Code to implement it.
  • Break implementation into a task list and choose which work to include first.
  • Test generated research against source pages, checking titles and links for errors.
  • Use a simple input file to extend a one-channel workflow to batch analysis.

Mentioned in this talk

Search inside this talk

What was claimed 5

  • uses
    “Today I want to show you how to build an AI research agent with Claude Code.”
    YouTube
    Unverified1 source· Talk
  • feature
    Claude Code: Plan Mode lets users brainstorm and draft plans without coding.
    “Plan Mode basically lets you brainstorm and draft plans with Claude without having it code.”
    YouTube
    Unverified1 source· Talk
  • feature
    yt-dlp: Extracts YouTube data without requiring an official API.
    “an open-source tool that lets you extract YouTube data without requiring an official API.”
    YouTube
    Unverified1 source· Talk
  • uses
    “it's going to use yt-dlp to fetch the video metadata.”
    YouTube
    Unverified1 source· Talk
  • feature
    spec-driven development: The workflow is to explore solutions, review a spec and to-do list, then code.
    “First, explore solutions. Then ask Claude to write a spec”
    YouTube
    Unverified1 source· Talk

Related talks