Ray Fu, ex-Meta senior engineer and AI automation educator

Ray Fu

I'm an Ex Meta Senior Engineer that makes content and teaches OpenClaw and AI Automations.

stan.store/raycfu

How to Create Claude Code Agents from YouTube

Agents That Learn from YouTube

 

This is the full guide from the video. You are going to give Claude Code the ability to actually watch YouTube, then use that to build agents trained on the best tutorials in any skill you want. Editing, cold email, ads, whatever someone has already taught well on video.

Two layers make it work: a transcript layer that captures every word, and a Gemini layer that watches the actual frames and audio. Then a framework for turning what it learned into a skill your agents run from.

Don't want to figure this out alone? I walk members through every step inside the community. Join the Skool → skool.com/raycfu

Why This Works at All

Claude Code cannot open a YouTube URL by itself. Neither can Claude Desktop. Ask it about a video and it will either decline or guess from the title.

Gemini can, natively, because Google owns both. Gemini's multimodal API accepts a YouTube URL directly and analyzes the actual frames and audio, no downloading, no transcription service, no chunking the file. That is the whole trick: you are not teaching Claude to watch video, you are giving Claude a tool that already can.

And YouTube is the largest repository of practical skill on earth. Every technique that used to be locked inside a $2,000 course is now sitting in a tutorial someone posted for free. The only thing missing was a way for an agent to actually absorb it.

Step 1: Give Claude the Transcript Layer

Two Layers of Understanding

 

Start with text, because it is cheap, fast, and exact. Install a YouTube MCP that pulls transcripts, metadata, chapters, comments, and engagement data.

The one worth using gives Claude 15 tools, and 5 of them work with no API key at all, including transcripts. The rest need a free YouTube Data API v3 key, which comes with a daily quota of 10,000 units. Worth knowing: search operations cost 100 units each while pulling a channel's recent videos costs 1, so pull channels rather than searching whenever you can.

This layer gives you every word that was said, with timestamps. That is what you want for methods, scripts, exact phrasing, and step-by-step instructions.

Step 2: Add the Gemini Layer with yt-analysis

Now the part that makes it incredible. Transcripts miss everything that was shown rather than said, which in a tutorial is most of the value. The editor says "and then you just do this," and the transcript records "and then you just do this."

Get a free Gemini API key from Google AI Studio. Then install the yt-analysis MCP server, which passes YouTube URLs straight to Gemini and returns summaries, answers, transcripts with timestamps, and extracted frames.

The install, once you have cloned and built the repo:

claude mcp add -s user -e GEMINI_API_KEY=your-key yt-analysis -- node /path/to/yt-analysis-mcp/dist/index.js

Now Claude has two ways of understanding the same video, and it picks the right tool on its own. The transcript for what was said. Gemini for what was shown, the pacing, the on-screen actions, the thing the person did without narrating it.

One limitation to know now rather than later: private and age-restricted videos will not work, because Gemini has to be able to reach the URL itself.

Test it before building anything. Paste a tutorial URL and ask: "Watch this and tell me the three techniques the creator demonstrates on screen that they never explain out loud." If you get real answers, both layers are working.

Step 3: Build the Agent from 10 Videos

Ten Videos Not One

 

Here is the framework. You do not feed Claude one video, you feed it the ten best videos on a skill and have it find what they agree on. One tutorial gives you one person's opinion. Ten gives you the consensus, plus the disagreements, which is where the interesting decisions live.

Pick your ten. Not the ten most viewed, the ten most useful: creators who actually do the work, videos that show a process end to end, and at least two that contradict each other so the agent learns where practitioners genuinely differ.

Then run this:

I am building a [ROLE] agent. Here are 10 of the best YouTube tutorials on this skill: [PASTE 10 URLS]

Watch each one using both the transcript and the visual analysis. For each video, extract: the actual methods demonstrated, the specific settings, numbers, and parameters used, the order they do things in, what they explicitly warn against, and anything they do on screen without explaining it.

Then compare all 10 and give me:
- The techniques that appear in most or all of them, these are the fundamentals
- The techniques only one or two use, marked as opinions rather than rules
- Every point where they directly contradict each other, with both positions
- What none of them cover, which tells me where the gaps are

Cite the video and the timestamp for every technique. Do not generalize into advice that no video actually gave.

Then write it as a skill file: when to use this skill, the process step by step, the specific parameters and settings, the rules with the reasoning behind them, the mistakes to avoid, and how to tell when the output is good.

The two rules that make this work: cite everything with a timestamp, so you can go check any claim rather than trusting a summary, and separate consensus from opinion, because a technique nine creators use is a rule and a technique one creator uses is a preference.

Step 4: Test It and Feed It Back

Test It Then Patch It

 

A skill built from watching is untested until it produces something. So run it on a real task and compare the output to what the videos actually taught.

Run the [ROLE] skill on this real task: [TASK]

Then evaluate the result against the source videos. Which techniques from the skill did you actually apply, and which did you skip? Where did the skill give you no guidance and you had to improvise? Was there any point where two of the source techniques conflicted and you had to choose?

Update the skill file with what was missing. Do not delete anything the videos taught, only add what the gap revealed.

Two or three rounds of that and the skill stops being a summary of ten videos and becomes a working process. When it misses, find a video that covers the gap and feed that one in specifically.

One Agent Per Skill

 

Then repeat the whole thing per role. One agent for editing, one for outreach, one for ads, one for content. Each one built from the ten people who are actually good at that thing.

The Things That Make This Go Wrong

Feeding it the most popular videos instead of the most useful. View count measures thumbnails, not technique. The best tutorial on any skill is usually made by someone who does the work and has a fraction of the audience.

Accepting a summary without timestamps. If the agent cannot point to where a technique came from, you cannot tell whether it watched the video or predicted what a video like that would probably say. The citation rule is what keeps it honest.

Skipping the test round. A skill file assembled from ten videos sounds authoritative and is completely unproven until it makes something.

Ignoring where they disagree. When practitioners contradict each other, that is a real decision in the craft, and an agent that smooths it into one bland recommendation has thrown away the most useful information in the set.

Copying instead of learning. Extracting techniques from tutorials is fine, that is what tutorials are for. Republishing someone's actual script, their exact copy, or their specific creative work is not. The line is that you are building a process, not lifting a product, and if your agent produces something that would be recognizable as one specific creator's work, that has crossed it.

The Recap

Install a YouTube MCP so Claude can pull transcripts, then add yt-analysis with a free Gemini key so it can actually watch the frames and audio. Feed it the 10 best tutorials on a skill and have it separate consensus from opinion, with a timestamp on every technique. Turn that into a skill file, test it on real work, and patch the gaps. Then do it again for the next role.

Don't want to figure this out alone? I walk members through every step inside the community. Join the Skool → skool.com/raycfu