Modern Creator Network
Oleg Melnikov · YouTube · 12:54

My Claude Code System For Viral TikTok Videos

A 13-minute teach-and-give-away tutorial where the deliverable is a working Claude-Code-built tool that reverse-engineers competitor TikToks into tailored scripts.

Posted
3 weeks ago
Duration
Format
Tutorial
educational
Channel
OM
Oleg Melnikov
§ 01 · The Hook

The bait, then the rug-pull.

A clean 12-second open: state the deliverable, show the tool already running with 20M-view scrape results, promise a three-part structure. Then the entire rest of the video is just executing that promise without drift.

§ · Stated Promise

What the video promised.

stated at 00:02I'll show you how to use Code to create viral TikTok videos that will generate your sales afterwards.delivered at 08:23
§ · Chapters

Where the time goes.

00:0000:42

01 · Cold open + proof

States the deliverable, shows the tool already scraping 20M-view competitor videos, names the outcome — 10x viral chances.

00:4201:36

02 · Three-part roadmap

Slide deck declares the three parts of the video. Oleg restates it twice — signals the structure clearly upfront.

01:3602:36

03 · Self-intro + Authority AI

5-years-in-AI credibility play, mentions his company Authority AI runs 90% automated using these same systems.

02:3605:03

04 · Part 1 — Creators tab

UI tour: six beauty/lifestyle creators (Emira, Alix Earle, Lydia Millen, etc.), live demo adding Kendall Jenner by URL, scraping confirmation.

05:0306:56

05 · Part 1 — Configs tab

Defines a 'Bella Glow' config: brand description, Gemini analysis prompt (hook/retention/CTA), Claude output prompt (three script variants per concept).

06:5608:23

06 · Part 1 — Run Pipeline + Videos

Pipeline params: 20 recent videos per creator, top 3 selected, last 30 days only — to skip stale trends. Output is per-video analysis + tailored concepts.

08:2310:05

07 · Part 2 — Install VS Code + Claude Code

Download VS Code, open the project folder he shares, install Claude Code extension. Notes Claude Code requires paid tier ($19/mo minimum).

10:0511:57

08 · Part 2 — API keys (Apify / Gemini / Anthropic)

Walks through the .env file. Apify for scraping, Gemini for multimodal video analysis, Anthropic API for concept generation. Each is a separate console + key copy.

11:5709:12

09 · Part 2 — npm run dev

Run the dev server, open localhost in browser, app is live. Notes you don't need Claude Code itself to use the app — only to modify it.

09:1211:55

10 · Part 3 — Feed brand context

Tip 1: have Claude scrape your own website / LinkedIn / Instagram via Apify so it learns your ICP, products, and funnel before generating concepts.

09:5511:00

11 · Part 3 — Declare filming constraints

Tip 2: tell the system what you can't film (solo creator, fixed location, no group shots) so it stops generating un-replicable ideas.

11:0011:52

12 · Part 3 — Mine competitor comments

Tip 3: scrape thousands of TikTok comments on viral videos to find gaps / unanswered ICP questions you can address in your own content.

11:5212:54

13 · Part 3 — Ingest your own history + CTA

Tip 4: scrape your own TikTok with Apify, learn what worked, feed the patterns back in. End-screen CTA points to a second Claude-Code-marketing video.

§ · Storyboard

Visual structure at a glance.

face-cam open
hookface-cam open00:00
3-part roadmap slide
promise3-part roadmap slide00:42
Authority AI lower-third
credibilityAuthority AI lower-third01:36
Creators tab UI
valueCreators tab UI02:36
Configs modal
valueConfigs modal05:03
VS Code download page
valueVS Code download page08:23
Apify console
valueApify console10:05
npm run dev terminal
valuenpm run dev terminal11:57
3-part outro slide
cta3-part outro slide12:30
§ · Frameworks

Named ideas worth stealing.

06:37concept

3-API Viral Concept Pipeline

  1. Apify — scrape competitor TikToks
  2. Gemini — analyze hook/retention/CTA visually + audibly
  3. Claude (Anthropic API) — generate tailored scripts in your defined output shape

Each API does one job. Apify gets the raw data, Gemini is the only one that 'watches' the video, Claude is the writer. Clean separation of concerns.

Steal forany vertical where you want to reverse-engineer a competitor's content output
04:06list

Pipeline Filtering Defaults

  1. 20 most recent videos per creator
  2. Top 3 by virality
  3. Past 30 days only

Recency filter is the underrated piece — kills stale trends before Claude even sees them.

Steal forany scrape-then-analyze workflow where time decay matters
09:03list

AI Context Stack for Personalization

  1. Brand context (site, LinkedIn, IG via Apify)
  2. Filming constraints (what you can/can't shoot)
  3. Audience signal (competitor comments)
  4. Your own performance history (your TikTok scraped)

Four context layers that turn generic AI ideation into something actually executable for your specific situation.

Steal forany AI assistant project where output quality depends on personalization, not just prompt cleverness
§ · Quotables

Lines you could clip.

00:33
Our chances of going viral and generating sales will be 10x compared to randomly coming up with ideas or asking ChatGPT, hey, what should I film?
Pure hook-style claim. Sets up the entire video in one sentence.TikTok hook
08:26
Even though this tool was built using Cloud Code, don't worry. It is very simple. Even if you have zero experience with it, I'll show you how to set it all up.
Removes the technical objection cold. Reassurance copy that any Claude Code tutorial should steal.newsletter pull-quote
10:19
If you're not specifying that, you will get ideas that you just feel like, that's not for me. I'm wasting my time. At the end of the day, I will say screw the system. I'll do it all manually. And that's not what we want.
Names the failure mode of generic AI tooling out loud. Validates anyone who's been burned by ChatGPT ideation.IG reel cold open
12:23
I cannot randomly make a video about fitness and how to grow huge biceps. Obviously, it's not specifically for you.
Self-deprecating, concrete, makes the abstract 'know your audience' rule immediately visceral.TikTok hook
§ · Pacing

How they spent the runtime.

Hook length12s
Info densitymedium
Filler8%
§ · Resources Mentioned

Things they pointed at.

06:42toolApify (ap5.com / apify.com)
07:01toolGoogle AI Studio (Gemini API)
07:40toolAnthropic Console (Claude API key)
05:03toolVisual Studio Code
05:22toolClaude Code (VS Code extension, paid tier $19/mo+)
01:30channelAuthority AI (Oleg's company)
§ · CTA Breakdown

How they asked for the click.

12:45next-video
Check out the guide in description down below. And if you're interested, here's another video about how to use Cloud Code to solve different marketing tasks, like content creation, cold outreach, and even ads creation. Check it out.

Soft. The real CTA is the description link to the project folder, which gates Claude Code Pro signups + the three API accounts. The end-screen video pitch is bolted on. He never explicitly says 'subscribe' — the lead magnet does the conversion work.

§ · The Script

Word for word.

HOOKopening / re-engagementCTAthe pitchstory
00:00HOOKHey, guys. In this video, I'll show you how to use Code to create viral TikTok videos that will generate your sales afterwards. So here is a tool that I built using Cloud Code, and here's what it does. It is scraping our competitors' viral videos. As you can see, more than 20,000,000 views. Here, more than 10,000,000 views. And here we have even a bit more niche videos with more than a 100,000 views. And the system is analyzing
00:24HOOKwhat is the hook of the video, how they make retention better, and then it's creating new concepts tailored specifically for us so we can repeat those ideas. And our chances of going viral and generating sales will be 10 x compared to randomly coming up with ideas or asking JGPT, hey. What should I film? So this video will have three parts. First of all, I'll show you how this tool looks like inside, what is the quality of the outputs, how we track different competitor creators,
00:51then I'll show you how to set it up in less than ten minutes even if you're completely nontechnical. Even though this tool was built using Cloud Code, don't worry. It is very simple. Even if you have zero experience with it, I'll show you how to set it all up. Finally, we will talk about how to get even better results, how to make this content strategy on TikTok work even smarter,
01:13how to make it more tailored to your specific case. But before we dive in, if you are new here, my name is Oleg, and I've been building AI systems for more than five years now, and currently I'm focused on AI systems for marketing. I'm running my own AI company which is called Authority AI, and we're 90% automated inside. So I'm actually using all of these systems for my business. And now let's dive in. So the first part is to check out how it looks like inside.
01:36So as you can see, we have the main four parts on the left side. Let's go to the creators tab. Here, we're basically curating a database of our competitors. In our case, I decided to make as an example collection of creators in the beauty and lifestyle niche. As you can see, we have six profiles. All of them are big creators with at least 1,000,000 followers on TikTok. If I open this one up, as you can see, we can check out the original profile that we're scraping, all of these viral videos in the same style.
02:07So if you want to add a new creator, let's just go on TikTok and search for someone. Let's say Kendall Jenner. We're searching for this creator. Okay. We're just finding her URL,
02:19which is this one, then username. We can press add creator and username. Let's say that the niche is the same, and now this profile is getting scraped and it is getting added to the database. And, bam, as you can see, it is added right here. We can see amount of followers, amount of popular videos, and all that stuff. And now once we're doing the runs to pull up the most viral videos, this profile will be used as well. And here we have the configs tab. Here we're basically
02:48telling the system who we are, what is our brand about, what is kinda topics, content pillars that we wanna be reflecting in our content. So if you press new config, here we will give it a name, then we will select the category of creators that we wanna use. In this case, beauty and lifestyle, but you can be tracking multiple categories. So even if you're, like, a marketing agency, you can use the system very conveniently for different clients that you have. And then you can explain how to analyze videos. For instance, in this case, I told it to analyze the hook, analyze retention mechanism, analyze what is the call to action at the end of the video, if any. And then finally,
03:24we're describing how we want new concepts to be created. So it can be a, let's say, script for the video, maybe also explanation of what the b roll should look like. You can basically tell it in a very flexible format what you want the output to be. In my case, I asked for three different scripts. So I have three different concepts based on one idea, and I can choose the one that I like the best. And this is what I will then use in my production process. Right? So this is the config that was created. It's called Bella Glow, some random name of the beauty lifestyle influencer. Let's say it like that. And then you basically go to the run pipeline, and then here we have different settings to run the pipeline to run this analytical job.
04:04And as you can see, we're selecting our config, Bella Glow, and then we can select how many videos from these competitors we will be analyzing. In this case, we are saying 20 videos for every creator. From these last 20 videos, we will select top three, and then we're also looking only at the past thirty days. So we we are interested only in the most recent stuff because we want something that is trending and viral right now. Because if it was viral, like, six months from now,
04:31maybe it's not that interesting. Maybe the trend is already depleted. And then you're just pressing run pipeline, and then after, let's say, fifteen minutes, you get your results here in this tab, all of those videos. And for every single video, you can, first of all, press it, open it up, check it out on TikTok, but this is not what interests us right now. We can see the analysis,
04:52what actually worked, why this video went viral, and then we have the concepts tailored specifically for us. So this was the quick overview of the system, how it looks like inside. Okay. Now we are getting to the second part of the video, which is about how to set it up real quick. So first of all, we need to install Cloud Code, and for that reason, we'll be using Visual Studio Code. This is an environment that we're using to run Cloud Code applications.
05:17So you will just go towards the link down below. Here, will find the whole guide step by step on what you need to do. And now I will just walk you through the process visually. So here's the site. You'll just press download depending on your system. Then you will have this app. You will open it up, install it properly, and then you will have interface like that. And then you will download a folder also from description down below, save it to your computer, and then we will open it up through Visual Studio Code. So you will go somewhere in the left part right here. You'll press file, and then you'll press open folder,
05:49and then you will select this folder that you just downloaded. So I already inside the folder, as you can see on the left side, we have subfolders and different files. So this is kind of the project that I'm sharing to you. And then we'll need to install Cloud Code inside Visual Studio Code. So on the left side, you will press here on these cells, and you will search for Cloud Code.
06:10And you will basically open up this extension. You will press install. In my case, it's already installed in here. And I have to clarify, you need to be on paid plan, which is at least $19 per month, but this is completely worth it. And then you will need to log in to the Cloud Code, and then you will be able to get started. And then you will need to open on the left side file called dot ENV.
06:34Here, we are storing our API keys because we need external services to run this analysis and generate new concepts. Concepts. We're using three APIs right here. The first one is Apify. So here it is. The website is called ap5.com. You'll basically open this website, then create your account, and then you'll be able to use your API key completely for free.
06:54So you will copy it, plug it in here. This is the platform that we use to actually scrape those videos. As you can see, we have TikTok scraper, and this is overall the best platform that helps you to access any sort of social media data. And then the second API that we're using is Gemini. Basically, right here, you will need to open this website, which is called Google AI Studio,
07:16and this is we are using it to analyze what is happening inside each of those videos. So this is an AI that is actually, like, looking at the video visually and also from the audio perspective, analyzing all that, and that is able to answer your questions, do the analysis of the hook, or generate new concept, whatever it is that you're asking for. And finally, of course, we're using Anthropic API to generate these textual concepts for new videos. So to create Anthropic API, you will simply just write, I think, Anthropic
07:47API, and you will go here to cloud platform, sign in, and then you will create an account, add some billing, maybe top up $5, copy your API key, plug it in here, and then you will be good to go. And once you did all that, you will simply open up your terminal and write here n p m run dev. And then the whole server will be running, and you'll be able to use the app. I run this command in another terminal right here. And as you can see, it is saying that now the website is available according to this link, You're just going to your web browser, pasting this link, and, bam, here's the whole application up and running right here. And I can run the pipeline. I can add new creators,
08:28CTAwhatever it is that I want. And, honestly, you don't even need Cloud Code to use it. Like, the system is ready, you can just run it. But with Cloud Code, you can edit it if you want. Maybe add some new features, maybe extend functionality according to your needs. So basically, you'll just create new terminal, write Cloud here, and then you will tell it, hey, change theme to light for instance, and it will change the front end. But, of course, the changes might be so much more deeper, so much more related to the back end. And now finally, let's move into part three, which is about how to get even better results with this system. So here is a list of ideas that I prepared for you. So first of all, we want to provide even more context about your brand. So you can give ClotCode your website, your LinkedIn, your Instagram,
09:12CTAand just ask it to scrape all this information. It might use Apify to do it, and then it will be more aware and more informed about who is your ICP, what are your products, what is your offer, what is your sales funnel. And then based on that, of course, you can think of it like as a digital strategist. Now it will be more aware about your brand perspective,
09:33CTAand it will all go into the content strategy. Second, you can also explain what you can film and what you cannot film because I am running my YouTube channel. I completely understand how this, like, idea replication framework works. In many cases, other creators, are doing some stuff that I am not able to replicate. Maybe they have, like, five people
09:55CTAin the video. They're interacting with each other, but I am filming alone. Obviously, this idea will be not for me. So this is one of the constraints that I have naturally. Maybe I have only one specific location, which is my office right here. As you can see, this is just a very specific place. I cannot be, I don't know, like, going out and filming with a car, let's say, or I'm not willing to do it. So in depending on what is your case, it's really good to explain all that to ClotCode,
10:22CTAto this system, so it's generating concepts only those ones that you can actually replicate and take ideas from. Because in many cases, if you're not specifying that, you will get ideas that you just feel like, that's not for me. I'm wasting my time, and I have to filter all that. It's not convenient. And at the end of the day, I will say that screw the system. I'll do it all manually. And that's not what we want. We want to actually embrace the power of automation. Okay. Then tip number three, you can analyze comments from your competitors and find gaps. So for every single competitor that we've scraped right here, we can actually go in their TikTok.
11:00CTAAnd for these viral videos, let's say, we open this one up, and then we can be reading the comments and seeing what is actually resonating with people and what is not resonating with people. And maybe there are some gaps that you can fill in. For instance, in this case, I guess, it's a little bit less relevant, but if I go towards this account, this is more about, like, beauty, cosmetics,
11:21CTAall that stuff, I open this video, let's say, and then we have some specific questions like this one. Ask the loader never fails yet regardless blah blah blah. So this person is mentioning specific brand name and probably, like, expressing some opinion or maybe asking questions, whatever it is. So you can be analyzing, like, thousands of these comments at scale, understanding how your niche looks like inside, in-depth,
11:47CTAlike, having this insider knowledge about your ICP, about your audience, what is in their minds, and then you can address it in your content strategy as well. And finally, the last tip is that you can analyze your own historical performance. So if you already have your TikTok account, then, of course, you can ask Cloud Code to use ABFi to scrape all of your videos and analyze what has worked, what did not work out, what are the different patterns, and what are the specifics of your audience. Because in my case, for instance, on YouTube, I have more than 17,000
12:23CTAaudience. And I cannot be posting random stuff because YouTube algorithm will punish me. I cannot randomly make a video about fitness and how to, like, grow huge biceps. Obviously, it's not specifically for you. So that's why, really, if you already have some track record, definitely plug it into the system. That was it. Check out the guide in description down below. And if you're interested, here's another video about how to use Cloud Code to solve different marketing tasks, like content creation, cold outreach, and even ads creation. Check it out.
§ · For Joe

Steal the lead-magnet-tutorial format.

JoeFlow / MCN playbook

The video IS the funnel: the deliverable is a working tool, gated behind a paid AI subscription, taught with such clarity that the viewer feels they 'earned' it.

  • Open by showing the tool already running on real data — not a slide, not a face-cam promise. Proof first, story second.
  • Declare the three-part structure on a slide at 00:42, then literally return to that slide three more times. Free re-engagement points without saying 'stay tuned'.
  • Stack three APIs by job — scrape / analyze / write — and name which AI does which. Viewers love clear separation of concerns more than they love magic.
  • Build the lead magnet so it requires the paid product (Claude Code Pro $19/mo) to run. The tutorial is the funnel.
  • Put the personalization layers (brand context, constraints, audience signal, your history) in Part 3, not Part 1 — so the value compounds even after viewers stop watching.
  • Don't pitch the next video until the last 20 seconds. The whole video is the pitch; the end-screen is just plumbing.
§ · For You

What this could mean for you.

If you want to actually try this

The system works because it strips your TikTok ideation down to a repeatable loop — copy what's already winning, filtered through what you can actually shoot.

  • Pick 5-10 creators in your niche who consistently hit big numbers. Don't aim broad — make them as close to your situation as you can.
  • Before you scrape anything, write down your filming constraints in one paragraph: who's in the video, where you shoot, what you won't do on camera. This single doc kills 80% of unusable AI suggestions.
  • Don't just look at hooks. Read the top 50 comments on each viral video. The questions people ask are the next 10 videos you should make.
  • Set a 30-day recency filter on whatever you analyze — old viral patterns are dead patterns.
  • If you already post, treat your own back-catalogue as research. The audience you already have is the most honest data you'll ever get.
  • Don't run this once and ship 20 videos. Run it weekly. Trends decay, and the system only stays sharp if your input data does.
§ · Frame Gallery

Visual moments.