5 Claude Code Hooks That Stop Its Worst Mistakes (I Run 70) — Transcript
Full transcript
- 0:00Five Claude code hooks that stop its
- 0:02worst mistakes. I run 70 of them.
- 0:05One of them took a mistake Claude made
- 0:07about a hundred times and now blocks it
- 0:09before it ever reaches me. Behind all
- 0:1170, there are 127 written records of
- 0:15things that went wrong.
- 0:16>> [music]
- 0:16>> Every one of those hooks exists because
- 0:18a written rule didn't work. By the end,
- 0:21you'll know which mistakes need one.
- 0:24Here's what saying mistake actually
- 0:25means. I run a company in Japan and
- 0:28Claude code does a lot of my daily work.
- 0:30>> [music]
- 0:31>> In July, it kept putting long dashes in
- 0:33my emails. Those dashes make writing
- 0:35look like AI wrote it.
- 0:37I told it not to. It said, "Sorry, fixed
- 0:41it." and used one again in the very next
- 0:43draft. I counted, about a hundred times.
- 0:46>> [music]
- 0:46>> Another one. After a long work session,
- 0:49it would report back to me in English.
- 0:51My rule says Japanese. It was right
- 0:53there in the file.
- 0:55So, why does this happen? A rule in a
- 0:58file is something the model reads.
- 1:00Reading is not the same as obeying.
- 1:03The longer the session, the more other
- 1:05text piles up on top of your rule. It
- 1:07doesn't disappear. It just gets quieter.
- 1:10Writing the rule louder, in capital
- 1:12letters, helps for a while. Then, it
- 1:15slips again.
- 1:16This is where hooks come in. Claude's
- 1:19own team puts it this way. Hooks give
- 1:21you deterministic control. A hook is a
- 1:24small script that runs at a fixed
- 1:26moment. Before Claude uses a tool,
- 1:29before it finishes a reply, when I send
- 1:31a message. The model can forget a rule.
- 1:34A script can't. If the check fails, the
- 1:37action stops, no matter how long the
- 1:39session is.
- 1:41The dash hook reads every draft before
- 1:43it's saved. One dash and the draft is
- 1:46blocked with the reason. Since then,
- 1:48every dash gets caught before I see it.
- 1:51The language hook checks every reply I
- 1:53get. If it's in English, Claude has to
- 1:56write it again.
- 1:57Those are small. Some mistakes cost
- 1:59[music]
- 2:00Here are three that turned into hooks.
- 2:03One, last month it posted a video to the
- 2:06wrong social media account. Same phone,
- 2:08different accounts still logged in.
- 2:11>> [music]
- 2:11>> Now, before any post, a test opens the
- 2:14profile and reads the account name on
- 2:16the screen.
- 2:16>> [music]
- 2:17>> Wrong name, no post.
- 2:19Two, it told me a bug was fixed. It had
- 2:22tested a copy under a different
- 2:24condition. On my real setup, it wasn't
- 2:26fixed at all.
- 2:28Now, if a reply says fixed, a hook asks
- 2:31one question. Where did you confirm it?
- 2:33No confirmation line, no [music] reply.
- 2:36This one caught clawed today while it
- 2:38was making this video.
- 2:40Three, a browser automation left the
- 2:42cursor sitting in a password field. On a
- 2:45Mac, that turns on secure input for the
- 2:47whole computer.
- 2:49My app switching shortcuts stopped
- 2:50working until morning. Now, any script
- 2:53that touches a password field is blocked
- 2:55before it runs.
- 2:56So, how do I decide what becomes a hook?
- 2:59I follow the same three steps every
- 3:01time.
- 3:02First, [music] find the real cause on
- 3:04the real thing, not a guess. If the
- 3:07cause is wrong, the hook guards the
- 3:09wrong door.
- 3:10Second, make it stop, not warn. Warning
- 3:14is just another rule to [music] read. A
- 3:16block is the only thing that changes
- 3:18behavior.
- 3:19Third, break it on purpose. Recreate the
- 3:22mistake and watch the hook catch it.
- 3:24Then, make sure normal work still
- 3:26passes. [music]
- 3:27That third step is the one people skip.
- 3:30A hook you never saw fire is a hook you
- 3:32don't actually have.
- 3:34And I don't turn everything into a hook.
- 3:37What [music] to make, which topic,
- 3:39whether it's good, those stay with me.
- 3:42Hooks are for the mistakes that
- 3:43shouldn't need a human to catch. That
- 3:45frees my attention for the parts that
- 3:47do.
- 3:48Every hook I have started as a sentence
- 3:50I was tired [music] of repeating.
- 3:53If you've said it twice, stop saying it.
- 3:55Make it impossible.
About this transcript
This page contains the full transcript of 5 Claude Code Hooks That Stop Its Worst Mistakes (I Run 70) by Hisashi Space, generated from the public captions YouTube serves with the video. The transcript has 683 words across 110 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.