Introduction
This comprehensive guide explains a five-step framework for building a self-improving system with Claude Code, based on insights from Andrej Karpathy and the Anthropic team. It covers practical implementation and lessons learned from teaching hundreds of users.
Step 1: Base , Create the Framework for Improvement
- Project Setup: Create a project containing a knowledge base and skills.
- Knowledge Base: Use a raw folder for unprocessed resources (e.g., call transcripts) and a wiki folder referencing these files, enabling efficient AI lookup similar to a book's table of contents.
- Skills: Define repeatable tasks (e.g., "add new resource") as skills to automate processing, enhancing workflow efficiency.
- Prompt Setup: Utilize combined prompts to set up both knowledge base and skills within a
claude.mdfile for consistent framework reference.
Step 2: Upload , Identify and Bulk Ingest Data
- Data Sources:
- AI inputs: Ingest past conversation history saved locally by Claude.
- Personal ecosystem data: Extract files using Claude to mine your computer, export emails via Google Takeout or Outlook Export.
- Life story & project goals: Record and upload personal narratives about goals and projects for added context.
- Bulk Ingest Prompt: Run a single prompt to import and analyze all historical data.
Step 3: Inflow , Set Up Data Pipelines
- Concept: Keep your data lake full by setting up automated data pipelines (rivers).
- Types of Pipelines:
- Claude session synchronization skill for ongoing conversation ingestion.
- Personal ecosystem capture from meetings (using Grainola), Slack messages, and YouTube transcripts.
- Curated content pipeline leveraging topic-specific newsletters using email aliases for filtering.
- Periodic data dumps via audio journaling of lessons learned.
- Skill-Driven Ingestion: Create and test each pipeline's skill for reliable automated data processing.
Step 4: Loop , Set Up the Improvement Loop
- Common Misconception: Fully automated self-improving systems risk unintended degradation without human oversight.
- Improvement Skill: "Improve system" skill categorizes suggested changes into three buckets:
- Auto approve: Low-risk changes applied automatically.
- Need sign-off: High-stake changes requiring human approval.
- More context needed: Items flagged for additional input.
- Balance: Use a bucketed approach to combine automation and manual review, minimizing risk and workload.
- Routine Automation:
- Create local routines in Claude Code app for data ingestion and system improvements scheduled multiple times weekly.
- Implement a human review routine for final approval and feedback, ensuring user control.
Step 5: Drive , Run Without Over-Engineering
- Mindset Principles:
- Move slow and methodical for steady progress.
- You are the system leader; remove ineffective parts promptly.
- Compress feedback loops by engaging actively and iterating quickly.
- Avoid overthinking small details, action beats analysis.
- Takeaway: Regular use and iterative improvement sharpen your system more effectively than extensive planning.
Conclusion
Following these five steps equips you to build a robust, self-improving system with Claude Code that adapts and scales with your needs. For deeper strategies, check out Build Stunning AI-Powered Websites with Claude Code: No Coding Needed and The Revolutionary Impact of Claude AI: A Game-Changer for Software Engineering to elevate your system further.
Embrace action-driven progress and start constructing your AI-empowered workflow today!
I've been obsessed with building my own self-improving system with Claude code. And after studying Andrej Karpathy, the
Anthropic team, and running my own system, I've identified a five-step build framework that lets anyone create
a self-improving system with Claude code. Today, I'm walking through all five steps, exactly how to implement
them, and the lessons I've learned from teaching hundreds of people the same system. Step one is base, create the
framework for improving. Before you do anything, you need to create a project. This is where you store all the data so
you can enhance it over time. To create this project, there are two parts. One, a knowledge base where you store the
data, and two, the skills that let you work 10 times faster. So, part one, the knowledge base. Andrej Karpathy went
viral for his concept called LLM knowledge base. I have videos on my channel diving deep into this, but the
concept is fairly simple. You have a raw folder, which includes any raw resources you ingest. For example, this could be a
call transcript you record. And then you have a wiki folder, which references files in your raw folder to help AI know
where to look. Think of this like a table of contents in a book, so AI can locate information without reading the
entire book. Here's a prompt, which will help you set this up from scratch or in an existing project that you're
currently working on. And to enforce this, we'll update the claude.md file to explain how it's all set up. This file
essentially serves as a consistent reminder to Claude about the framework. Part two is skills for repetitive tasks.
If you're doing the same thing twice with Claude, you should create a skill. And a skill is your way of telling
Claude exactly how to handle a task. It's the same process every single time, so you don't have to go back and forth.
The first skill that I set up with every person I work with is add new resource. This tells Claude exactly how to add a
new file into the system. It will take a raw file, ingest it into raw, and then Claude will analyze it and update or
create any wiki entries that should reference it. These utility skills will come into play later when I go through
orchestration skills, which call multiple utility skills together to create a bigger output. To set up both
parts, both the knowledge and the skills, here is a single prompt that combines the two. This prompt will help
you create the project, which will set the foundation for the entire system. Now you have the project set up, but
step two is about creating your own data lake. Step two, upload, identify your data plus bulk ingest. Before creating a
self-improving system, you need to ingest everything you've already done. We want to work smarter, not harder. So
let's look at all of our historical training data that's already exists and bring that all together in one place. To
do this, we're going to look in three places. Place one is your AI inputs. This is the data you generate just by
using AI. So this is your conversation history and in my eyes, this is the most relevant training data that you'll ever
find because it's literally you inside the terminal asking the AI ecosystem questions. And the beauty of this is
that Claude already saves all of its session history locally. So there's a file that you can analyze historical
conversations with. Here's a prompt that you can run that will analyze your session history for you and provide your
project with clear learnings and skill suggestions. The key part here is the phrase suggest ways we can improve my
system. The second place is personal ecosystem data. Everywhere you interact online, you create your own data
footprint. So this is the process of grabbing as much data from those footprints as possible and bringing it
into the system. Now there are a lot of ways that you can do this, but two specific ways to do this that apply to
everyone watching this video is the first, which is use Claude to mine your own computer. Open Claude code and say
analyze my computer and identify any files you think would be helpful to ingest into the system. This will
surface any information you already have on your machine that will be valuable for the system you're building. And the
second is to pull your email history. If you use Google, there's a feature called Google Takeout. If you use Outlook,
there's a feature called Outlook Export. You can then take this export and bring it into Claude to analyze your writing
style and any potential places to use AI that you're not already using it. And if you are concerned with data privacy,
okay, just skip this part. This prompt will help you ingest these two data sets. The third place to look is your
life story and project goals. This one is simple and most people don't think to do it. Just sit down and record yourself
talking about your life, your project goals, and what you want to accomplish. Then upload that recording to Claude and
say, "Analyze this recording and interview me to fill in anything I may have missed, and once finalized, add
this as training data to my project." Claude will then interview you, and by the end you have a file that you can
bring anywhere with you that gives context to AI that it probably didn't already have. Here is a prompt that will
run the entire bulk ingest in one session. At this point, we've set up our system, we've ingested historical data,
and created custom skills based on what we actually do, not hypothetical skills. Now, this next step is the most
important thing to get right so that we can create a self-improving system. Step three is inflow. This is about setting
up your data pipelines. Think of your system like a lake. In step two, we filled the lake up, but the problem is
if there's no new water keeping the lake full, it will evaporate and no longer be useful. So, in this step, we create data
pipelines, which will act as rivers for our lake. And these rivers will automatically flow into the lake, and
you won't have to think about it. The way we'll do this is what I call skill-driven data ingestion. For each
pipeline, we first need to set up a skill that is well tested that we know processes raw data exactly how we want
it. In step four, we'll use this to create our automated improvement loops, but you can't do that without this
because this is a step where 99% of people get it wrong. There are four different types of data pipelines that
you want to set up. Pipeline one is your own inputs. Like I said earlier, there's really no better training data than your
own conversation history with Claude. And we process that as part of the initial data dump, but we need to
continuously process this to get learnings from our conversation history. So, to do this, we're going to create a
skill called sync Claude sessions. The skill is pretty simple. It'll take your past conversation history, bring it into
your project, and then ingest it into a process folder. Here's a prompt that will create this sync Claude session
skill. And with every one of these prompts, when you do create these skills, it's super important that you
actually test the skill. Make sure it works on your machine, please. The second pipeline that you'll set up is
your personal ecosystem data capture. Again, a lot like the bulk upload, you need to figure out the places where
you're creating data on a recurring basis. So, for me, I hop on client and team calls, I write Slack messages, and
I post videos on YouTube. I'm really a simple man. So, to set this up for myself, here's how I would do it. First,
for meetings, I would use Grainola because it records in the background without an AI bot sitting on the call,
which feels a little too intrusive for me. And I use their MCP to pull the full transcripts from that call and then
ingest it into my project. For Slack, I can set up a direct Slack connection in Claude to pull chat history. For
YouTube, I post videos publicly with transcripts enabled. So, I can reference the final product to see what was
actually said and pull that into my system. The most important thing when you're thinking about all of these
different nodes for data capture is make sure that you're actually capturing the content. If you can't figure out the
connection today, that doesn't matter as long as the raw information is there, and eventually you'll figure out the
connection. Now, I went through the three of those pretty quickly, but on screen, this will showcase three unique
ways to connect to external data sources. Now, this may sound complicated, but you can just lean on
Claude to help with this connection. Here is a prompt that will create a sync ecosystem data skill based on whatever
you're trying to connect. This will go through each connection source, pull anything that's new, and then process it
into our actual project. Pipeline number three is your curated content pipeline. This is data from external resources
that can help you create a better output. For example, this could be a book, a blog, or a YouTube video. Now,
there are a lot of ways to do this, but my favorite is using newsletters because no matter what niche you're in, there is
somebody writing a newsletter with a ton of valuable information about your specific topic. And the best part is
everyone watching this has an email. So, if you don't want to get flooded with topic-specific newsletters, what you can
do is add an alias domain. So, whatever your normal email is, let's say it's Brad, shout out all the Brads out there,
you would do Brad plus newsletter at gmail.com where the plus newsletter creates an email alias that lets you
easily filter for emails to that specific location. So, for example, if you're looking for AI best practices,
you would click the link below, which has my email newsletter, which has a ton of juice, and then you would ingest that
into your pipeline, and you would get better insight in how to best use AI. And if needed, you can create that alias
domain to help you with filtering. Now, the skill that will power all of this is sync curated content. This will pull
newsletters from alias inbox, extract the key claims from each one, and then process it into our wiki. This is
specific for email, but it's similar for other resources. You just need to configure it based on where you want to
gather the information. Now, when you're gathering the information, be careful not to just pump it with everything. At
the end of the day, less is more here. Be very selective with what you're ingesting, because you only want
high-signal resources. Pipeline number four is periodic data dumps. Similar to the life story step earlier, I try and
end my day or my weeks talking through any lessons that I learned. And this is just me downloading my lived experience
into Claude to help get more context about what I'm doing. So, I'll just rant into Claude code using Hex or Whisper
Flow, which are voice-to-text tools, and then I'll run the add new resource skill, which we already created to
ingest this information. Now, putting that all together, here is a single prompt that will create all three of
these sync skills that I've mentioned. This helps create a constant stream of data into the data lake that you're
creating. Now, one question you may be asking is how do we make it so that it automatically improves over time? We'll
get to that in the next step. Before we get to that, if this is your first video mine, welcome the channel. But if it's
your second or more, here is our anti-slop agreement. The visuals, the testing, the hours of research that went
into this video, this is entirely built for humans, not for these AI robot scrapers. So, all that I ask is you
subscribe as part of this agreement to help this content reach more people. Also, every video I give away a Claude
Max subscription. This video's winner is Gregory Horn, who's building an AI native video studio for his Hermes
agent. Now, for this video, comment below with what you're building to enter. Now to step four, which is where
most people get self-improving wrong, and I'm going to show you why. Step four, loop. Determine and set up the
improvement loop. Most people think self-improving means the system runs entirely on its own without any human
input. And yes, that is possible, and I'm going to show you how you can do that, but I do want to explain the
downside of this. Let me give you a workout analogy that might hit home a little too hard for some people. Imagine
a system that was automatically improving your fitness. So the scenario one, a fully automated system. This
system will work out for you. You don't have to lift a finger, and you get jacked without any effort. Now that
sounds amazing, but what if the system only ever trains chest? Six months from now, your chest is huge, and your legs
are toothpicks. The system thought it was improving you, but it was actually breaking you. Now scenario two,
augmented. You get a workout plan, but before it runs it for you, you sign off on what the workout is. Then it does the
workout without you lifting a finger. Both these scenarios handle the heavy lifting, but the first one just removes
your judgment, which in some cases, unless you love working out only chest, you just can't afford to lose this. So
when should you automate and when should you review? Now I'll cover that, but first, how do we actually analyze the
ingested data and propose improvements? I like having a single skill called improve system. Here's a prompt to set
it up, which once set up will categorize any improvement that you do into three buckets. Bucket one, auto approve. This
is low-risk stuff like data bloat, missed linkages, obvious fixes and improvements. This is what we'll have
Claude automatically apply as part of the skill. It puts it in a change log, and you don't see any of these changes
unless you want to. Bucket number two is need sign off. This is higher-stakes stuff like editing a scale or creating a
new skill. Anything where the wrong choice could degrade the output quality of your system. These will get written
to output/review with the date.md. And within the file itself, there will be a checkbox with one of three options:
approve, reject, or approve and don't ask again. Bucket number three is more context required. This is stuff that's
analyzed, but the skill can't decide on its own how to handle it. Essentially, it's just things that you need to
provide more information on. In both buckets two and bucket three, what needs approval and what needs more context,
get added to the same file, so you can review it all at once. On screen, you can see what an example review file
looks like as the system suggests improvements, which I use in Obsidian to view it. And now you may be asking, what
if I want to automatically approve everything? And you can, you can just adjust the skill accordingly, but I do
want you to be aware of the spectrum and the pros and cons of it. On one end of the spectrum, you have full automation.
This is where you auto approve anything, and it requires the least amount of work, but it's the most likely to lead
to system drift. And then on the other end is review every change. This is safe, but it's too much work and you're
likely just not going to do it. The bucketing strategy, which is what I just went through, is exactly where I sit,
and it's in the middle of the spectrum. AI handles the low stake work on its own, and you only handle what is
considered high stakes calls. And over the time, the system will learn what is high stakes and what isn't. We're having
AI make the easy calls, and I prefer making the hard ones. So at this point, we understand the tradeoffs, and we've
decided to go with a bucketed approach. But how do we begin and start automating the entire thing? We're going to use
Claude Code's desktop app to create routines. Routine one is data ingestion. Routines are how you schedule things to
run inside the desktop app. We're going to set up local routines because this gives it direct access to your file
system, so you can easily edit and manage files without worrying about version control. To get to this, you can
go to routines and then click the drop-down and then select local. To help simplify all the data ingestion into a
single routine, I create a skill called /dataingestion. This is an orchestration skill that runs
the three skills that we created earlier, sync Claude sessions, sync ecosystem data, and sync curated content
skills. Using this prompt, which will create it, I then create a new routine and have it run this data ingestion
skill on Tuesdays, and then another one for Fridays at 9:00 a.m. And the actual routine is super simple. I just have it
reference the skill I've already created. The key to any successful routine is you want to reference skills
so that it's easy to update. And so if you update the skill directly through Claude code, it'll automatically update
the routine. The second routine we'll create is system improvements. I then do the same thing for the slash improve
system skill. This will run at the end of the day on Tuesday and on Fridays, where it will review the data ingested
earlier in the day and suggest improvements. The reason I've separated these two is I feel like they're two
distinct processes, [music] and I think of routines as an individual process. So rather than bucketing, I have
individual, and that way if something fails, I know which part of the process failed. And the third routine is human
review. This is your human process, and this is so important because you are driving the system. And we've already
created a very simple way to do this where you just have to check boxes on what you actually want to be improved
and what you don't want to be improved. If you want, you can make a slash human improve system skill, which will help
you walk through the process or notify you through Slack if you are getting lazy or I forgot to provide feedback.
The important part here is that you are part of the process because this is your system and you need to own it. So far,
we've covered the first four steps and how this will transform how you work. But the reality is that you are the one
putting this thing together, which is why the fifth step matters the most. Step five, drive. Run it, don't
over-engineer it. This step is the mindset you need to actually run the system you just built. From first-hand
experience, you can have all the skills and knowledge, but if you don't apply these four strategies, you are
absolutely cooked. The first is slow is smooth, smooth is fast. Don't try and do everything at once. Move slow, move
methodical. Everything in this video is teed up for you. Just go one step at a time and don't be discouraged. Two is
you're the leader, the system serves you. If a piece of the system isn't actively making it better, just get rid
of it. You don't have to have it. If you added a skill and you don't like it, just delete it. You don't have to wait
for someone's permission to do something, just do it. Three, compress your feedback loops. Self-improving
systems are valuable because they compress feedback loops, but the loops only learn if you're actually using the
tools, and even though it's automatically improving, don't wait for it to automatically improve. If a skill
didn't work the way you wanted and you already went back and forth with Claude to actually fix the final output, just
say, "Based on this conversation, improve this skill." You are pushing the system forward, so continuously do it.
Four, it is not that serious, buy is to action. People always ask me, "What tool should I use? Should I make it
raw/inputs? Should I make it raw/sessions folder? Should I run these things at 6:00 a.m. or 9:00 a.m.?" The
honest answer for any of those smaller things, it just doesn't matter. The only choice that's genuinely wrong is
overthinking it. AI is really good, so just use it and build things. These systems sharpen through reps, not
whiteboard sessions. One of my favorite quotes of all time is from Brian Armstrong, the CEO of Coinbase. He said,
"Action produces information." If you're not sure if something works, just do it, and you'll learn faster, and you'll have
more confidence about the answer because you've already done it and you've seen it through. And that's exactly what
we're doing with the build framework here. It's all about action over analysis, so just start doing. Now, if
you like this video, you'll love this video where I dive into loop engineering, a process that you can use
in parallel with what we discussed here to make your self-improving system go from good to great. I'll see you in the
next one. Peace.
Begin by creating a project that includes a structured knowledge base and defined skills. Organize unprocessed data in a raw folder and use a wiki folder to index these resources for efficient AI lookup. Define repeatable tasks as skills to automate workflows, and consolidate prompt setups within a claude.md file for consistent framework referencing.
Upload data by identifying key sources such as past AI interactions retrieved locally, personal ecosystem files extracted via tools like Claude, and personal narratives including life stories and project goals. Utilize a bulk ingest prompt to import and analyze all this historical data at once, ensuring a comprehensive foundation for your system.
Set up automated data pipelines or 'rivers' that continuously feed new information into your data lake. Examples include syncing Claude sessions, capturing meeting notes via Grainola, retrieving Slack and YouTube transcripts, curating newsletters through filtered email aliases, and performing regular audio journaling. Each pipeline should be skill-driven and thoroughly tested for reliable automation.
The system employs an "improve system" skill that categorizes changes into auto-approved (low-risk), needing human sign-off (high-risk), and requiring more context. This bucketed approach enables automated enhancements while maintaining human control over critical updates. Scheduled routines automate data ingestion and improvements, complemented by human review sessions to finalize changes and provide feedback.
Adopt a slow, methodical pace focused on steady progress, actively lead your system by swiftly removing ineffective components, and compress feedback loops through frequent iteration. Prioritize action over excessive analysis, understanding that regular use and iterative improvements yield better results than over-planning or micromanaging details.
Skills in Claude Code represent repeatable tasks such as adding new resources or processing data streams. By defining these as automated actions within your project, you streamline workflows, reduce manual effort, and enable consistent handling of complex operations, which collectively enhance your system's efficiency and scalability.
For expanded strategies, explore resources like "Build Stunning AI-Powered Websites with Claude Code: No Coding Needed" and "The Revolutionary Impact of Claude AI: A Game-Changer for Software Engineering." These materials offer advanced insights and practical tips to further evolve your self-improving system.
Heads up!
This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.
Generate a summary for freeRelated Summaries
Build Stunning AI-Powered Websites with Claude Code: No Coding Needed
Learn how to create professional, fully functional websites using Claude Code without writing any code. This guide covers design systems, image optimization, Next.js integration, AI chatbots with N8N, and real-time reservation features to build seamless business or portfolio sites.
The Revolutionary Impact of Claude AI: A Game-Changer for Software Engineering
Explore how Claude AI surpasses GPT-4 and revolutionary features that redefine productivity.
A Step-by-Step Roadmap to Mastering AI: From Beginner to Confident User
This video provides a comprehensive roadmap for anyone looking to start their AI journey, emphasizing the importance of understanding core concepts before diving into tools. It offers practical tips on building an AI learning system, developing critical thinking skills, and strategically selecting AI tools to enhance productivity.
Connecting Claude and Obsidian: A Step-by-Step Guide
Learn how to integrate Claude with Obsidian to enhance your note-taking and idea generation. This guide walks you through the setup process, including installing necessary software and configuring settings for optimal use.
Mastering AI with Context Engineering for Effective Human-AI Collaboration
Explore practical strategies to harness AI's full potential through context engineering, chain of thought reasoning, role assignment, and reverse prompting. Learn how to transform AI into a reliable teammate for tasks like writing emails, preparing difficult conversations, and enhancing critical thinking.
Most Viewed Summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.

