Nick Saraev delivers a comprehensive 3-hour advanced course on Claude Code, covering everything from CLAUDE.md optimization to agent teams, auto-research workflows, browser automation, security audits, workspace organization, and the future of AI-assisted development. This is aimed at intermediate-to-advanced users already familiar with Claude Code basics.
Nick runs a $4M/year business using Claude Code daily and teaches ~2,000 people how to use these tools. This course distills his production-grade workflows into actionable frameworks you can apply immediately.
🎯 Who this is for: Developers who've used Claude Code and want to go from "useful assistant" to "autonomous development partner." If you haven't used Claude Code at all, start with the basics first.
Nick opens the course with arguably the most important concept: understanding what CLAUDE.md actually IS. Most users treat it as a simple config file, but it serves three distinct and critical roles.
🔹 The Three Roles of CLAUDE.md
1. A System Prompt Wrapper
CLAUDE.md becomes the system prompt that controls Claude's behavior. Unlike raw system prompts you'd pass via API, CLAUDE.md is version-controlled, shareable, and persistent. It travels with your repository. When Claude Code starts, it reads CLAUDE.md and uses it as foundational instructions for everything that follows.
2. A Project Map
Contains project structure, conventions, tech stack info. It tells Claude what the codebase looks like and where things are. This is critical because it reduces exploratory searches that waste context. Without a good project map, Claude will spend tokens reading files just to figure out your project structure — tokens that could be spent on actual work.
When CLAUDE.md references skills, it acts as a dispatch table. Claude reads the CLAUDE.md, sees available skills, and loads the appropriate one based on the task. This is the most advanced usage pattern and turns CLAUDE.md into a dynamic routing layer.
Include a "Lab Notes — What NOT to Do" section documenting failed approaches so Claude doesn't repeat mistakes. This is a high-ROI pattern: Claude reads the lab notes and avoids previously-attempted dead ends.
💡 Pro Tip: Lab notes are especially valuable in long-running projects where you've already tried and discarded certain approaches. Without them, Claude will waste time rediscovering the same dead ends.
Nick recommends including a brief profile section in your global CLAUDE.md — your role, expertise level, preferred communication style. This helps Claude calibrate its responses appropriately.
Nick defines what an "agent harness" actually means: Claude Code IS the harness around the model Claude that enables tool calling and actual work. The model alone is just a text predictor — the harness turns it into an agent.
🔹 Components of the Harness
The harness includes all the infrastructure that wraps around the base model:
The system prompt (CLAUDE.md) — behavioral instructions
Tool definitions — file editing, terminal, search, etc.
Memory systems — persistent context across sessions
Skills — reusable workflow definitions
MCP servers — external tool integrations
Hooks — pre/post-execution actions
Security configurations — permission boundaries
💎 Key Insight:"The harness matters as much as the model." Two identical models with different harnesses will produce vastly different results. This is why Claude Code outperforms raw API Claude for development tasks — the harness provides the scaffolding for effective work.
Nick demonstrates building harnesses that combine all these components into a coherent system. The walkthrough covers how prompts, memory, skills, and tools are injected into the model's context, and how to think about the harness as an engineering system, not just a prompt.
The critical mental model shift: stop thinking "I'm writing a prompt" and start thinking "I'm building an agent system." The prompt is just one input among many. The tools, memory, and skills are equally important inputs that shape the agent's behavior.
💡 Takeaway: When debugging bad Claude Code output, don't just tweak the prompt. Examine the entire harness: are the right tools available? Is memory stale? Are skills loaded? The issue is often in the infrastructure, not the instructions.
Long-running sequential tasks waste enormous time. Instead of one parent agent doing tasks 1→2→3→4 sequentially, you can stack tasks 2, 3, 4 in parallel, then add a synthesizer step to combine results.
🔹 Why Parallelize?
Speed — N tasks that take T seconds each complete in T seconds (not N×T)
Quality — Multiple perspectives on the same problem yield better solutions
Resilience — If one agent path fails, others may succeed
🔹 Agents Are Stochastic
A fundamental truth: agents don't produce the same output every time. The same prompt with the same context can yield different approaches, different code, different solutions. Most people see this as a weakness. Nick reframes it as a feature.
This is the star pattern of the parallelization section:
Fan out: Run N agents on the same problem with different approaches
Collect: Gather all N outputs
Synthesize: Have a synthesizer agent combine the best elements from all N outputs
54:22
💎 Key Insight: Stochastic consensus produces higher-quality results than any single run. It's like having three developers independently solve a problem, then having a tech lead pick the best parts from each solution.
Nick walks through how to coordinate sub-agents in practice — how the parent agent delegates, how sub-agents communicate results back, and how the synthesis step works mechanically within Claude Code.
A hands-on demo showing the stochastic consensus pattern running in real time. Multiple agents tackle the same task, their outputs are collected, and a final synthesis produces a result superior to any individual agent's work.
⚠️ Note: Parallelization increases API costs proportionally. Running 3 agents in parallel costs 3× as much as a single run. Balance quality gains against budget constraints.
Agent teams go beyond simple sub-agents. Instead of one agent orchestrating sequential sub-tasks, you define a TEAM of specialized agents that collaborate on a complex goal.
🔹 Teams vs. Simple Sub-Agents
Simple sub-agent delegation: Parent assigns task → sub-agent completes → returns result. This is one-directional and sequential.
Agent teams: Multiple specialized agents work simultaneously on different aspects of a task, with coordination and a consensus/synthesis step that combines their work.
💎 Key Insight:"Agent teams are a lot better" than simple sub-agent delegation for complex, multi-faceted tasks. The difference is analogous to assigning one person three tasks sequentially vs. having three specialists work on their domain simultaneously.
Nick shows how to combine skills with agent teams: read a skill definition, then use the agent teams feature to spawn specialized workers based on the skill's requirements. This is where the power multiplies — skills provide the SOPs, teams provide the execution model.
Each team member can be a specialist — one agent handles database work, another handles frontend, another handles testing. They run in parallel, each with their own context window and tool access, then a coordinator synthesizes their outputs into a coherent result.
💡 When to use teams: Complex tasks with clearly separable concerns. Don't over-engineer simple tasks with teams — the coordination overhead isn't worth it for straightforward work.
Skills are markdown files with structured definitions that encode reusable workflows. They're one of the most powerful patterns in advanced Claude Code usage — essentially, you're teaching Claude repeatable procedures.
🔹 Skill Anatomy
A SKILL.md file contains:
Name — identifier for the skill
Description — what the skill does and when to use it
Allowed tools — which tools the skill can access (scoping permissions)
SOPs (Standard Operating Procedures) — step-by-step instructions for execution
MCP tool references — can invoke external tools
🔹 Skills in Practice
Nick demonstrates two key skills:
Model-chat skill 1:06:55 — A skill for structured conversation with the model
Stochastic consensus skill — Encodes the parallel consensus pattern as a reusable skill
🔹 Skill Organization
Project-specific skills in .claude/skills/ folder
Client-specific skills separate from business skills
Global skills shared across all workspaces
🔹 Sub-Agents Explained
Sub-agents are just Claude Code instances spawned by a parent agent to do focused tasks. They run in their own context window and return summaries. This is important because it means they don't pollute the parent's context — they do their work, compress it into a summary, and hand it back.
💎 Key Pattern: Skills define WHAT to do (the procedure). Sub-agents define HOW to execute (in isolation). Agent teams define WHO works together (coordination). These three concepts compose together for powerful workflows.
Context management is about all the files, folders, and methods you put into a workspace to help Claude understand and navigate the project effectively.
Memory files — persistent learned context across sessions
Organizational hierarchy of agents — delegation structure
1:24:19
💎 Key Insight:"These are just different ways of organizing information." Skills, memory, sub-agents, MCP servers — they're all context management tools. None are magic; they're just structured ways to feed information to the model at the right time in the right format.
🔹 The Real Challenge
Context management is ultimately about information retrieval at the right time. The model has a limited context window. You can't dump everything in. So the challenge is: what information does Claude need RIGHT NOW for THIS TASK, and how do you ensure it gets exactly that?
Solutions stack:
CLAUDE.md — always loaded, so keep it high-signal
Skills — loaded on demand when a matching task appears
MCP servers — queried dynamically as needed
Sub-agents — explore and summarize, compressing information
Memory — persists across sessions for continuity
💡 Mental Model: Think of context management like a librarian system. CLAUDE.md is the reference desk (always accessible). Skills are the card catalog (find the right procedure). MCP is the interlibrary loan (get external information). Sub-agents are research assistants (go find specific things).
Inspired by Andrej Karpathy's approach: use agents to progressively improve things over time through automated research loops. This is one of the most powerful patterns in the entire course.
Define a metric to improve (e.g., page load speed, CLS score, test coverage)
Agent researches current state and proposes improvements
Agent implements changes
Agent measures results against the metric
Loop: if improved, keep; if not, revert and try another approach
Repeat until the metric reaches the target or diminishing returns
💎 Key Insight: This is recursive self-improvement applied to practical tasks. The agent doesn't just try once — it iterates, measures, and adapts. Works best when the feedback loop is short (ideally ~30 seconds per iteration) and the metric is objectively measurable.
🔹 Live Demo: Website Performance Optimization
Nick applies auto-research to website performance optimization on his own site (leftclick.ai), demonstrating real-time improvement cycles. The agent:
Short feedback loops — ideally under 30 seconds per iteration
Reversible changes — can revert if a change makes things worse
Large improvement surface — many potential optimizations to try
⚠️ When it doesn't work well: Subjective metrics (design quality), long feedback loops (deployment-dependent metrics), or irreversible changes. Always ensure you can roll back.
DOM-based — interacts with actual HTML elements. Understands the page structure.
✅ Higher precision for web tasks
✅ Can read and interact with specific elements
✅ Better for data extraction
❌ Only works in browsers (not desktop apps)
🔹 Approach 3: Playwright/Puppeteer via MCP
Programmatic browser control — write code that controls the browser.
✅ Most reliable and reproducible
✅ Best for automated testing and scraping
✅ Can integrate into CI/CD pipelines
❌ Requires more setup
❌ Less flexible for ad-hoc tasks
🔹 Decision Guide
Use Case
Best Approach
Desktop apps, native UIs
Computer Use
Web forms, data extraction
Browser Use
Automated pipelines, CI/CD
Playwright/MCP
Nick demonstrates booking a real appointment through browser automation to show practical capabilities — the agent navigates a booking interface, selects options, fills forms, and completes the process autonomously.
Nick honestly acknowledges that Claude Code performance varies — sometimes dramatically. This isn't unique to Claude; it's inherent to LLM-based agents. The key is having strategies to handle it.
🔹 Strategies for Dealing with Variance
Model Switching
Different models excel at different tasks. Use the right model for the right job — some are better at reasoning, others at code generation, others at following complex instructions.
Retry Patterns
If a task fails, retry with different framing. Sometimes rephrasing the task or breaking it into smaller steps produces dramatically better results. Don't just retry the same prompt — vary your approach.
Use multiple providers/models simultaneously. If Claude is having a bad day on a specific task, route to GPT-4 or Gemini. This requires more infrastructure but provides resilience.
Stochastic Consensus (Again)
Leverage variation as a feature, not a bug. Run multiple attempts, synthesize the best elements. Performance variance becomes quality improvement when you have a synthesis step.
🔹 Alternatives to Claude Code
Nick discusses alternatives honestly:
Codex (OpenAI) — different strengths, different model
Pi — emerging alternative
Amp — focused on specific workflows
OpenCode — open-source alternative
💎 Nick's View: Claude Code is the most capable but not always the most reliable. Capability ceiling is highest, but the floor can sometimes be lower than expected. Build your workflow to handle both peaks and valleys.
For client work (selling AI development as a service): separate client workspaces with their own skills and context, while still being able to reference shared business skills. This prevents cross-contamination between clients while maintaining shared best practices.
💡 Key Principle: Keep the root clean. Don't pollute global context with project-specific details. Global = universal truths. Project = local conventions. Skills = reusable procedures. This layering prevents information overload.
Nick shows how auto-research patterns integrate into workspace organization — having dedicated research outputs that feed back into project context, creating a continuous improvement loop for the workspace itself.
Nick addresses the security elephant in the room. Two camps exist: accelerationists ("Claude Code for everything") vs. security-paranoid ("AI will steal everything"). Nick advocates for 80/20 security — get the biggest wins with the least effort.
Never store secrets in code — use .env files, always
Enable Row Level Security (RLS) on databases, especially Supabase
2:44:52
Auto mode considerations — understand what you're approving when Claude asks for permissions
OAuth implications — be careful with third-party integrations that Claude configures
⚠️ Real Finding: Nick's security audit actually found that many production apps don't have RLS enabled. This means any authenticated user can potentially access any other user's data. This is a critical vulnerability that takes minutes to fix.
Nick demonstrates running a full security audit on his auto-research repo, finding real issues. The agent examines authentication flows, database access patterns, API endpoints, and configuration files, producing an actionable report.
💡 Actionable: Run a security audit on your own projects using this pattern. You'll likely find at least one critical issue you didn't know about. The 30 minutes it takes could save you from a data breach.
Karpathy's auto-research pattern is a template for the future of all AI development: agents that progressively improve themselves and their outputs through automated feedback loops. This will extend beyond code to design, content, business strategy, and beyond.
Agents will get better at remembering and learning across sessions — not just persisting notes, but genuinely accumulating expertise over time. Your Claude Code instance will eventually "know" your codebase as deeply as a senior team member.
💎 Closing Message:"The future is already here, it's just not evenly distributed." Even without money, you have access to incredible technology. The key is discipline in learning how to use it effectively. The people who understand how to build agent harnesses, run auto-research loops, and coordinate agent teams will have enormous leverage.
3:16:05 — "The future is already here" 3:17:31 — Closing remarks on security, productivity divide, and the road ahead
🎯 Key Takeaways
1
CLAUDE.md serves THREE roles: system prompt wrapper, project map, and skill router. Understanding all three unlocks its full potential.
2
Keep CLAUDE.md lean — highest-ROI bullet points only. Add "lab notes" for failed approaches to prevent repeated mistakes.
3
Agent harness = everything around the model — prompts, tools, memory, skills, MCP servers, hooks, and security configs. The harness matters as much as the model.
4
Parallelization turns stochastic weakness into strength — run N agents, synthesize the best elements via consensus for higher-quality results than any single run.
5
Agent teams > simple sub-agents for complex, multi-faceted tasks. Skills define WHAT, sub-agents define HOW, teams define WHO.
6
Skills are structured markdown SOPs — organize by project vs. client vs. global scope for maximum reusability.
7
Karpathy's auto-research: define a metric → research → implement → measure → loop. Best with short feedback loops and measurable outcomes.
8
Browser automation trifecta: Computer Use for desktop, Browser Use for web DOM, Playwright/MCP for automated pipelines.
9
Performance varies — use multi-model strategies, retry with different framing, and leverage stochastic consensus to handle variance.
10
80/20 security: .env files for secrets, RLS on databases, auto-research security audits. Minutes of setup prevent hours of disaster.
11
Workspace hierarchy: global → business → project → skills → memory. Keep each layer focused on its scope.
12
The future is AI as development partner, not just tool. The productivity divide is real — those who master agent workflows will have enormous leverage.