Lessons
Lessons
Standalone lessons and lessons linked to egghead courses. 120 latest of 10318 lessons.
- LessonThe Agentic Power User's Playbook
- LessonOrganize your Three.js Project - Part 3Refactor the Three.js camera into a factory function and handle Vite HMR cleanup with dispose methods to prevent WebGL leaks.
- LessonOrganize your Three.js Project - Part 2Refactor Three.js renderer into a factory function with dispose cleanup and a shared resize observer for a cleaner main.ts.
- LessonOrganize your Three.js Project - Part ILearn factory composition in Three.js: refactor messy main.ts into clean modules with a reusable resize observer utility for scalable 3D scenes.
- LessonDebug with TweakpaneIntegrate Tweakpane to create a live debug panel for scene parameters. Add controls for object position, rotation, and material color.
- LessonResize scene along with browser windowListen for window resize events to update the camera aspect ratio and renderer size. Prevent the scene from stretching or distorting.
- LessonAnimationsCreate a render loop using requestAnimationFrame and Three.js's Clock to animate objects smoothly.
- LessonRotating objectsUse the rotation property to rotate objects around the X, Y, and Z axes.
- LessonScaling objectsUse the scale property to resize objects along each axis independently. Learn that scale values are multipliers on the geometry's original dimensions.
- LessonTransform objects positionMove objects along the X, Y, and Z axes using the position property. Add an AxesHelper to stay oriented in 3D space, use position.set() to avoid verbose code.
- LessonCamera and RendererSet up a PerspectiveCamera by understanding FOV and aspect ratio, initialize a WebGLRenderer tied to a canvas element.
- LessonAdd objects to the sceneCreate a Mesh by combining a BoxGeometry with a MeshBasicMaterial, add it to the scene, and render it.
- LessonInstall three.js and @types/threeIn this lesson we will add three.js package and types support via @types/three to our Vite application and how to import it into our files.
- LessonElements of a 3D sceneWalk through the three core building blocks of every Three.js scene: the Scene, the Camera, and the Renderer.
- LessonCreate a new Vite ProjectScaffold a new project using pnpm create vite, select the Vanilla TypeScript template, and verify the dev server runs correctly.
- LessonCompletely Remove a File from Pushed git HistoryIf we want to completely remove a file from github - including all history - there is a tool that we can use called the BFG.
- LessonSquash Commits Before they are Pushed with Interactive RebaseWe have created 3 commits that we want to squash together before we push them to github. We can enter an interactive rebase with:
- LessonFix Merge Conflicts While Changing Commits During an Interactive RebaseWe'll enter a more complicated interactive rebase with:
- Lessongit Ignore a File that has Already been Committed and PushedWe make a .env file and accidentally push it to github.
- LessonCopy a Commit from One Branch to AnotherIf you want to pull over just a single commit from one branch onto another, you can do that with git cherry-pick [HASH-TO-MOVE]
- LessonUse `git stash` to Save Local Changes While PullingIf we make a change to the same function both locally and remotely, then when we try to pull down the remote changes, we'll run into a conflict - and git won't pull the remote changes down.
- LessonPush a New Branch to github that Doesn't Exist Remotely YetWe'll make a new feature branch with:
- LessonCleanup and Delete Branches After a Pull RequestWe've made a pull request and now we can clean up the branches by deleting the feature branch.
- LessonAdd a File to a Previous Commit with Interactive RebaseWe're going to pick a previous commit and enter an interactive rebase with:
- LessonMove a Commit that was Committed on the Wrong BranchWe'll do some work and commit it - but then realize it was on the wrong branch!
- LessonChange the Commit Message of a Previous Commit with Interactive RebaseWe'll go back into our history with
- LessonExplore Old Commits with a Detached HEAD, and then RecoverTo poke around in old code, we can checkout the hash of an old commit with git checkout [HASH] - but then we'll be in a "detached HEAD" state.
- LessonChange a Commit Message that Hasn't Been Pushed YetIf you make a mistake in a commit message but HAVEN'T pushed it yet, you can change that commit message with --amend:
- LessonRemove Files from Staging Before CommittingIf you've added files to the staging area (the Index) accidentally - you can remove them using git reset.
- LessonUndo a Commit that has Already Been PushedOnce a commit is pushed, you do NOT want to use git reset to undo it - because reset will rewrite the history tree, and anyone who has already pulled that branch will have a bad tree.
- LessonRemove Changes from a Commit Before PushingIf we've already committed changes that we don't want to push, we can also remove those with git reset, but we're going to reset back to a specific commit, either with:
- LessonUse and Compare the Different git Reset Options: --hard, --soft, and --mixedgit reset has three primary options that we might use: --soft, --hard and --mixed (the default).
- LessonRecover Local Changes from `git reset --hard` with `git reflog`If you've removed a commit with git reset --hard, it's still possible to recover the commit using git reflog to look up the commit hash.
- LessonAdd More Files and Changes to a Commit Before PushingTo add more files to the most recent commit, we can add them to the staging area with:
- LessonForce Claude to Ask 'What's Next?' with a Continuous Stop Hook WorkflowOvercome the stop-and-go nature of AI interactions by using a powerful Stop hook in Claude Code. This lesson shows you how to intercept the end of a conversation to force the agent to ask "What's next?", creating a continuous, guided development workflow.
- LessonCreate Interactive AI Tools with Claude Code's AskUserQuestionLearn how to leverage Claude's built-in AskUserQuestion tool to transform one-way AI interactions into dynamic, multi-step guided experiences. This lesson demonstrates how a custom system prompt can turn this foundational tool into a specialized interactive...
- LessonAvoid the Dangers of Settings Pollution in Subagents, Hooks, and ScriptsLearn how Claude subagents inherit project settings and how this can create dangerous infinite loops if a hook calls Claude recursively. This lesson demonstrates how to prevent this "worst-case scenario" by using the --settings flag to provide the sub-agent...
- LessonOptimizing Claude Skills from Subagents to ScriptsEvolve your Claude skills from flexible natural language instructions into highly efficient, scripted automations. Learn to have the AI analyze its own command history, generate optimized scripts, and refactor the original skill for faster, more reliable, and...
- LessonClaude Skills Compared to MCP ToolsLearn the key differences between Claude Code's MCP Tools and Skills. This lesson shows you how to build a programmatic MCP tool with a strict schema for precise, single-purpose automation, and clarifies when this approach is better than the natural language...
- LessonClaude Skills Compared to Slash CommandsDifferentiate between Claude Code's Skills and Slash Commands to build more effective AI workflows. Learn when to create manually-invoked commands versus agent-driven skills for dynamic, multi-step problem-solving.
- LessonSecure Your Claude Skills with Custom PreToolUse HooksUse PreToolUse hooks in Claude Code to intercept and validate tool commands, creating a powerful security layer that goes beyond allowed-tools.
- LessonBuild Better Tools in Claude Skills with ScriptsLearn how to overcome limitations in Claude's allowed-tools by abstracting complex CLI commands, especially those with redirects, into dedicated scripts for more reliable and powerful agent skills.
- LessonStacking Claude Skills to Create Complex WorkflowsLearn how to chain Claude Skills by creating a compress skill that explicitly requires and uses a separate timestamp skill for powerful, multi-step automations.
- LessonControl Claude Skills Output with References and ExamplesLearn how to add an Examples section to a skill file in Claude, linking to a separate markdown file to provide a detailed blueprint for the AI to follow, ensuring precise formatting and structure in its output.
- LessonCreate Your First Claude Code SkillAI assistants in Claude have limitations, like not knowing the current time, which can cause automation tasks to fail. This lesson teaches you how to overcome these issues by creating custom 'Skills' to grant the AI new abilities, like accessing specific...
- LessonLogging and Debugging Cursor HooksLearn how to effectively debug and log Cursor hooks, moving from simple console errors to a persistent, rolling JSONL file managed with the help of an AI agent.
- LessonAutomate Cursor Code Quality with afterFileEditLearn how to automatically run a linter/formatter on AI-generated code changes using Cursor's powerful afterFileEdit hook.
- LessonEnforce Cursor Tooling Standards with beforeShellExecutionLearn how to create a custom 'beforeShellExecution' hook in Cursor to programmatically block 'npm' commands and automatically guide the AI to use 'bun' instead.
- LessonType-Safe Cursor Hooks with the cursor-hooks PackageLearn a streamlined workflow for building robust, type-safe Cursor hooks using the power of Bun's APIs and TypeScript for autocompletion and error prevention.
- LessonLevel Up Cursor Hooks with TypeScript and BunLearn how to replace clunky Bash scripts with a robust TypeScript and Bun setup for creating powerful, custom Cursor Hooks.
- LessonSimplify Cursor Hooks Configuration with JSON SchemaConfiguring Cursor's hooks.json file can be error-prone without any validation or autocompletion. Learn how to add a JSON schema to your user settings.
- LessonDebugging Cursor Hooks with Output PanelsLearn how to effectively debug silent failures in your Cursor hooks by using the detailed logs in the Output panel to inspect input and output data.
- LessonCapture Agent Context with Your First Cursor HookLearn to set up your first Cursor hook to run a custom script and capture AI agent context before a file is read.
- LessonEnforce Global Rules with User-Level PreToolUse HooksMove PreToolUse hooks to /.claude/settings.json to enforce conventions like "always pnpm, never npm" across every project automatically.
- LessonGuide Claude Code with Rich PreToolUse FeedbackReturn structured JSON from PreToolUse hooks to deny commands with clear reasons and suggestions, creating a self-correcting feedback loop.
- LessonBlock Tool Commands Before Execution with PreToolUse HooksIntercept Bash, Write, or Edit commands before they execute—exit with code 2 to block unwanted operations and enforce workflow conventions.
- LessonBlock Prompts with Hook GuardrailsEnforce team rules by blocking forbidden prompts—exit with code 2, write to stderr, and stop dangerous requests before they reach Claude.
- LessonGenerate Multiple Solutions with Template-Driven HooksLoad prompt templates from files, inject dynamic values, and generate N structured variations with a single v(5) command.
- LessonInject Live Data with Custom Hook FunctionsBuild pseudo-functions like load() that fetch API data on demand, injecting fresh context without manual copy-paste.
- LessonRewrite Prompts on the Fly with UserPromptSubmit HooksIntercept user prompts, transform them with custom logic, and create shortcuts like :plan to streamline repetitive instructions.
- LessonType-Safe Claude Code Hooks with Bun and TypeScriptParse hook JSON with Bun, add TypeScript types from the SDK, and build maintainable automation that beats shell scripts.
- LessonCLAUDE.md Initialization and Best Practices in Claude CodeGenerate a living CLAUDE.md for your repo, keep it fresh in conversation, and layer in private notes via file references.
- LessonCustomize Global User Settings and the Status Line in Claude CodePut preferences in /.claude/settings.json so every project benefits—starting with a richer status line.
- LessonOrganizing Personal and Project Settings in Claude CodeSplit configuration into project-wide settings checked into Git and personal settings ignored by Git; understand how they merge.
- LessonProtect Secrets from Being Read by Claude CodeApply least-privilege defaults, deny reads of sensitive files like .env, and verify that the guardrails hold.
- LessonThe Cost of Context in Claude CodeVisualize what fills the context window, understand base costs, and switch models wisely so you avoid slowdowns and surprises.
- LessonAutomate Tasks in Claude Code with Slash CommandsConcatenate large code areas with repomix and turn long CLI invocations into reusable slash commands you can run from chat.
- LessonTargeting the Proper Context with Claude CodeMaster small-to-medium context by attaching the right files and selections quickly, then layering multi-file prompts without breaking flow.
- LessonThe Essential Claude Code ShortcutsMaster the shortcuts that keep Claude Code responsive—resume sessions, rewind conversations, undo safely, and edit faster than your terminal.
- LessonCombine Claude Code and Your Favorite IDEInstall Claude Code, learn the context-first mental model, and practice the fastest ways to open, prompt, and safely apply code edits.
- LessonBatch Generate Nano Banana Variations with AI Studio and ScriptingLearn how to automate the creation of multiple image variations by exporting code from Google AI Studio and building a powerful Node.js script.
- LessonAutomate Repetitive Tasks by Piping Your Shell History to an AI AgentAutomate CLI tasks with AI. Pipe shell history into a planner agent to generate, review, and execute plans—turning manual workflows into automation.
- LessonBuild an Autonomous Agent with Pre-Approved ToolsBuild autonomous AI agents with pre-approved tools. Use allowedTools and system prompts to enable research, planning, and execution without oversight.
- LessonCreate a Single-Purpose AI 'Planner' AgentBuild a reliable AI planner agent. Learn to craft strong system prompts that constrain behavior so your agent stays focused on creating plans every time.
- LessonTurn Your AI Agent into a Reusable Command-Line ToolTurn your custom AI agent into a standalone CLI tool. Learn bun build, add it to PATH, and run your agent anywhere with a simple command.
- LessonCreate Your First Custom AI Agent in MinutesLearn to build reusable AI agents with Claude CLI. Start with a French-speaking bot, Bun.spawn, markdown prompts, and TypeScript setup.
- LessonCreate a Gemini CLI Powered Subagent in Claude CodeCreate a sub-agent in Claude Code to act as a wrapper for the Gemini CLI, enabling you to offload large-scale code analysis to Gemini's 1M token context window.
- LessonEnforcing Structured Output with JSON Schema and Zod in Claude Code workflowsStop hoping for valid JSON—demand it. Learn to use JSON schemas with AI for structured output, then validate and type it in TypeScript using Zod.
- LessonRun Gomplate Prompt Templating against gpt-oss:20b Locally with OllamaBuild one prompt, run it anywhere. Learn to create a unified workflow that sends templated prompts to Claude or a local model with Ollama for max flexibility.
- LessonControl the Exact Context You Give Claude Code with Repomix and Gomplate PluginsTake control of your AI’s context. Learn to build a gomplate plugin that runs repomix for precise, repeatable prompts using exactly the files you define.
- LessonBuild up Reusable Claude Code Workflows with Dynamic Prompt Templating using GomplateStreamline AI prompts with gomplate, a template engine for injecting file content. Build reusable prompt components for faster, consistent results.
- LessonPipe, Redirect, and Automate AI Output in the TerminalTransform Claude Code CLI into a flexible tool using pipes (|) and redirection (<, >). Feed input from files or commands and save output automatically.
- LessonScript: Creating Reusable AI Automation with MCP and Claude CodeLearn how to transform a multi-step, interactive AI workflow into a single, executable bash script using Cursor's "rules," MCP tools, and the command line.
- LessonAgent: Build a Custom Agent Mode in Cursor for Managing NotesLearn the iterative process of building and refining a sophisticated custom AI agent in Cursor to automate complex, multi-step workflows.
- LessonIdeate: From Daily Notes to Actionable Issues with CursorLearn how to build an automated workflow in Cursor that transforms your scattered daily notes into structured, actionable issues, ready for development.
- LessonContext: Mastering Project Switching in Cursor's AI Memory SystemLearn how Cursor's memory projects persist across chats and the best practices for managing context to prevent errors when working on multiple projects.
- LessonAutomate: Scripting AI Knowledge Creation with MCP CLI ToolsLearn how to programmatically generate and import notes into your knowledge base using a command-line tool, making that knowledge available to your AI agents.
- LessonConnect: Building Interconnected Knowledge Graphs with Foam and CursorYour Markdown notes are a valuable asset, but managing them as a disconnected pile of files is inefficient. This lesson shows how to use the "Foam" ext.
- LessonExtract: Mining AI Insights from Chat Logs with MCP-Powered AnalysisLearn a powerful workflow to automatically extract and structure information from AI chat logs into a persistent, queryable knowledge base using an "extractor"
- LessonStreamline: Automating Cursor History Export with CLI ToolsLearn how to use the cursor-history CLI tool to streamline exporting, organizing, and reusing your Cursor AI conversations for a more efficient workflow.
- LessonCapture: Transforming Cursor AI Conversations into Persistent KnowledgeCapture and organize your AI chats into a searchable knowledge base using Cursor’s Export Chat and Basic Memory—never lose valuable context again.
- LessonFoundation: Building AI Memory with MCP and CursorLearn how to give your AI coding assistant a long-term memory for your projects using Basic Memory, a tool that stores knowledge in local Markdown files.
- LessonUpdate Your LinkedIn Profile with Cursor and the Playwright MCP
- LessonFilter Union Types with Extract and Exclude in TypeScriptLearn how to filter union types in TypeScript using Extract and Exclude for safer, more precise types in real-world apps.
- LessonUse Pick and Omit to Reshape TypeScript Object TypesReshape your object types in TypeScript using Pick and Omit. Keep your code DRY, consistent, and easier to maintain.
- LessonBuild Your Own AI Dev Tools with the Claude Code SDK
- LessonDynamically Inferring File Types from User Prompts in Local AI Scripts
- LessonCreating Dynamic, File-Based Commands for Local AI Scripts
- LessonHandling Invalid Commands and AI Errors in Local Scripts
- LessonGenerating Text with a Local AI Model Based on File Content
- LessonProviding File System Context to Local AI Scripts with Globby and Zod Enums
- LessonProcessing Dynamic User Input in Local AI Scripts
- LessonScripting Local Language Models with Ollama and the Vercel AI SDK
- LessonEnable Cursor to generate predictable project setupsLearn how to combine Cursor AI with Nx generators for predictable library creation in monorepos, ensuring consistent structure across your codebase.
- LessonEnable Cursor to directly access the terminal to read the output and fix issuesSee how Nx MCP gives AI coding assistants direct access to terminal output and running tasks, enabling automatic error detection and fixing.
- LessonGive Cursor monorepo awareness with the Nx MCPLearn how to enhance AI capabilities in monorepo setups using Nx MCP integration with Cursor, providing better project insights and dependency visualization.
- LessonKnow When to Use ? vs | undefined in TypeScriptLearn to avoid type bugs in TypeScript by understanding when to use foo?: string vs foo: string | undefined. Clear examples & best practices.
- LessonCapture Browser Logs with Playwright MCP in Cursor to Generate Reports
- LessonAutofix Browser Errors with the Playwright MCP in CursorAutomate browser-based debugging in web apps using Playwright MCP and Cursor IDE Rules—AI detects and fixes errors in real-time with minimal dev effort.
- LessonLocal AI Code Reviews with the CodeRabbit Extension in Cursor
- LessonCreate a Simple GitHub Issue Search MCP Server using CursorLearn to build a simple MCP server to search GitHub issues and use it from Cursor.
- LessonBuilding a RAG pipeline with Weaviate and OpenAILearn how to leverage Vector Databases and embedding models to build a RAG pipeline in TypeScript with Weaviate and OpenAI models.
- LessonAutomatically Improve Cursor Rules Using Custom Prompts
- LessonClean up Legacy Functions for Testability in Cursor (0.50+) with cmd+k
- LessonWhen to Use Cursor Rules Instead of MCPs
- LessonBrainstorm and Planning with Mermaid Diagrams in Cursor
- LessonCreate Complex Cursor Shortcuts to Run Commands and Generate AI Commits
- LessonRun local Nextjs App in a Cloudflare Tunnel with UntunJSUntunJS is a great package to get the quickest start with Cloudflare tunnels and development and testing
- LessonAI-Driven Design Workflow: Playwright MCP Screenshots, Visual Diffs, and Cursor Rules
- LessonGenerate and Debug MCP Servers from Scratch