YouTube2Text

Writing a CLAUDE.md That Claude Actually Follows — Transcript

by Claude · 455 words · 72 segments · language en · Watch on YouTube

Full transcript

  1. 0:02The Claude MD file is not an enforced
  2. 0:03configuration, meaning if you keep
  3. 0:05adding to one gigantic file, the less
  4. 0:07Claude is able to follow it correctly.
  5. 0:09Here's how you can keep your Claude MD
  6. 0:10file tight and to follow your
  7. 0:12instructions much more reliably.
  8. 0:16Simply put, the longer the file gets,
  9. 0:18the more it has to compete with itself.
  10. 0:20First, is Claude MD even the right tool
  11. 0:22for the job? A hard rule like never push
  12. 0:24to main belongs in a pre-tool use hook
  13. 0:27instead. The hook is designed to stop
  14. 0:28the push even when Claude does try to do
  15. 0:30it.
  16. 0:32The Claude MD file doesn't just exist in
  17. 0:34your project file. There's three other
  18. 0:36places. One's your managed policy, then
  19. 0:38your user file, then your project file,
  20. 0:40and finally local. Claude loads every
  21. 0:42memory file together. Nothing gets
  22. 0:44dropped and or policy is always in play.
  23. 0:46Local is for what's just yours in this
  24. 0:48project. Say you're refactoring off this
  25. 0:51sprint and want Claude to hold your
  26. 0:52architectural decisions in mind. Well,
  27. 0:54that goes in local, not the shared
  28. 0:56project file.
  29. 0:58To make your Claude.md files easier to
  30. 1:00maintain, use the path to file syntax to
  31. 1:03split up your instructions. Just know
  32. 1:05what they buy you though. Claude expands
  33. 1:07imported files in line at launch right
  34. 1:09alongside the file that references them.
  35. 1:11Imports help you organize a large
  36. 1:12Claude.md file, but everything still
  37. 1:14loads up front and they don't reduce
  38. 1:16context.
  39. 1:18So, we can make our Claude.md file much
  40. 1:20shorter. Whether Claude obeys it comes
  41. 1:23down to phrasing and most rules fail
  42. 1:24because they're pretty vague. First, be
  43. 1:27specific and checkable. Don't put things
  44. 1:28like follow best practices. Do you even
  45. 1:31know what that means? Well, don't expect
  46. 1:33Claude to magically. Put new API routes
  47. 1:35in source API handlers, one per file.
  48. 1:38Well, that's explicit. So, put that
  49. 1:40instead. Name the replacement. Don't use
  50. 1:42default exports leaves the alternative
  51. 1:44open. Use named exports, not default
  52. 1:47exports closes that potential
  53. 1:48misinterpretation.
  54. 1:50And then realize that emphasis is a
  55. 1:52budget. Important and you must raises a
  56. 1:54rule priority, but only relative to
  57. 1:57everything quieter around it. Spend them
  58. 1:59on the two or three rules that hurt when
  59. 2:01broken. The file also stays under
  60. 2:03revision. When Claude does the wrong
  61. 2:05thing, we'll treat that as a bug report
  62. 2:07against your claw.md file. Tell it add
  63. 2:10that to the claw.md file and it'll write
  64. 2:12that rule for you.
  65. 2:17Treat your claw.md file like production
  66. 2:19code. If you can't justify a line, well,
  67. 2:22delete it. Move enforcement to hooks,
  68. 2:24organize with imports, and scope path
  69. 2:26specific conventions into your rules so
  70. 2:28that they load only when they apply. The
  71. 2:31leaner the file, the more of it Claude
  72. 2:33follows.

About this transcript

This page contains the full transcript of Writing a CLAUDE.md That Claude Actually Follows by Claude, generated from the public captions YouTube serves with the video. The transcript has 455 words across 72 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 translate the transcript into 100+ languages.

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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.