This is the full transcript of How an amateur (me) learned to loop: w/ Matthew Berman, published on YouTube by The Next New Thing. Every paragraph carries the moment it was spoken, so you can click any line to jump straight to that point in the video, search the whole thing for a word, or copy it out.
0:00Everybody started talking about loops. The two main characters in the world of AI coding talked about it at the same time, Peter Steinberger and Boris Cherny. Here is an interview from Boris that went absolutely viral. I don't prompt Claude anymore. I have loops that are running. [music] They're the ones that are prompting Claude and kind of figuring out what to do. My job
0:19is to write loops. And here's Peter's tweet sitting at 5 million views in less than 24 hours. Here's your monthly reminder that you shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents. I'm going to learn how to loop from Matthew and other YouTubers and Matthew will give me feedback on what I learned and what I build. If you want to learn
0:37how to loop, let's get into it. Presented by Zapier, the AI automation company. I'm going to show you what I've learned, but [clears throat] is this really something that you're doing a lot of? Are you literally prompting with loops or placing loops with prompts? Peter Cyberger's tweet, which got 6 million views, and Boris Cherny's interview went viral on the same day. It was about 2 weeks ago on a Sunday. I just spent literally until right now, and including right now, studying uh
1:05learning as much as I can about loops. Okay, let me show you the example that I found to be the most approachable. This is from Nate Hurk. He said, "I want better thumbnails. I'm creating YouTube videos. It's visual, so I get it on both levels." Here's what he was able to get. Number one, we got number two, number
1:23three, number four, number five. And this is, by the way, the iteration that's happening through the loops. And then what happens is that number one was one of the top contenders, number two, and so was number eight. So then it iterated on these. You can see here's number one original, here's number one V2, here's number two original, here's number two V2, and here's number eight original, and here's number eight V2. And what it did is after those version twos of all of it, it said, "Okay, number eight's
1:47the best, so here is number eight V3." And Okay, so what it's doing is he's saying, "I want the best thumbnail that I can. Iterate until you get there." Here's the prompt that he used. a slash goal prompt in Cloud Code to make me a thumbnail. So, I told it basically what to use to make them. It says, "Make 10 thumbnail concepts and score each one against Mr. Beast's YouTube thumbnails using a rubric, clarity at small size, curiosity, emotional pull, visual contrast, stuff like that." And after it makes those 10, it selects the top three, it identifies the weakest part of each concept, it improves them, rescores them, and then
2:18it continues iterating on on the strongest concept until it's satisfied. Good use of loops or what? Yeah, I think one thing to point out, which is incredibly important, is he's using an LLM as a judge as the goal for the loop. It is not a deterministic end. It doesn't, you know, he's not saying, "Okay, continue to loop until my click-through rate is 10%." That 10% number would make it really easy for this loop to determine how to when to continue and when to end. What he is doing, he's basically offloading the judgment to the model itself. He's saying, "When we've, you know, reached these different qualities
3:01of the thumbnail according to Mr. Beast's rubric." But, ultimately, he's giving the judgment to the large language model. It is still a very good use of a loop, but but ultimately, like these thumbnails need to be presented to human eyes to determine whether they're good or not. Okay, that actually brings me to I'm going to skip forward to your video that explains that. Here Here's the part that
3:25I thought was really helpful. What is a loop more specifically? Well, you need two things. You need a trigger, and you need a goal. With those two things, you can complete the loop. A trigger is what kicks off the loop, and there are three ways to kick off a loop. One, you can do so manually. You literally tell the agent, "Go do this
3:47loop." And that's exactly what he did, right? He just said, "Go right now and create these thumbnails." is schedule. You can schedule a loop to happen at a certain time of day or on a repeating schedule. And then And then I've got an example of that. actions. You can have the loop kick off based on some kind of action like opening a PR. Now, to fully remove the human, we wouldn't want to kick everything off manually, but sometimes it is required. All right. And for the goal, the goal can be basically one of two things. It can be verifiable, or we can use LLM as a judge. So, if it's
4:22verifiable, it is something concrete, some specific number, or some way to test it deterministic. Can you give me an example of what's a verifiable goal? Yeah, I I think it's actually we we can use the the example from the previous YouTuber. Right like rather than stopping at letting the judge determine whether a thumbnail is good or not, it can actually take the full step of publishing the thumbnail, waiting for the the actual results to come in from YouTube, and saying uh you know, continue until you find a thumbnail in
4:57which the CTR is 10% or more. And so, it'll just continue to iterate, test things, bring back the data, iterate again until it hits that 10% threshold. Now, that that 10% is what I talk about as verifiable. That is a hard number. It's It's verifiable, exactly what I just said. Uh it it's not leaving the determination up to uh the language
5:21model. I didn't even think of that. Okay. So, now you connect back in whatever platform you're advertising on with whatever data you have, and you just tell the system keep checking, and if it doesn't hit my number, run another test. Yeah. Yeah. And here's another version of a verifiable loop. Um you can say, "Okay, optimize the page load speed
5:41until it is under 50 milliseconds." That's kind of the one of the more obvious ones. And I use that all the time. I say click to every single page in my app if it takes more than 50 milliseconds to load, uh continue to optimize it. Whether that's optimizing the database or the the number of
5:58elements on the page, it doesn't matter. Optimize it anyway you see fit. Get the page load speed under 50 milliseconds. Okay. All right, I like that a lot. This helps me understand it. Here's an example of an automation from how I AI Claire. Oops. So, in Cloud Code, they're called routines. In CodeX, they're called automations. And what I like about what CodeX has done is they have these templates. And so, they actually have given you a couple good ideas of {quote} loops, automations, routines that you can run. So, if you're looking for inspiration, I would really look at
6:33these automation templates. And you've got a whole site of automation templates. Let me ask you before we go into the one that she used and then customized. So far, everyone is putting it on their computer like it's their own personal automation. Can I put this into like CloudFlare has a worker or something in the cloud so I don't have to have it dependent on my
6:53system? Um yeah, technically you can. Uh you would basically have to design the harness yourself, though. Right? You're essentially saying, "Hey, can I take CodeX? Can I take Cursor? Put it in the cloud?" Some of them already have it. Uh and then can I run those loops in the cloud? Yeah, technically you can. I think um I believe Cursor doesn't actually let
7:15you run goals in the cloud quite yet. Um but the the main way to do it is through Cursor, Cloud Code, CodeX locally on your computer. Nate, who we showed earlier, was doing it in VS Code on his computer and he was using Cloud Code. She is using CodeX, the desktop app. And here's the here's
7:34the prompt that she came up with. Okay, so this is like By the way, what she essentially said was um and then I'll I'll take it to the sub-agents part cuz I think that's the most interesting. She said, "I want you to take a look at what we're doing that can be turned into skills." That's essentially one of the templates and she customized it. She also wanted to show sub-agents and I still don't fully get that, but let's
7:53play what you said. a loop with sub-agents that is probably going to generate its own loop. I'm actually going to force it to generate its own loop by saying, "You should use a goal when validating the skill." So, when you prompt the sub-agent, make sure you prompt it with a very specific goal it can use to
8:13validate against. You know, basically, when you write a loop or a goal or an agent, you just say validate loop goal validate loop goal and you're good to go. And just to point out on the very bottom, you can see on the bottom of her screen it says Fridays at 10:00 a.m. That's when this runs. This is an automated system. It's not a human kicking it off, but the sub-agents part
8:32I don't get. Huh? Yeah, a couple of things. So, automations are a way of kicking off things. They don't necessarily have to be loops. Mhm. What she is doing is a loop kicked off by some kind of automation, which is really cool. Um and uh yeah, yeah. So, I think that's that's a that's a good way to do it. When she's talking about sub-agents, I actually don't manually manage sub-agents usually at all. But, what a sub-agent is is you have a main agent. You can think about that's the agent you're speaking
9:01to in Codex and ChatGPT and anything. And then, typically, that main agent will delegate small portions, very modular pieces of work to sub-agents to go complete in parallel. And that's the benefit of sub-agents is you can run a bunch of them in parallel. They'll finish their work and they'll roll it back up to the orchestrator, the main agent, who will then uh kind of synthesize the data and present it back to you. I again, I don't manually think about sub-agents. I trust that the harnesses, so Codex, Cursor, Cloud Code, that they are going to manage the sub
9:38agents for me better than I could. Okay, I do feel like she was trying to explain it so thoroughly that it added a layer of complication and it helps me to understand that you're not doing it this way. Let's take a look at how it comes across when you do do it. a loop with sub agents that is probably going to generate its own loop. I'm actually going to force it to generate
10:01its own loop. Here I I I mean You should use a goal Get all the code I merged. I want you to identify skills that are missing. There are specific types of skills that I think are very important, which is skills to use some of the internal tools we've developed. If you see a new skill, I want you to spin up a sub thread, another chat. I want you to validate that skill with a goal loop. So, not only are we setting a loop at the schedule basis, we are setting up sub agents to work on specific things and then we're using a goal in those sub
10:37agents, which is a different type of loop to validate the work. So this is like a very meta task, but I think when it illustrates the looks like. See see here called memory. So you can see here a little bit of the scaffolding of what an automation looks like and then it just gives its own prompt. Now, again, it's going to go ahead and search the code, run its own commands, it's going to look at GitHub and it's hopefully going to create those new skills. Um and then what I ideally we're going to see in the left-hand side in these all chats is new threads being kicked off to test
11:16the skills that it's identified it needs to run. And so it found one strong automation candidate. Let's see if it actually kicks off a thread to validate it. Okay, so it did it. Identified a chat smoke CLI skill. Basically, this is a command line tool I built to um sort of test chats without having to use the UI in chat PRD and it basically spawned a dedicated sub agent to test the skill with a goal to test it against the base branch and tell us whether its instructions actually hold up in practice. So, look, it spun up this agent. You can see agent it's got a
11:52little key name and it's given it a goal. So, you can see here it's pursuing this goal which is validate the local repo chat smoke CLI skill on the base branch and it's basically got a loop until that validation is done. I'm trying to read your face as you see this. It feels like you you're kind of impressed by this. Are you drawn at all
12:12to doing it this way? No, what she's doing is very sophisticated. It is very cool. I've actually only come to the realization recently that one thread in Codex can manage other threads. Not only spin up and invoke new threads, but actually go in mid session in another thread and start managing it. It it's really cool stuff. Yeah, for
12:35sure. What she's doing is really cool. I'm not doing a ton of manual sub agent creation again. I'm generally just leaving it up to the prompt that I'm giving if my agent decides that it wants to spin up sub agents, wonderful. If it doesn't, that's fine, too. I think what she does is is cool because it actually probably saves a lot of time because if you're spinning up all these sub agents that are running in parallel, you're not having to wait through kind of one one chat sequence for for everything to finish before it gets to the next thing. So, yeah, I might experiment with this. It's very
13:10cool. Yeah, I I like the way that she's showing all the different chats and if you keep watching the video, you'll see she's got multiple chats going on at the same time. Let's go on to the next one. This is another one from you. Yeah, by the way, by the way, Andrew, like I usually have 10 or 15 threads running at at same time in Codex and it oh my god, my my machine is just crawling at that point. So, I can imagine if each one of those has a bunch of sub agents and different threads that it's spinning up. I don't I don't know most and I have a monster computer. I
13:39don't know if most people are going to be able to do that. I hate that all this is on the desktop instead of in the cloud. I feel in some ways we've gone backwards because like you said, it just wastes a bunch of resources, computer goes down, I shut the laptop, everything is done. I I keep a separate
13:53Cloud agents are wonderful by the way. Cloud agents are awesome and they're going to continue to get better. I think Cursor is probably in the lead there in terms of its functionality. Um but uh they're probably like 3 to 5 months behind what you can do on local. Okay. We saw Codex, we saw VS Code,
14:13let's look at Claude Code. All right. So, if you're using Claude Code, here is how to use loops and they literally have a feature called {slash} loop. So, you just start typing {slash} loop and it says, "Run a prompt or {slash} command on a recurring interview." So, loop 5 minutes and then whatever you want. So, you could say, "Loop every 5 minutes, reach feature parity with Google." Obviously, that's ridiculous and I'm going to have a trillion-dollar token bill at the end of the month, but that's how you do it. And you can set any goal you want. So, here's a more realistic example, {slash} loop every 5 minutes compare what we
14:47have built with our full spec, spec.md. It could be anything, whatever product you have a vision for and continue building until we complete the full spec. So, every 5 minutes it's going to kick off an agent. That agent is going to determine what is left to build and start building it. And it's just going to keep kicking off agents and keep looping until it finally reaches that
15:09goal. You just gave me an idea. So, all of these clips I have an agent go and get for me, but freaking a YouTube will cut me off. And I have to wait a little bit and then come back. What I could do is say every 10 minutes or every 15 minutes I want you to go back to YouTube, grab the clips that I need, and then just stop, and come back and do this over and over again until you've completed all the clips that I want you to get. Good news,
15:35right? Absolutely. And and one other thing to note, which I'm realizing now that I'm watching my own video back, is uh Claude code has two different things. It has {slash} loop and {slash} goal. What is the difference? Yeah. I I Yeah, of course, in very anthropic way they made it more complicated than it needed to be. {slash} loop is for scheduling. So, every 5 minutes do this thing, which I don't know why they call it a loop, but fine. They also have {slash} goal, which is more akin to a loop, actually. It's more It's more like here's the thing I want to accomplish, continue looping until you reach that goal. You can use
16:14loops and goals together in Claude code. So, I I think I need to put out a little update to this video. You know what? I'm so glad you said that. I just kind of assumed that they both meant the same thing based on the context. Okay, that makes sense. Let's take a look at what um when it's tough. So far, we've looked at all the great things about Loops get more complicated when the goal
16:35becomes more amorphous. Rather than all the tests passing, which is a very deterministic and clean way to know if the goal has been achieved or not, you might want to say, "Okay, the goal is build this feature in my product." But how do you actually define what the end state of that feature is?
16:54You basically have to write all of it. You have to determine the full spec of front. And for a lot of people, including myself, that is very difficult. How How do I do that? Do I just go back and forth with Claude or whatever I'm using until I have a clear enough spec that I can walk away? Yeah. Yeah, exactly. I think you you need to determine what the spec is, but that for me, at least, is very difficult. I like to just start building
17:18and see where it takes me. And and like if you think about the hierarchy of goals in a loop, the best one is a verifiable deterministic goal. Something where it's again like get the page load speed under 50 milliseconds. It's beautiful because it's verifiable and AI will continue to loop on it till it reaches that threshold. The kind of the next rung down is if you're leaving the judgment up to the model. And this falls into that. You can either leave the judgment of feature complete up to the model or you have to define it completely. And like I don't know. I don't see a lot of
17:54people writing absolutely comprehensive specs for every single thing that they want to build. So I think like for for things that are more hand wavy like build this feature, you know, you're probably going to leave it up to the judgment of the language model to see when it's actually complete. Do you think I can say spend this number of tokens and be done? Like this is how much I'm willing to spend on you figuring this out and figuring out what
18:23the finished product looks like. I mean technically you can. I don't know actually think that's going to be great results because it's going to There's no way for you to determine how many tokens it's going to take to reach feature completion. I I I just want to just have it stop before it burns everything. yeah, yeah. If you want to have a token budget, certainly. That is that is a great idea. Just continue to build until you reach this token budget. So for example, um I I had Codex clone Excel. I literally said
18:53clone Excel to feature parity. Okay. And it was running for like 10 days before I just finally said, "Okay, stop." And the way that it knew what feature parity is, so rather than me having to describe or write a spec for every single feature in Excel, which I would never be able to do, it literally just opened up Excel on my desktop and would click through and say, "Oh,
19:15there's a new feature I haven't built. Let me go build it. Okay, is it working exactly like Excel? Okay, good. Let's move on to the next one." And then click the next one. And yeah, it was running for 10 days. I have no idea how long it would have run for, uh but probably a
19:28long time. What did it cost you, do you think? Um I I I don't actually know. Billions and billions of tokens. How do you have all that money to spend on tokens? I'm I'm very fortunate that uh a few a few of these research labs give me uh some tokens to play with. Okay. All right. Oh, by the way, speaking of, my sponsor is Zapier. You also work with Zapier. They told me that you're like one of their number one people, if not their number one. What do
19:55you like about Zapier and CP? Uh I Okay, so I have used Zapier throughout my career for like at least 10-plus years. So, it's like Zapier is not new to me. I love them. Um but yeah, I'm I Zapier is great because you get basically all of the automations, all of the tooling uh just easily available to your agents. I'll give you my number one use. Hermes agent, I do all kinds of screwing around. I sometimes, when I'm not paying attention, will tell it what to do. I don't want to give it the power to delete stuff. I want to give it the power to add, to edit, and certain
20:27things delete. I have one MCP URL that has all that power. I give it to Hermes and it could do whatever it needs to do. Like, it booked a haircut for me for later in the day. It told my wife that I was doing it by email. It added to my calendar, but it didn't email out of my personal email account. It just drafted out of my personal email account. All right. I love Zapier. Go to
20:48zapier.com/mcp. Tell them Matthew sent No, tell them Andrew sent you. Matthew's getting a lot of credit over there. Let's let Andrew get a little credit. They do love you over there. Let's keep going here. All right. Now we're getting into a little bit of the the challenges with this. It's not that useful. You got guys in
21:04tokens to burn. This is the worst thing to be trending right now in my humble opinion. Yeah, this is like you if you didn't have that. Can you imagine how much you'd be spending? Let's keep listening. Just to make sure Greg I'm making sense cuz as you can see I'm pretty passionate about this. So slash goal is also trending at the
21:23moment. You know, is slash goal a loop? Like how should people think about slash goal and a loop? They're all the same thing. They have different names like slash goal. I know This is why I was confused actually and I assume that they were the same. People have people have been saying it. I like
21:39the distinction that you had. Right. It's They're They're They call it goals like the kind of the the nomenclature in the actual products are goals. We talk about it as a concept of loop but Claude code also has something called loops that is it's not really a loop. It is quite confusing. Um about the details and you
21:59Let's see. in the following. Experimentation like let me do a new line. Experimentation, right? Let's say you wanted to let's I'll share with you a fun cool little tool I built the other day Greg. I was doing a talk and I wanted to build an Among Us simulator for for AI models, right? Basically it's this game where there's one bad guy, one impostor and everyone's trying to figure out who it is and I wanted to have like my own benchmark to find out which models like are good at lying and I didn't want to I didn't care about the details. I didn't care about how it looked. I just wanted
22:32the simulation and the benchmark to work. So I told it I want the simulation. I want this benchmark. I want it to do this. Go and do it. It took about I think an hour and a half and it got it done. Now there were a lot of details that I had admitted that it completely got wrong that I didn't specify in the initial instruction set. But guess what? Because I didn't care about the what it built in a sense that I didn't really care for the details. It was a great thing. I didn't spend a lot of time. I just got
23:01slash gold to take care of everything. But when you and I are trying to use AI to build something meaningful, You know, let me sum up where where they said it. They said, "Look, it does burn a lot of tokens. Most of us need to create and look at what we're creating before moving on to the next point." And Greg um made a really good point. He said, "Most creators don't need less human experience. They need more. In fact, they need to figure out a way to get customers involved in here, not just their own artistic taste." And I thought
23:31all of that was super was super valid. Um Anything else about the the negativity before I go to one interesting one last video where someone had a a good take on when you should use it. No, I think this is completely valid and fair criticism of loops. It If you look at the people who are talking about it, and to be fair, including myself, we're not necessarily concerned with token
23:57budgets. Right? I mean, you know, Boris Cherny and Peter Steinberger are two of the kind of biggest token users probably in the world. Um And so, yeah, they they burn a lot of tokens, but they are the future. And just like any other technology, tokens will continue to come down in price. Uh And then you can also think about model routing. And you don't necessarily need
24:21a single model to do the entire loop. You can have the frontier model do the planning for each loop and then delegate out. So, you know, using Claire's sub agents, for example, delegate out to a um a much cheaper, faster model that is still just as good at writing the code, but maybe doesn't understand kind of the the big picture as well as a frontier model would. So, that's a way to save
24:45some some tokens there. that. I always forget that I can do that. All right. Final one. How to think about loops. And then, here's his interesting use case. The point I'm trying to make here is that you should be treating these limits like challenges. If you're on the expensive plan, you should be trying to get close to maxing it out because that's just money you're losing if you're not. The 70% I'm not going to hit in my weekly limit here at 8 hours is thousands of dollars of inference that I paid for, that I could have done, that I
25:14didn't do. Totally. Totally right. Just play with it at that point. Yeah, man. Yeah, yeah, yeah. I mean, if you're paying 20 or $200 a month and you're not using that full 5-hour window, eat like the quota during that window each and every 5-hour window or during the weekly batch of quota you get, uh you're you're basically just you're losing money. I I And it's so
25:35frustrating. I think about this weekly. I'm always checking my quota, always checking my usage, and I always, especially especially with Anthropic, I want to max out the the number of tokens that they're giving me as part of my subscription. You know what I'd love to do is I'd love to have something some kind of task list on my computer and a an agent that says, "Okay, Anthropic hasn't been on the computer in 4 hours. I'm now going to take some item from the task list, send
25:59it over to Claude Code, and use that." You can obviously you could do it with Codex because that works with Hermes agent and it could watch itself, but I want to be able to do it everywhere. Mhm. Okay. Speaking of Hermes, check out what he's doing. I have a goal running right now that's over 12 hours in that's trying to rewrite Hermes agent in Rust so that I can run it in isolates that are much smaller and use less resources cuz my Hermes agent uses over a gig of RAM. It is getting close. It Pretty fun little project. That's kind of like your Excel spreadsheet, but
26:29strangely his crazy idea is more reasonable than yours. Yeah, it's interesting. I don't know Yeah, I guess that is a loop technically. Um yeah, just point it at Hermes agent documentation and the GitHub repo and just say like rebuild it until it's feature parity in Rust. Any other crazy ideas that you've used and And going to show you what I did? For for loops, I mean I have a bunch that I'm testing. Uh Again, I think my favorite loops are still the ones that have a verifiable goal to them. Because I just I feel better kicking it off knowing that the agent knows what I'm trying to accomplish at the end and and
27:06not necessarily relying on their judgment. Hey, time out. It's the next day and I don't love the loop that you're about to see me show Matthew. So, at the end of this video, I have a better idea for a more ambitious loop and you'll see it and see if it works. Back to the show.
27:22All right, here's what I am doing. Where's VS Code here? I want to be able to show you what I did. We do a React We do a GitHub show here every week. And this is the loop that I wrote. Loop redesign the deck the deck app and here's where the deck is to look better. Work on a copy in a new folder. Score it 1 to 10. For each round, score 1 to 10 on hierarchy, typography, color contrast, white space, polish, judging only three sample slides, the title, the one repo, and the outro. Write the CSS, etc. Stop at an average of three Stop at an average of nine out of 10 or
27:57after three rounds. I'll show you what it created. Now that I'm talking to you, I'm realizing, "Ooh, Andrew, you did not You did not You did not go ambitious enough, number one, and I'm also thinking this isn't the type of thing I should be applying it towards, but it was a good test." Yeah, I have a I have a few thoughts
28:14about it if you want to talk about that. Yeah. Do you want to do it before or after I show you the slides that it created? Let's see the slides. Okay. So, this is the original. Kind of weak. I I don't love the intro, but okay. And just so you get a sense, this is what
28:29what a repo on the slides look like. This is a little bit better. I like how things pop out a little bit more. Here, you got a little bit more like a line here before and after the date. Things are starting to not look that much different, to be honest with you. Here, Here went a lot overboard, but I do like that these boxes are popping out. I like how you can see when I mouse over it it has a little bit of animation. I like how the so what stands
28:55out. Not not world-changing, but nice. What are your thoughts on this now that you see this? I I don't know if you're getting any additional value out of each iteration. Um because the reason [clears throat] is because this is pure aesthetic determination, right? This is purely asking the model, how do you feel about this design? I have not found a model that has fan phenomenal taste. It's regurgitating
29:23what's already in its weights. Mhm. So, I don't know if you're going to get a bunch of uh additional value for each iteration. It'll probably just change it. Um you you probably you might just do better by having that first prompt and and elaborating a little bit more on what you're looking for in that first
29:42prompt. I think so, too. And then giving it my own feedback or even finding somebody who has a design as a Okay, I can see that, but I wanted something to experiment with that wouldn't burn up tokens and take forever. All right. Speaking of, you've got this loop library. What's the point? Why would I need to use your loops instead of just creating
30:03my own? Yeah, so this is an aggregation of both my own loops and then loops that other people have submitted as well as ones that I found on the public web. Uh like everything in AI, it it like loops started with something that was just very hand-wavy and and conceptual. And what I like to do is give things some weight, some practicality. And so, I wanted to put together actual practical loops that people can use or at least be inspired to try and and
30:36potentially create their own loops. And so, uh if you want if you don't want to have to think about what is a loop, how do I design one, how do I design it for my own use case, you can come here you can be inspired and look and see if any of these apply to you. Uh and you can just learn about loops in general from the loop library. We also have a skill which
30:58you can find in that top nav bar. And if you install the skill uh the loop library skill will basically give you that in whatever coding assistant you're using. And so slash loop library help me create a skill to do X or find a skill that can accomplish this thing that I'm looking to do. And it'll both search the existing repository of skills and it'll help you develop your own skill if you
31:26want uh as well. I like this artifact to skill loop. This is a little bit more of a judgmental one, right? I basically would copy this and I'd say, "I've got this doc. I really like the design of it. I want you to create some kind of skill that would allow me to create more docs like this."
31:41Is that right? Yeah, I think this is uh from Heaton Shaw and I think you know him. I do know him. We were just talking last week. Cool. Yeah, he he put this one together. I thought it was really cool. So yeah, published it. You know, because there was so much to cover here, I didn't get to cover all the examples that I have. I'll have links to everything below, but one of the examples was from somebody who took one of your skills and just made a little tweak to it and then showed what that would look like. And so I'll have
32:09that below. Thanks for doing this with me, Matthew. I'm excited to see it. Yeah, this is cool. Um yeah, check out the loop library. Go star the repo if you're into that. I already did. And yeah, I I I would love to hear what your audience thinks about loops and what loops they're playing with. All right, here. Look, start it. Oh, you hit a thousand. I know you're aiming for
32:29that. I'm seeing this for the first time now. Very nice. Okay, congratulations. Okay, here's the loop that I have in mind. You see this? This is the back end of the videos that I showed Matthew. It's this thing that I created for myself and you can see that I've got all the playable buttons here that take me to the videos. Everything works beautifully. If I don't like this video, I could archive it. If I want to change the timestamp, I can. Everything is great except for one thing here. If I want to move a video up or down, it doesn't work. I've gone back and forth
33:03with Claude on this to just build a way for me to rearrange these videos and it hasn't done it. So, that's the loop that I'm going to create. Let's see if it works. It did it. I'm so giddy excited about this. Okay, check it out. Look, remember how before I couldn't slide anything down? So, if I wanted to, for example, take the Theo video and move it up, it wouldn't work. Now I can. And then I can move it down. So freaking exciting. It works. Let me show you how I got it to
33:30work. Okay, this is VS Code where I like to use Claude code and you can see I didn't know how to even write the prompt for this. So, I said, "I want you to write a prompt for me for a loop, etc." And then, just like I told Matthew I was worried about burning through too many tokens, I said, "I want you to figure out how I won't burn through too many tokens." And it came up with a with a prompt that I could give. And then I realized, you know what? The way it was saving me tokens was by having Opus check with me after each cycle. That's
34:00too much. So, I told it, "I don't need you to check with me after each cycle. Check with me after I think I forget the number. I think it was like after four cycles." Fine. And so, then it went to work and here's what the end looked like. It did a bunch of passes. It tested them to make sure that the slider actually worked. It kept going back and forth and I saw it fail at times and fix
34:22it and so on until it finally nailed it. And the exciting thing for me is before this loop, I had gone back and forth with Opus. Opus would say, "It's done. It works." And I would go and test it, and go, "It doesn't work." And then the way that I operate is I would start
34:36giving it suggestions for what to do. And then it wouldn't get that right, but it would tell me that it worked. And then I would say, "Go freaking figure it out." And I'd get angry because I was in a rush cuz I was going to record with Matthew. And then it would go back and
34:48iterate again. It would say, "I'm done." And then anyway, and it wasn't done. Now, instead of me sitting back and getting frustrated and going over and over, I [snorts] did the loop, and it worked. And I'm so excited about it. I've got a good use. I hope you're as excited about this as I am. Try it out on a project. Um and uh let's see if let's see what happens for you. And now that this is over, I've got the next video for you to watch right here. Another one for both of us to get excited about. See you
35:10there.
No line in this video contains that word.
Where these words come from. This is the caption track YouTube holds for this video, written automatically by YouTube rather than by the creator. We read it, tidied the line breaks and laid it out so it can be read. The plain text version is at https://viewrankai.com/tools/youtube-transcript/1iIOGpJXSgQ.txt.
All rights in this video belong to The Next New Thing. Watch it on YouTube. If this is your video and you would rather this page did not exist, tell us and we will remove it.