Modern Creator
Tech With Tim · YouTube

Claude Code: The Advanced Guide (99% of Devs Skip These Features)

A screen-recorded tour of nine Claude Code features past basic autocomplete: subagents, skills, hooks, MCP, worktrees, headless mode, checkpoints, and session management.

Posted
5 days ago
Duration
Format
Listicle
educational
Views
49.9K
444 likes
Big Idea

The argument in one line.

Claude Code has a second layer of features beyond chatting in the terminal, subagents, skills, hooks, worktrees, and headless mode, and using them turns it from an autocomplete tool into a system you can delegate real work to.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You already use Claude Code daily for coding but have never opened .claude/agents, .claude/skills, or .claude/hooks.
  • You want to run more than one coding agent at once without them stepping on each other's files.
  • You want to trigger Claude from a script or CI pipeline instead of only through the interactive terminal.
  • You keep losing track of past Claude Code conversations and want a cleaner way to name, resume, and branch sessions.
SKIP IF…
  • You've already built custom subagents, hooks, and worktree workflows, this is an intro-level tour, not a deep dive on any one feature.
  • You're looking for MCP server recommendations beyond the one sponsor demo, only Granola is shown in any depth.
TL;DR

The full version, fast.

Nine Claude Code features get demoed back to back: custom subagents (markdown files in .claude/agents that Claude can delegate to and that keep the main thread lean), skills (reusable markdown workflows you can auto-trigger or lock behind manual invocation), hooks (shell commands that fire on events like PreToolUse or PostToolUse, used here to auto-format files and block dangerous commands), an MCP server demo (querying a connected tool's data conversationally, shown with the sponsor Granola), worktrees (isolated project copies that let multiple agents work at once), headless mode (claude -p for scripting and CI, with JSON output for parsing), checkpoints and slash rewind (restoring code and conversation to a prior point after a bad change), and session management (naming, continuing, resuming, and branching conversations so you can return to or fork any past session). The through-line is that Claude Code has a configuration layer most people never open, and each feature is a folder and a markdown or JSON file away from being usable.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:0000:37

01 · Cold open / overview

States the promise: nine advanced features, each with a real demo, so the viewer can set it up themselves.

00:3703:12

02 · Feature #1 - Custom Subagents

Shows a .claude/agents folder with a debugger.md and reviewer.md, explains tools/model fields, then triggers the reviewer subagent live against a PR.

03:1205:45

03 · Feature #2 - Advanced Skills

Explains skills as reusable markdown workflows, demos a locked rollback skill (disable-model-invocation) versus a manually-invoked deploy skill with an argument.

05:4508:49

04 · Feature #3 - Hooks

Walks the Claude Code hook lifecycle diagram, then demos a PostToolUse formatter hook and a PreToolUse hook that blocks dangerous commands.

08:4910:13

05 · Feature #4 - Granola AI Assistant (MCP)

Sponsor segment demoing an MCP server: querying the Granola notetaking MCP server for a recent meeting/lesson transcript directly from Claude.

10:1313:03

06 · Feature #5 - Worktrees

Explains worktrees as isolated project copies, spins up two worktrees in parallel with different prompts, then merges both sets of changes back with a third session.

13:0315:16

07 · Feature #6 - Headless Mode

Demos claude -p piping a build log into a prompt, then JSON output format with jq parsing, and a read-only allowed-tools restriction.

15:1616:47

08 · Feature #7 - Checkpoints & Rewind

Breaks a tip-calculator app on purpose, then uses slash rewind to restore both the code and the conversation to a working checkpoint.

16:4717:28

09 · Feature #8 - Continuing Sessions

Demos claude --continue to reopen the most recent conversation in a project without needing a session ID.

17:2819:38

10 · Feature #9 - Session Management & Branching

Names a session with -n, resumes it by name with --resume, then uses slash branch to fork the conversation and shows resuming either branch independently.

Atomic Insights

Lines worth screenshotting.

  • A subagent is nothing more than a markdown file in .claude/agents with a name, description, tool list, and model choice, Claude discovers and lists it automatically.
  • Only a subagent's final response returns to the main conversation, so delegating to one keeps the main thread's context window from filling up with detail work.
  • Setting disable-model-invocation: true on a skill locks it so Claude can never call it on its own, useful for a destructive skill like a production rollback.
  • A pre-tool-use hook that exits with code 2 blocks the tool call outright, which is how you enforce a hard rule like never running a dangerous shell command.
  • A post-tool-use hook matched to Edit and Write can auto-run a formatter on every file Claude touches, so the whole file gets reformatted with zero manual step.
  • A worktree is an isolated copy of your project on your own machine, similar to a git branch but built specifically so multiple agents can work without touching each other's files.
  • claude -p runs Claude without the interactive terminal and returns just the response, which is what makes it usable inside a bash script or a CI job.
  • Adding --output-format json to a headless run makes cost, turn count, and duration machine-readable with jq instead of only human-readable.
  • Slash rewind restores both the code and the conversation to a prior checkpoint in one action, removing the broken instruction from the conversation so Claude doesn't repeat the mistake.
  • claude --continue reopens the most recent conversation for the current project directory automatically, with no ID required.
  • Naming a session with claude -n <name> up front means you can always get back into it later with claude --resume <name> instead of hunting for a random session ID.
  • Slash branch forks the current conversation without altering the original, so a risky rewrite can be tried and abandoned while the pre-branch version stays intact.
  • A separate, non-worktree Claude session can inspect every active worktree, diff what changed in each, and merge the results back into one repo without losing either agent's work.
Takeaway

Nine folders and files that turn Claude Code into more than a chat window.

WHAT TO LEARN

Each advanced feature is a plain markdown or JSON file in a specific .claude folder, and knowing where those folders are is most of what separates power users from chat-only users.

02Feature #1 - Custom Subagents
  • A subagent is nothing more than a markdown file in .claude/agents with a name, description, tool list, and model choice, Claude discovers and lists it automatically.
  • Only a subagent's final response returns to the main conversation, so delegating to one keeps the main thread's context window from filling up with detail work.
  • Restricting a subagent's tools and model (read-only, a cheaper model) is how you control both what it can touch and what it costs to run.
  • Reach for a custom subagent when you want to delegate work out of the main thread under specific rules, not as a default for every task.
03Feature #2 - Advanced Skills
  • A skill is a markdown file of reusable steps that Claude can auto-discover and invoke on its own, or that a user can force by name.
  • Setting disable-model-invocation: true on a skill locks it so Claude can never call it automatically, which matters for anything destructive like a production rollback.
  • You can pass an argument straight after a slash-command skill (e.g. /deploy staging) instead of writing a full sentence, and Claude still runs the whole procedure.
  • Skills can be written by hand, generated by asking Claude to draft them, or imported from someone else's repo.
04Feature #3 - Hooks
  • Hooks let you run a shell command automatically at fixed points in Claude's agentic loop, session start, before or after a tool call, and more.
  • A post-tool-use hook matched to Edit and Write can auto-run a formatter on every file Claude touches, with zero manual cleanup step.
  • A pre-tool-use hook that exits with code 2 blocks the tool call outright, which is how you enforce a hard rule like never running a dangerous shell command.
  • Hooks are configured in a settings.json inside a .claude/hooks folder, matching tool names to the script that should run.
05Feature #4 - Granola AI Assistant (MCP)
  • An MCP server is how you connect Claude to an external tool's data, and once it's added you can query that tool conversationally from inside a coding session.
  • A meeting-notes MCP server demonstrates the general pattern: Claude pulls a specific past record and answers a direct question about it without leaving the terminal.
  • The demo doubles as a sponsor read, the specific claims about the featured MCP server's accuracy are worth verifying against your own MCP setup before taking them at face value.
06Feature #5 - Worktrees
  • A worktree is an isolated copy of your project on your own machine, similar to a git branch but built to let multiple agents work at once without touching each other's files.
  • You create one with claude --worktree <name>, which spins Claude up inside its own copy of the repo rather than the folder you're standing in.
  • Running two worktrees in parallel lets two agents work simultaneously without either seeing the other's in-progress changes.
  • A separate, non-worktree Claude session can inspect every active worktree, diff what changed in each, and merge the results back into one repo without losing either agent's work.
07Feature #6 - Headless Mode
  • Headless mode (claude -p "prompt") runs Claude without the interactive terminal, so it returns just the response, which is what makes it usable inside a bash script or CI step.
  • Piping command output straight into claude -p (e.g. cat build-log.txt | claude -p) lets you hand Claude context from a file or another program in one line.
  • Adding --output-format json makes the response machine-parseable with jq, including cost, turn count, and duration, so a script can act on the result instead of a human reading it.
  • You can restrict a headless run to a subset of tools (e.g. --allowedTools Read) when the script should only ever look, never edit.
08Feature #7 - Checkpoints & Rewind
  • Claude checkpoints your code at each step of a conversation, so a change that breaks the app isn't a dead end.
  • Slash rewind opens a list of past points in the conversation and restores both the code and the conversation to that exact state in one action.
  • Rewind removing the broken instruction from the conversation, not just reverting the files, is the part that stops Claude from repeating the same mistake.
09Feature #8 - Continuing Sessions
  • claude --continue reopens your most recent conversation in the current project without needing to remember or type any ID.
  • Every session is saved locally with its own ID, so you can jump back into a specific past conversation regardless of which directory you're currently in.
  • Unlike --resume, --continue never asks which session, it always grabs the most recent one for the current project directory, faster but riskier if you've had several unrelated conversations there.
10Feature #9 - Session Management & Branching
  • Naming a session up front (claude -n <name>) means you can always get back into it later with claude --resume <name> instead of hunting for a random ID.
  • Slash branch forks the current conversation without touching the original, so you can try a risky rewrite and still fall back to the version before you branched.
  • You can resume either branch independently afterward, which makes session branching a lightweight way to run 'what if' experiments without commit-level overhead.
Glossary

Terms worth knowing.

Subagent
A markdown file in .claude/agents that defines a name, description, allowed tools, and model for a task Claude can delegate to, running in its own context window.
Skill
A markdown file of reusable steps that Claude can auto-discover and invoke, or that a user can trigger manually with a slash command.
Hook
A shell command configured to run automatically at a specific point in Claude's agentic loop, such as before or after a tool call.
MCP (Model Context Protocol)
A server standard that lets Claude connect to and query an external tool's data, such as a notes app or calendar, from inside a coding session.
Worktree
An isolated copy of a project on the same machine, similar to a git branch, that lets a separate Claude agent work on it without touching the main copy.
Headless mode
Running Claude with the -p flag so it executes a single prompt and returns the response without opening the interactive terminal, making it usable in scripts.
Checkpoint
A saved snapshot of the code Claude takes at each step of a conversation, which slash rewind can restore if a later change breaks something.
Session branching
Using slash branch to fork the current Claude conversation into a separate path, so a risky change can be tested without losing the ability to return to the original conversation.
Resources

Things they pointed at.

Quotables

Lines you could clip.

02:37
It will only take the response from that sub agent and bring that into context for the main thread that we're currently chatting inside.
clean one-line explanation of why subagents keep context leanTikTok hook↗ Tweet quote
02:45
When we start getting near the context window limit, as you guys probably see, the agents start to get a lot dumber.
blunt, relatable pain point every Claude Code user has feltIG reel cold open↗ Tweet quote
10:34
A work tree is really an isolated copy of your project that's on your own computer. It's similar to something like a git branch, but it differs just slightly and works better with agents.
the cleanest one-sentence definition of worktrees in the videonewsletter pull-quote↗ Tweet quote
16:25
Claude will actually checkpoint different builds for you.
short, sets up the rewind demo payoffTikTok hook↗ Tweet quote
The Script

Word for word.

Read-along

Don't just watch it. Burn it in.

See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

analogy
In this video, I'm going to show you nine advanced Cloud Code features that most people don't even know exist. We're going to go through custom subagents, skills, hooks, MCP servers, parallel sessions with things like Git work trees, headless mode, and much more. Now, every single one of these is going to come with a real demo, so you can see how you would actually use it.
And by the end of this video, you'll be able to set it all up in your own project. Now, if you want the references in this video, I'll leave a link below. You can join my school community.
It is completely free and I'll have everything here so you can follow along with a text -based guide. With that said, let's get into it and look at the first feature. So the first feature on my list here is custom sub -agents.
Now, most people know that Cloud is capable of creating its own sub -agents. That means you can give it a prompt and automatically it can delegate to other agents or do things in parallel, right? So it can have multiple agents running at the exact same time.
Now, Cloud will do this automatically, and it can make its own agents without you doing anything. However, you can also create your own custom sub -agents that Cloud can then invoke. Now, the way you do that is you create a .cloud folder, you then create a nested agents folder, and inside of there, you create some markdown files that specify what the agents are.
So you can see, I have two here. I have a debugger agent and a reviewer agent and the format and syntax looks like this. Now you don't need to manually write all of this yourself.
You can tell Claude to create the agent spec for you, but when you have this, it will specify a list of agents that Claude can then invoke. So you'll notice we have a reviewer and a debugger. And for these, we have a name, description, the tools that they're allowed to use, as well as optionally the model that we want them to run.
This can be helpful, especially if you're running a lot of subagents to reduce the cost. So once we have those set up, what we can do is run Claude inside of our project. So I'm inside of the subagents folder here.
And if we want to make sure that these subagents are appearing, we can run slash context. When we do that, it should show us here that we have two custom subagents. You can see they're specified right here.
ask Claude to do something that would involve invoking the sub agents, you should see it spin that up automatically. So for example, I may say something like, please review this PR before I merge it. Tell me if there's any issues.
Okay. Let's go ahead and press on enter. And we should see that it pulls up our reviewing sub agent here and does that automatically.
Boom. So you can see I'll have the reviewer agent examine, and then you can see that it is calling the reviewer sub agent and running that in its own thread. Okay.
So we can see the review agent is done and then we get back the overall response and effectively what Claude does here is it will invoke the sub agent and then it will only take the response from that sub agent and bring that into context for the main thread that we're currently chatting inside. The reason this is important is it means that our main thread stays a little bit leaner, so we can have separate context windows for each of the individual sub -agents that only need to know what it is that they're specifically working on, which typically will give us better accuracy than doing everything in one massive thread, where when we start getting near the context window limit, as you guys probably see, the agents start to get a lot dumber.
So that's custom sub -agents. I would only create them when you want to delegate things out of the main thread, when you want specific rules to be set up in terms of tools, tools, read only, you know, models to be used, etc.
But they are super useful and you can create them in the way that I showed you. Moving on, we talk about skills, but I'm going to show you some advanced features that you haven't seen before related to them. If you're unfamiliar, a skill is just a markdown file that outlines a set of procedures or a set of steps that are kind of like a reusable workflow.
Rather than constantly telling the model to do the same thing over and over again, you create a skill. So it's kind of a reusable workflow and then you can trigger. Now the model can automatically call the skill and it will discover it when it needs to use it.
Or you can manually invoke the skill yourself and force the model to go through the process. Now that's actually the first feature of skills that I want to talk about here. First skill sit inside of dot Claude slash skills, similar to how we have this agents folder for the sub agents.
You can make them manually by writing them yourself. You can ask the agent to create them for you, or you can import them from something like a GitHub repo or someone else's skill. That's already been written.
Now, when you create the skill, you'll see that you can have a name and a description, and this is the only thing the model will see before it decides to invoke the skill. Now inside the skill, you then have all of the steps. Now another interesting thing you can do is add this flag called disable model invocation to your skill, which most people don't know about.
Now, what this will do is actually tell the model whether or not it can call this skill itself or whether you have to invoke it manually. So when you set this to true, essentially that will prevent the agent from automatically loading the skill. So it won't sit inside of the context.
And this will only be used when you invoke the skill yourself. So I'm going to show you what I mean by that. But if I go in to my terminal here and I invoke Claude from this folder first, we can type slash skills and see all of the ones available.
So you can see that we have this deploy skill and this rollback. skill. These are project -based skills.
So they're just available in this specific folder. And you'll see that one of them is locked because I have that disabled model invocation. Now, if I want to actually run that skill, I can invoke it manually by just typing slash rollback.
And then it should go through the process of actually invoking the skill. Now I'm just going to cancel it for right now, because I don't want to do that. Alternatively, if I want to run a different skill, so let's say maybe the deploying skill, I can actually add an argument to this when I run it.
So slash deploy and then staging. So you don't just have to do the slash command. You can say, afterwards, what you want to be done.
Then again, Claude should find the skill, discover it, figure out what needs to be done, and then go ahead and actually run the entire process. I'm not going to walk you through the full thing. I'm sure you guys understand what skills are.
I also could tell Claude to do something that would involve invoking the skill, and then it would just figure it out and call the correct one. Point is that they have a few more features. I wanted to show you that kind of locking.
feature, which is quite useful when you want to have to manually invoke it and not accidentally have the model do it on your behalf. So the next feature to talk about is called hooks. Now, this is a much more advanced feature.
It really deserves its own video, but I'll quickly cover it here so you can look into it more if it seems useful. Now, Claude has a bunch of different events that will happen throughout its agentic loop. The events look something like this.
And while they look a little bit confusing, you can at least get an idea of kind of the flow. For example, we have session start user prompts, submit pre tool use, right? You get the idea and all of these things will occur throughout some kind of process while you're using cloud code.
Now, what you can actually do is you can hook into these events and you can trigger a bash command to run whenever these events occur. So for example, if we scroll down, you can see all the events like session starts, set up user prompts, submit whatever. you can do something like, Hey, whenever it's set up, I want to automatically create a Markdown file, or I want to automatically test my application or Hey, after we use a tool or before we use a tool, I want to make sure that tool is permitted.
You get the idea. Okay. So there's a lot of interesting stuff you can hook into here to customize how Claude works.
And the way you do that is by writing a config file that looks something like this. So let me show you an actual example here on Windows. You can see that this is an example of a config file that you can create right inside of a hooks folder inside of cloud.
So what you'll do if you want to create hooks is you'll create a cloud folder, you'll create a hooks folder, you'll create a settings .json, and then the hooks can include different files that you want to actually run or different scripts that you want to run when an event occurs. So for example, what we have here is post tool use and pre tool use.
And what will happen here is that we're going to match against edit and write. And whenever there's a tool that has edit or write, we're going to run this Python Claude hooks, format hook .py Python script.
So that's going to automatically format all of the code for us before any tool is ran. or sorry, after any tools run, then we have pre tool use. And what this is going to do is run the block dangerous.
So what that's going to do is it's going to block any dangerous commands or whatever from being ran before it allows those to run. So if we have an exit code two, that means block the tool calls so that it cannot work in cloud. I'm not going to go through exactly how you set it up, but the point is we can have these hooks and I'm going to show you now how they actually work.
So let me get out of cloud. Let's change into the other directory, which is Oh three hooks and let's run clot and give it some prompts.
You can see how they trigger. Okay. So we're just going to say something like add a function called get average age to messy .js that returns the average age of all of the users.
Okay. And let's see what we get here. So you can see we're reading a file messy .js searching for a pattern.
Okay. So we're going to go, yes, we do want to allow this. So let's proceed.
Okay. keep going, read file. And we should see that the hook will actually trigger now because it's gone with that process.
Perfect. So you can see the post tool use hook then ran prettier on the file automatically. So the whole file got reformatted after my edit.
So you can see this ran, right? Both our hooks went through and essentially it just worked, right? So we didn't need to do anything.
It just automatically formatted the file. And if we go back here, maybe we can have a look at, uh, let's see here, messy drop JS. And you can see that it was formatted.
So the next feature I want to show you is related to MCPs or model context protocol. Now, these are servers that you can add inside of Cloud that allow you to connect to external tools. Of course, there's tons of different MCPs that are worth adding, and I'll make an entire video on that.
But one that I want to highlight here that I've been using a lot recently is Granola. Now, they've kindly sponsored this video and been a long term partner of the channel. But this is an AI note taking app that I use pretty much every single day.
It automatically transcribes your meetings without joining your call. So rather than having that little annoying note taker that joins in, it just sits on your computer. It reads your computer audio and it keeps track of all of your notes, keeps track of your calendar and sends you reminders and then saves everything in a nicely formatted way so you can view it and also pull it into AI to have additional context.
So earlier this year, they actually released an official MCP server. You can see I'm connected to it right here. It allows us to query all of the different meetings.
And I want to show you just in live time how it works using the granola MCP server. Tell me what I learned. in my most recent Indonesian lesson.
And that's because using griddle, I actually automatically transcribe all of my lessons with my teacher. So it should tell me some words that I actually learned here. Let's see.
Cool. So we can see it pulled the most recent transcript and gave me all of the information. Now we'll just open up the UI so you can see what it looks like.
Notice that we have the Indonesian language lesson, a bunch of other stuff that I was going through and you get the point. Granola is great. Download it from the link in the description.
And now let's move to the next feature. So the next feature to discuss here is work trees. Now this is super useful whenever you're going to run Claude in parallel and you want to make sure that agents aren't changing things that other agents are working on.
It's a Effectively essential if you want to have multiple agents that are working on the same pieces of projects. Now, a work tree is really an isolated copy of your project that's on your own computer.
It's similar to something like a Git branch, but it differs just slightly and works better with agents. Now, you don't really need to understand the mechanics of the work tree, but what you need to know is how to invoke one and create one. Now, Claude will sometimes do this automatically for you, but you can do it manually and it's best practice to create it on your own.
So for example, I'm inside of a folder, you know, work trees, right? Where I have a quick demo setup. What I can do is run Claude, but rather than just running Claude, I can add this work tree flag.
Now for the work tree flag, after this, I can do something like fix, delete bug. Now, what I'm doing is giving this work tree a name. And when I go ahead and press on enter here, Claude is now going to be running inside of my folder, but inside of this work tree.
So it's on its own isolated version, which is essentially a copy of whatever was inside of my project. And from here, I can give this a prompt. So let me just copy this in read bug .md, reproduce the bug, right?
Find the root cause and fix it. And then at the same time, I can create a new work tree and another terminal. So Claude work tree, and let's go maybe feature dark mode or something.
Cause we want to add a dark mode feature. And again, I'm just going to copy in another prompt from here. Let's put it in this, I don't know, auto mode.
and same thing here. Okay. So let's go.
Yes. And just put it in auto mode. And you'll see that both of these are now going to work in their own repo or own copy of the repo.
So they're not accidentally going to mess something up. All right. So we can see that both of the agents have finished.
So now let's just open up another cloud code session here. This one, I didn't put in a work tree and I'm going to say, can you find all of the changes that have been made across the different work trees for this repo or for this project and tell me which ones are there and just ensure that they are actually in isolation.
And then I want to combine them together. Okay. So let's press enter here.
And by the way, if you guys are wondering what I'm using to dictate, I'm using a really cool tool called whisper flow. You can see, I have almost 300 ,000 words at this point. I use it literally every single day.
I do have a partnership with them. It's free to try out. So I'll leave a link to it in the description, but it's just the fastest way to work with AI, as you guys can see from my own usage.
So anyways. I would highly recommend from here. Let's go.
Yes, I'm just going to put this in auto mode so it can run and let's see what it tells us. So you can see right away that it found both of the work trees and now it's inspecting them. And then we'll be able to do is actually combine these changes together without losing anything or messing up either one of these branches right there.
We're running in isolation. Okay. And we can see it was able to kind of reconcile all of this together.
And now it told us what was in both work trees and then it combined them or merged them so that now everything is in this one repo. Anyways, that's work trees. Definitely use them, especially when you have multiple agents.
So the next feature I want to show you here is headless mode. And this allows you to run Claude without actually being in the interactive terminal, which is super useful when you want to use this as a part of something like a bash script or kind of a one -step process. So I'm just going to show you a few really quick examples.
And of course, if it's going to be useful to you, you'll know. So you can see that I'm inside of the headless folder. And what I'm going to do is actually, let's make sure we get the full thing.
I'm going to run the cat command. So this is just going to log out whatever's in this build log .txt. And then it's going to pipe that into this.
where we have Claude dash P, which essentially is prompt. And then we place a prompt right here. So what's going to happen when I run, this is Claude is going to run, but it runs in headless mode where it's not opening up the interactive window for us.
And it just gives us the response. So I was able to take the result of the bill log. I was able to include that as part of the context in this Claude prompt, and then just tell it, Hey, you know, why did this fail?
And then it gave me the response right here directly in my terminal. which means you can then use this as a part of other scripts. Now I'm going to show you even how we could use this with something like JSON.
So for example, now I said, Hey, I want the output format to be in JSON. And I want to use JQ to actually parse out the result. And now we're going to have this in a format where I could use it more kind of reliably in a script.
So here you can see build failed gives us the errors. You get the idea. Now let's have a look at maybe some of the metadata here.
So same thing, I'm going to do this again, summarize this build failure in one sentence, output format JSON, and notice this is what the result looks like. So we get the result, we get the total cost, the number of turns and the duration in milliseconds. And of course, the cost doesn't really make sense in this context, because I have the subscription, but you get the idea.
Let's do one more. So maybe I want to run this, but I only want to allow it to read something. So I don't want it to actually have access to a bunch of tools, I can add allowed tools read.
The reason I'm showing this to you is that you don't need to use Claude from the interactive terminal. You can trigger it from scripts. You can run it on one -off prompts using this command, which I always thought was really useful.
So to kind of prove what I mean here, notice that I wrote this triage script and you can see that what we actually do here is we run this Claude headless mode automatically and then get the result and print it out. Now I'm not going to run this script, but the point is I can do something like this where I'm actually triggering it inside of a script.
All right. So the next feature that I want to show you here is checkpoints and rewinding. Now, in order to do this, I'm just going to do a prompt in a new example that I have here where I tell it to rewrite app .js from scratch as a single tip calculator class.
We have like, you know, a quick kind of react example or whatever. And we'll just give this a second here to rewrite it. And I want to show you how I can roll back so we can actually go back to different checkpoints in case Claude makes a mistake.
So this is effectively the app I had super simple, right? Where we can just calculate the tip based on the bill amount splitting between a certain number. people, you get the idea.
Now let's do one more prompt here where I'm just going to tell it to rename every function and its ID. I not to touch index dot HTML. And hopefully I'm going to have this actually break the app so I can show you how we can roll back to a working version.
So now you're going to see that actually the app is completely broken. And if I try to do anything, it just doesn't work because I intentionally broke it. So let's say you were to do that, but obviously unintentionally, and you want it to go back to a previous point.
Well, Claude will actually checkpoint different builds for you. So what you can do here is you can use the command slash rewind. Now, when you do that, it's going to show you whatever was in the current conversation, and you can go back at any point.
So we have current, we have rename every function, we have rewrite every app, whatever. So I'm going to go to rewrite and I'm going to go restore code and conversation.
And now it brings me back to the stage where if I go back to my application here and I refresh, okay, let's put in a hundred and you can see now the app is working. So basically just understand that you have that slash rewind feature. So you can always roll back in case you make a mistake.
Now, this next feature is super useful when you want to go back into an old conversation that you had in a particular project. So let's say I go into, I don't know. three hooks, right?
And I want to go back into the previous conversation that we had at that point. Well, in order to do that, I can actually just type Claude dash dash continue. Now this is going to bring me back into whatever that conversation was because the session is stored and saved on our machine.
There's actually multiple ways to get into different sessions, which I'm going to show you in a second. But the point is that you can do this, right? So you don't need to always restart a new session.
You can resume different sessions. You'll even notice here that it has various IDs for each session, which you can manually invoke to get back into regardless of what directory you're in.
So now that you understand, continue, let's talk about being a little bit more proactive with our sessions. So you saw that random ID we had for sessions previously. That's great, but you can actually name your sessions as well.
So for example, when I run clot, I can do dash N and then call this something like auth refactor. Now I've just named the session auth refactor. So it's always going to be saved as that.
And again, I can give this a long prompt. So let's paste something in like this and notice in the bottom, right at my screen that it shows us what session we're in.
We'll just put this in auto mode so it can go. So I'm going to say, look at source, you know, auth JS, make a change, whatever. And then we can get out of this session and come back into it any point that we want.
Okay. So let's get out of this. And I'm going to show you again, if I want to resume this one, I can do claw dash dash resume and then auth refactor.
And it's going to bring me right back into where I was before. And there's some other interesting stuff we can do in here. For example, we can use slash branch.
Now, when we do that, it's going to create a branch of the current conversation, but not override this session. So when I do that, notice that I'm now in a branch. Okay.
And then I can ask it to do something that may be risky that I want to potentially have to get back to the main conversation for. So let's say actually scrap incremental changes, rewrite the entire module as a class with static methods and see how that looks. Okay.
And you can see that we're now working inside of this branch of the main conversation. Okay. So this is finished.
And now what I can do, if I want to go back to the original branch, so not the one that I just branched off on, I can type slash resume and I can go back into this before the branch. So we no longer have those changes that were applied. And then same thing.
I can go slash resume here and you can see we have the branch and I can go back into that. The point of me showing this to you is that you can be really clever how you manage sessions inside of Claude. There's actually a lot more that you can do that I haven't shown you in this video because it's meant just to be kind of a quick run through, but you can name them, you can branch them, you can resume them, you can go in and out of them, and you can be really clever and have a lot of parallel work going on that's also going to be safe.
So anyways, guys, with that said, that's going to wrap up this video. If you enjoyed, leave a like, subscribe, and I will see you in the next one.
The Hook

The bait, then the rug-pull.

The pitch is direct: most developers use Claude Code like a smarter autocomplete, and this walks through nine features, subagents, skills, hooks, worktrees, headless mode, and more, that most never open, each backed by a live demo.

Frameworks

Named ideas worth stealing.

00:23list

The 9 Advanced Claude Code Features

  1. Custom Subagents
  2. Advanced Skills
  3. Hooks
  4. MCP (Granola demo)
  5. Worktrees
  6. Headless Mode
  7. Checkpoints & Rewind
  8. Continuing Sessions
  9. Session Management & Branching

The full countdown structuring the video, stated up front in the cold open.

Steal foran onboarding checklist for a dev team adopting Claude Code beyond chat
06:00concept

Claude Code Hook Lifecycle Events

  1. SessionStart
  2. UserPromptSubmit
  3. PreToolUse
  4. PostToolUse
  5. SubagentStart / SubagentStop
  6. Stop / StopFailure

The sequence of events in Claude's agentic loop that a hook can attach to, shown via the official docs diagram.

Steal fordeciding where to enforce a formatting or safety rule in any agent pipeline
CTA Breakdown

How they asked for the click.

VERBAL ASK
08:49product
They've kindly sponsored this video and been a long term partner of the channel... Download it from the link in the description.

Native sponsor integration, the sponsor's product (Granola) is presented as its own numbered feature (#4, MCP servers) rather than a separate ad break, then closed with a direct download link call.

Storyboard

Visual structure at a glance.

cold open
hookcold open00:00
subagents demo
valuesubagents demo00:51
hook lifecycle
valuehook lifecycle06:00
sponsor MCP demo
ctasponsor MCP demo08:57
worktrees demo
valueworktrees demo10:11
headless mode
valueheadless mode13:07
session branching / close
valuesession branching / close19:01
Frame Gallery

Visual moments.

One-click upgrade to your Google

Get more breakdowns in your search results

Add Modern Creator as a preferred source and Google shows you more of our breakdowns in Search, Top Stories, and AI Overviews. It only changes what you see, and you can undo it in your Google settings anytime.

Add to Preferred SourcesOpens your Google source preferences with us pre-loaded. Tick the box and you're done.
Watch next

More from this channel + related breakdowns.

11:25
Matt Pocock · Tutorial

I Open-Sourced My Own AFK Software Factory

Matt Pocock built and open-sourced Sandcastle, a TypeScript library that runs Claude Code and other coding agents inside sandboxes to plan, implement, review, and merge whole GitHub issues without a human clicking approve.

April 30th