How to Build an Expert Teaching Agent in Claude

TL;DR
Build an expert teaching agent by collecting the expert’s public material, compiling it into a linked wiki, extracting source-backed teaching rules, and packaging those rules as an agent and skill. Add a run gate that blocks untested code from being presented as working, and preserve exact citations so users can distinguish documented principles from the agent’s inferences.
Transcript
So, this isn't the Claude that you know. I just turned one of the biggest minds in AI into a Claude agent. Andrej Karpathy is one of Anthropic's lead engineers, a co-founder of OpenAI, and the person that everyone says explains AI better than anyone alive. And today, I'm going to show you the exact four steps to turn his thoughts into your own Clau... Read More
Key Insights
- The project is a teaching-method agent, not a voice clone or personal impression. Its purpose is to reproduce documented explanatory habits and problem-solving rules, allowing Claude to teach from an expert-derived framework instead of merely imitating vocabulary or repeating past statements.
- The source collection contains more than 700,000 words from Andrej Karpathy’s public lectures, blogs, repositories, and social posts. Separate agents gather each source in parallel, record what they retrieved, and place the results into a raw folder with a dedicated subfolder for every source.
- A linked wiki makes a large source collection easier to query than an unstructured note dump. The compilation process leaves raw files unchanged while creating pages, indexes, logs, topic relationships, and bidirectional links between supporting sources and the principles derived from them.
- Every extracted rule must connect to an exact quotation and its origin. When no direct source supports a statement, the agent must identify the statement as an inference, which helps prevent generated interpretations from being presented as documented views of the expert.
- The seven teaching rules emphasize building to understand, starting with the most important factor, predicting before execution, showing incorrect versions, proving claims, stating assumptions, and choosing simpler solutions. Together, these rules define how the agent approaches explanations and coding tasks.
- The agent packages the rules into both a sub-agent and a skill. The sub-agent receives its own instructions, memory, and context window, while the skill accepts a user’s problem, invokes the teaching process, and grades the response against a checklist covering each rule.
- The run gate enforces code verification before the agent can finish. A hook detects when the agent has written code without executing it, blocks the response, and sends the task back with an instruction to run the code before claiming that it works.
- The same four-step pattern can be applied to other experts whose public material is available. The process consists of collecting sources, organizing them into a linked memory system, deriving traceable behavioral rules, and embedding those rules into reusable agents, skills, and workflows.
Install to Summarize YouTube Videos and Get Transcripts
Explore YouTube Video Summarizer or Get YouTube Transcript Extractor
Questions & Answers
Q: How do you build an expert teaching agent in Claude?
Start by collecting the expert’s public lectures, writing, repositories, and social posts into source-specific folders. Compile those raw materials into a linked wiki that connects topics, methods, rules, and original sources. Extract a small set of teaching principles supported by exact quotations, then place those principles into a dedicated sub-agent and callable skill. Finally, add a hook that prevents untested code from being presented as working.
Q: Why should raw expert material be compiled into a wiki?
A large folder of raw material can become difficult for Claude to search and interpret because relevant ideas are buried among many unrelated words. A compiled wiki creates pages for sources and concepts, connects related ideas, maintains an index and log, and links rules to supporting evidence. This relationship structure makes the collection more useful for answering questions while preserving the original files unchanged.
Q: What sources can be used to create an expert agent?
The demonstrated agent uses publicly available blogs, lecture transcripts, GitHub repositories, YouTube material, and posts on X. YouTube captions are collected with the free Python packages YouTube Transcript API and yt-dlp. Posts on X are gathered through twitterapi.io, a paid API. The collection prompt assigns one agent to each source and asks every agent to document what it retrieved.
Q: How can an AI agent avoid inventing an expert’s principles?
Require every extracted principle to include an exact quotation and a link to the source where that quotation appears. The wiki should connect each rule to its supporting sources and connect each source back to the rules it supports. If no direct source exists, the agent should explicitly label the statement as an inference based on the expert’s material instead of presenting it as a verified position.
Q: What teaching rules were extracted for the Karpathy agent?
The seven extracted rules are: build it or you do not understand it, address the first-order term first, predict before running and then compare the result, show the wrong version first, prove rather than claim, state assumptions, and prefer simpler solutions. These rules guide both explanations and coding behavior, and each rule is expected to connect to supporting source material.
Q: What is the difference between the sub-agent and the skill?
The sub-agent is a separate Claude instance with its own instructions, memory, context window, teaching rules, communication style, and task loop. It can receive a focused assignment without carrying the entire parent conversation. The skill is the user-facing command that sends a problem to that agent, invokes its teaching behavior, and grades the resulting answer against a checklist with one line for each rule.
Q: How does the run gate verify code before an answer?
The run gate is implemented as a hook that activates when the agent attempts to finish its turn. If the agent wrote code but did not execute it, the hook blocks the answer and returns the task with a message requiring the code to be run first. This creates a verification loop that prevents the agent from claiming success solely because generated code appears plausible.
Q: Can this method be used with experts other than Andrej Karpathy?
Yes. The same process can be applied to a sales teacher, author, coach, or another expert with accessible source material. Collect that person’s work, compile it into a connected wiki, identify source-backed rules that describe how the person explains or solves problems, and encode those rules in an agent and skill. The resulting system focuses on reusable reasoning and teaching patterns rather than voice imitation.
Summary & Key Takeaways
-
The project begins by collecting an expert’s publicly available lectures, blogs, repositories, and social posts. Separate agents can crawl each source in parallel, while source-specific tools retrieve material from platforms such as YouTube and X. The demonstrated collection produced more than 700,000 words organized into source-specific folders.
-
The raw collection is transformed into an interconnected wiki rather than used as one large note dump. The compilation process preserves raw files, creates pages for sources and concepts, connects related topics, maintains an index and log, and links each principle back to the supporting material so users can inspect its origin.
-
The resulting knowledge base supplies seven source-backed rules to a dedicated sub-agent and callable skill. The agent teaches by building small versions, predicting outcomes, showing mistakes, testing claims, stating assumptions, and preferring simplicity. A completion hook adds enforcement by blocking answers that present code as working without running it first.
Read in Other Languages (beta)
Share This Summary 📚
Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator
Explore More Summaries from Nate Herk | AI Automation 📚






Summarize YouTube Videos and Get Video Transcripts with 1-Click
Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator