fupio

Fupio is the easiest way to share online Learn more »

Join Fupio
egghead.io - Bite-sized Web Development Video Tutorials & Training

egghead.io - Bite-sized Web Development Video Tutorials & Training

Awesome lessons on modern web tools that you use to get work done.

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
This presentation is a collection of the workflows, shortcuts, and habits I use every day to manage swarms of agents without getting buried in context. Over time I've found that the biggest gains don't come from any one model or tool—they come from reducing friction, keeping conversations focused, and making it easy to move between different threads of work. We'll go hands-on with the practical side of that process: creating aliases and keyboard shortcuts, resuming and forking conversations,

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Extract the Three.js camera into a factory function that subscribes to a shared resize observer and returns a dispose method. Learn how to handle Vite's hot module replacement with import.meta.hot to clean up cameras, renderers, and WebGL contexts, preventing duplication and boosting dev performance.
https://egghead.io/lessons/organize-your-three-js-project-part-3~v1608

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Extract the Three.js renderer into its own factory function that accepts a canvas and resize observer, returning a dispose method for proper cleanup. Learn how factory composition keeps main.ts as a clean orchestrator while decoupling subsystems and handling window resize events efficiently.
https://egghead.io/lessons/organize-your-three-js-project-part-2~0qvax

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Refactor a messy Three.js main.ts into scalable, maintainable code using factory composition. Learn to build modular subsystems with cleanup methods and create a reusable resize observer utility that decouples the camera and renderer, turning your main file into a clean orchestrator for 3D scenes.
https://egghead.io/lessons/organize-your-three-js-project-part-i~h7e32

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Use the rotation property to rotate objects around the X, Y, and Z axes. Learn why Three.js uses radians instead of degrees, how to convert between them using Math.PI, and how rotation direction is determined by sign.
https://egghead.io/lessons/rotating-objects~9ywu7

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Use the scale property to resize objects along each axis independently. Learn that scale values are multipliers on the geometry's original dimensions, and use MeshNormalMaterial to better visualize face changes while experimenting.
https://egghead.io/lessons/scaling-objects~le03z

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Set up a PerspectiveCamera by understanding FOV and aspect ratio, initialize a WebGLRenderer tied to a canvas element, and fix the most common beginner mistake: camera and object starting at the same position.
https://egghead.io/lessons/camera-and-renderer~rw7oa

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
A common limitation of AI agents is that the conversation stops once a task is completed, breaking your flow and forcing you to manually figure out the next step. What if the agent could proactively ask you what to do next, every single time? This lesson demonstrates a powerful technique using Claude Code's Stop hook to create a truly continuous and interactive workflow. By intercepting the agent's attempt to stop, you can programmatically block it and instead instruct it to use the AskUserQuestion

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
AI interactions are often a one-way street: you give a prompt, and the AI responds. But what if the AI needs your input to clarify instructions, gather preferences, or decide on the next step? This is where Claude's built-in AskUserQuestion tool becomes essential. This lesson explores this foundational, internal tool that allows the AI to pause its execution and ask the user a series of questions. You'll learn that while you can't build your own version of this tool, you can completely

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
When building complex automations with Claude, it's crucial to understand that any settings defined for your main agent—including powerful hooks—are inherited by any sub-agents it creates. This can lead to a dangerous "worst-case scenario": a PostToolUse hook that calls Claude again can trigger an infinite recursive loop, spawning endless processes and potentially crashing your system and burning through your API tokens. This lesson demonstrates this exact problem and provides a clear,

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Building Claude skills in plain English is intuitive and allows the AI agent to use sub-agents to figure out complex tasks. However, this approach can be slow, less reliable, and costly as the agent has to reason through the steps every time. This lesson demonstrates a powerful "self-improving" workflow. Start by defining a skill with natural language instructions. Run the skill once, allowing the agent to discover the necessary CLI commands. Then, instruct the agent to analyze its own

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
While Claude Skills offer incredible flexibility for agent-driven workflows, sometimes you need absolute, programmatic control over a task. This is where MCP (Model Context Protocol) Tools excel. MCP Tools are a powerful alternative to Skills, designed for when you need a well-defined, unambiguous API for the AI to call. This lesson demonstrates how to build a custom compress MCP tool from scratch. You'll learn how to convert a standard CLI script into a tool with a strict input schema using

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
In Claude Code, both Skills and Slash Commands allow you to extend the AI's capabilities, but they serve distinct purposes. It can be confusing to know when to use one over the other. This lesson clarifies the fundamental difference between them and demonstrates the ideal use case for each. You'll learn that Slash Commands are for tasks you want to invoke manually and directly from the command line—acting as convenient shortcuts. In contrast, Skills are tools you provide for the AI agent to

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
The allowed-tools setting offers good control, but what if you need to enforce even stricter rules, like allowing only specific script directories or blocking commands that reference sensitive files? This lesson dives into Claude Code Hooks, specifically the PreToolUse hook, to create a powerful security layer for your AI agent. You'll learn how to write a custom hook in TypeScript, powered by Bun, that intercepts every tool call before it executes—adding an extra layer of protection beyond

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
While individual AI agent skills are powerful, their true potential is unlocked when they can be combined to perform more complex, multi-step tasks. One skill might need the output of another to complete its work, creating a dependency chain. This lesson demonstrates how to build modular, composable skills that can call each other. We will create a compress skill that needs a timestamped filename, and we will instruct it to use a separate timestamp skill to get that information. ### The

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
When building custom skills for Claude, you might find that the output is too generic or doesn't follow the exact file structure and content format you need. Simple instructions aren't always enough to guarantee precision. This lesson demonstrates a powerful technique to gain fine-grained control over AI agent behavior: adding an Examples section to your skill's SKILL.md file. By linking to a separate, detailed example markdown file, you can provide a clear blueprint for the AI to follow.

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
AI 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." You'll learn the file structure and SKILL.md format required to define a new skill, including the crucial description for discovery and allowed-tools to safely grant access to shell commands. By building a simple timestamp skill, you'll see how to provide Claude with the exact knowledge

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Debugging hooks can be confusing at first. Using console.log doesn't work because stdout is reserved for communicating with the AI. You need a different approach for both quick debugging and production-ready logging. This lesson takes you from quick debugging with console.error to building a robust, persistent logging system using JSONL files. You'll learn why certain outputs are silent, how to see immediate debug information, and how to create a production logging solution with automatic

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
AI-generated code often misses your project's formatting and linting standards. You find yourself running manual fixes after every AI edit, breaking your flow and risking inconsistent code. Instead of treating formatting as a manual cleanup step, you can make it automatic. This lesson shows you how to use the afterFileEdit hook to automatically run your linter or formatter—like Biome, Prettier, or ESLint—every time the AI modifies a file. The hook detects which file was changed, checks if it

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Relying on documentation or repeated corrections to enforce project tooling standards is tedious and unreliable. The AI might default to common commands like npm instead of your preferred tool, and you find yourself constantly correcting it. There's a better way to enforce these standards automatically. This lesson shows you how to build a beforeShellExecution hook that intercepts every shell command the AI attempts to run. You'll inspect the command, decide whether to allow or deny it, and

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Writing hooks without type safety means you're guessing at property names, relying on documentation for payload structure, and hoping your response format is correct. Every hook becomes an exercise in trial and error, with no editor assistance to guide you. This lesson introduces the cursor-hooks package, which provides complete TypeScript definitions for all hook payloads and responses. Combined with Bun's elegant Bun.stdin.json() method for reading input, you'll write hooks with full

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Bash scripts work for basic hooks, but they quickly become unwieldy when you need to parse JSON, implement complex logic, or maintain the code over time. This lesson transforms your hook development workflow by introducing Bun—a fast JavaScript runtime that lets you write hooks in TypeScript. You'll set up a dedicated Bun project for your hooks, learn how to handle the JSON payloads Cursor provides, and return properly formatted responses to control the AI's behavior. This approach gives you

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Editing raw JSON for your hooks configuration is tedious and error-prone. You have to remember exact hook names, required properties, and valid values—all without any guidance from your editor. There's a simple solution that transforms this experience completely. This lesson shows you how to add a single configuration block to your user settings that enables IntelliSense for all your hooks.json files. You'll get autocomplete suggestions, inline documentation, validation warnings, and hover

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
When hooks don't work as expected, debugging can be frustrating. The basic execution log in Cursor's settings confirms whether your script ran, but it doesn't show what data was sent or what your script returned. This lesson reveals where to find the comprehensive logs that expose the complete input and output of your hook scripts, making debugging straightforward and efficient. ## The First Check: Hooks Settings Your first stop should be the Cursor settings to confirm your hook is configured

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Cursor hooks provide a powerful way to run custom scripts in response to AI agent actions, giving you the ability to intercept workflows, inject context, or trigger automations. This lesson introduces the fundamental mechanics of hooks through the beforeReadFile event, which executes a command just before the AI agent accesses a file. You'll configure the .cursor/hooks.json file, write a simple shell script to capture the JSON payload sent by the hook, and examine the rich contextual data

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Enforcing global rules with user-level hooks eliminates repetition. Move PreToolUse logic to ~/.claude/settings.json and apply conventions across all projects from one central location. ## Project vs. User hooks Project hooks (.claude/settings.local.json): - Specific to one repository - Live in project directory - Good for project-specific rules User hooks (~/.claude/settings.json): - Apply to all projects - Live in home directory - Perfect for personal conventions ## Set up

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Guiding Claude Code with rich feedback turns blocked commands into learning opportunities. Return structured JSON with denial reasons and alternatives so Claude self-corrects in real time. ## Exit code vs. JSON output Exit code 2 (lesson 15): - Blocks tool execution - Shows error to Claude - No structured guidance JSON output (this lesson): - Blocks with permissionDecision: "deny" - Provides permissionDecisionReason with clear alternatives - Creates a self-correcting feedback loop

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Blocking tool commands with hooks gives you fine-grained control over what Claude Code can execute. Use PreToolUse to intercept commands like echo, validate tool usage, and enforce conventions before any tool runs. ## Two ways to block Exit code 2 (simple): - Write error to stderr - Exit with code 2 - Claude sees the error message and stops the tool JSON output (structured): - Return permissionDecision: "deny" - Provide permissionDecisionReason - Claude sees the reason and can

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Blocking prompts with hooks creates essential guardrails. Validate inputs, enforce conventions, and stop inappropriate requests by exiting with the right code and clear feedback. ## The blocking rules Two requirements to reject a prompt: 1. Exit with code 2 - Exactly 2, not 0 or 1 2. Write to stderr - User sees your message ## Block forbidden content Stop prompts with banned keywords:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Template-driven hooks turn one instruction into multiple structured solutions. Load templates from disk, replace placeholders, and get consistent output formats every time. ## The manual variation problem Getting multiple solutions requires: - Repeatedly prompting with different angles - Inconsistent output formats - Lost context between attempts ## Template + hook solution Store a reusable template with placeholders: .claude/prompts/variations.md:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Injecting live data through hooks eliminates copy-paste workflows. Create custom functions that fetch real-time info and rewrite prompts with fresh context before Claude sees them. ## The static context problem Without hooks, live data needs manual steps: - Find the data source - Copy the response - Paste into prompt - Waste context tokens ## Dynamic data injection Build a load() function that fetches on demand:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Type-safe hooks turn Claude Code's JSON payloads into structured TypeScript. Use Bun to parse stdin, the official SDK for types, and skip the jq gymnastics. ## The shell hook problem Basic hooks work but lack structure: - JSON parsing needs extra tools - No autocompletion or type checking - Complex logic gets messy fast ## Bun + TypeScript solution Set up a typed hook environment:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Rewriting prompts with hooks lets you create custom shortcuts and transform simple commands into complex instructions. Use TypeScript to intercept, modify, and replace prompts before Claude sees them. ## Basic prompt transformation Read stdin, modify, and output:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
CLAUDE.md initialization primes Claude Code with a single, evolving source of truth. Use it to record team guidance, keep updates flowing, and separate shared memory from personal notes. ## Generate CLAUDE.md Initialize from the codebase:

egghead.io - Bite-sized Web Development Video Tutorials & Training
egghead.io - Bite-sized Web Development Video Tutorials & Training
Customizing global user settings means Claude Code feels the same everywhere. Use the user file for quality-of-life improvements that shouldn’t live in repos. ## Global status line In ~/.claude/settings.json:
Result: a uniform status line everywhere (directory, git branch, model, token usage, cost), while project configs stay