YouTube2Text

5 Claude Code Hooks That Stop Its Worst Mistakes (I Run 70) — Transcript

by Hisashi Space · 683 words · 110 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Five Claude code hooks that stop its
  2. 0:02worst mistakes. I run 70 of them.
  3. 0:05One of them took a mistake Claude made
  4. 0:07about a hundred times and now blocks it
  5. 0:09before it ever reaches me. Behind all
  6. 0:1170, there are 127 written records of
  7. 0:15things that went wrong.
  8. 0:16>> [music]
  9. 0:16>> Every one of those hooks exists because
  10. 0:18a written rule didn't work. By the end,
  11. 0:21you'll know which mistakes need one.
  12. 0:24Here's what saying mistake actually
  13. 0:25means. I run a company in Japan and
  14. 0:28Claude code does a lot of my daily work.
  15. 0:30>> [music]
  16. 0:31>> In July, it kept putting long dashes in
  17. 0:33my emails. Those dashes make writing
  18. 0:35look like AI wrote it.
  19. 0:37I told it not to. It said, "Sorry, fixed
  20. 0:41it." and used one again in the very next
  21. 0:43draft. I counted, about a hundred times.
  22. 0:46>> [music]
  23. 0:46>> Another one. After a long work session,
  24. 0:49it would report back to me in English.
  25. 0:51My rule says Japanese. It was right
  26. 0:53there in the file.
  27. 0:55So, why does this happen? A rule in a
  28. 0:58file is something the model reads.
  29. 1:00Reading is not the same as obeying.
  30. 1:03The longer the session, the more other
  31. 1:05text piles up on top of your rule. It
  32. 1:07doesn't disappear. It just gets quieter.
  33. 1:10Writing the rule louder, in capital
  34. 1:12letters, helps for a while. Then, it
  35. 1:15slips again.
  36. 1:16This is where hooks come in. Claude's
  37. 1:19own team puts it this way. Hooks give
  38. 1:21you deterministic control. A hook is a
  39. 1:24small script that runs at a fixed
  40. 1:26moment. Before Claude uses a tool,
  41. 1:29before it finishes a reply, when I send
  42. 1:31a message. The model can forget a rule.
  43. 1:34A script can't. If the check fails, the
  44. 1:37action stops, no matter how long the
  45. 1:39session is.
  46. 1:41The dash hook reads every draft before
  47. 1:43it's saved. One dash and the draft is
  48. 1:46blocked with the reason. Since then,
  49. 1:48every dash gets caught before I see it.
  50. 1:51The language hook checks every reply I
  51. 1:53get. If it's in English, Claude has to
  52. 1:56write it again.
  53. 1:57Those are small. Some mistakes cost
  54. 1:59[music]
  55. 2:00Here are three that turned into hooks.
  56. 2:03One, last month it posted a video to the
  57. 2:06wrong social media account. Same phone,
  58. 2:08different accounts still logged in.
  59. 2:11>> [music]
  60. 2:11>> Now, before any post, a test opens the
  61. 2:14profile and reads the account name on
  62. 2:16the screen.
  63. 2:16>> [music]
  64. 2:17>> Wrong name, no post.
  65. 2:19Two, it told me a bug was fixed. It had
  66. 2:22tested a copy under a different
  67. 2:24condition. On my real setup, it wasn't
  68. 2:26fixed at all.
  69. 2:28Now, if a reply says fixed, a hook asks
  70. 2:31one question. Where did you confirm it?
  71. 2:33No confirmation line, no [music] reply.
  72. 2:36This one caught clawed today while it
  73. 2:38was making this video.
  74. 2:40Three, a browser automation left the
  75. 2:42cursor sitting in a password field. On a
  76. 2:45Mac, that turns on secure input for the
  77. 2:47whole computer.
  78. 2:49My app switching shortcuts stopped
  79. 2:50working until morning. Now, any script
  80. 2:53that touches a password field is blocked
  81. 2:55before it runs.
  82. 2:56So, how do I decide what becomes a hook?
  83. 2:59I follow the same three steps every
  84. 3:01time.
  85. 3:02First, [music] find the real cause on
  86. 3:04the real thing, not a guess. If the
  87. 3:07cause is wrong, the hook guards the
  88. 3:09wrong door.
  89. 3:10Second, make it stop, not warn. Warning
  90. 3:14is just another rule to [music] read. A
  91. 3:16block is the only thing that changes
  92. 3:18behavior.
  93. 3:19Third, break it on purpose. Recreate the
  94. 3:22mistake and watch the hook catch it.
  95. 3:24Then, make sure normal work still
  96. 3:26passes. [music]
  97. 3:27That third step is the one people skip.
  98. 3:30A hook you never saw fire is a hook you
  99. 3:32don't actually have.
  100. 3:34And I don't turn everything into a hook.
  101. 3:37What [music] to make, which topic,
  102. 3:39whether it's good, those stay with me.
  103. 3:42Hooks are for the mistakes that
  104. 3:43shouldn't need a human to catch. That
  105. 3:45frees my attention for the parts that
  106. 3:47do.
  107. 3:48Every hook I have started as a sentence
  108. 3:50I was tired [music] of repeating.
  109. 3:53If you've said it twice, stop saying it.
  110. 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.