YouTube2Text

Give Me 14 Mins and I'll Save You Millions of Claude Tokens — Transcript

by Duncan Rogoff | Learn Claude Code · 2,720 words · 379 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Everybody says you need GitHub repos,
  2. 0:02extra add-ons, or a long list of hacks
  3. 0:04to save tokens, but really you don't.
  4. 0:07Anthropic already built Claude code to
  5. 0:09save you tokens, and Claude code gets
  6. 0:11better at cutting your costs with each
  7. 0:13new release. But, there are four things
  8. 0:16that are quietly costing you money, and
  9. 0:18you're probably doing them right now.
  10. 0:20I'll show you all four and the best ways
  11. 0:23to get the most out of your Claude plan
  12. 0:25or your API usage. And at the end, I'll
  13. 0:27show you the one number that tells you
  14. 0:29if any of it is actually working. First,
  15. 0:32one word because it matters for this
  16. 0:34whole video. That word is tokens. A
  17. 0:37token is the unit Claude charges you
  18. 0:39for, and it's about the size of a short
  19. 0:41word. On a monthly plan, tokens use up
  20. 0:44your limit. If you pay per use with an
  21. 0:45API key, tokens are dollars. So, when I
  22. 0:48say cost, I mean tokens. So, here's what
  23. 0:51actually saves you money. If you
  24. 0:53understand one concept from this video,
  25. 0:55make it this because it's the base for
  26. 0:57everything else. The longer your chat
  27. 1:00runs, the more every new message costs.
  28. 1:03So, the fix is to start a fresh chat for
  29. 1:05each new job. Type /clear, and Claude
  30. 1:08code wipes your chat so you start at
  31. 1:10zero. Clearing costs you nothing. If you
  32. 1:13want [snorts] your old chat back later,
  33. 1:14just rename it by typing /rename. Then
  34. 1:17you can find it in the sidebar and open
  35. 1:19it up again. So, here's how Claude code
  36. 1:22actually works and why a fresh chat
  37. 1:24saves you money. It comes down to one
  38. 1:27fact about Claude. Claude is like a
  39. 1:29brilliant contractor with total amnesia.
  40. 1:32It doesn't remember anything between
  41. 1:34messages. So, every time you send a
  42. 1:36message, you're really sending the whole
  43. 1:38thread from your first message to your
  44. 1:40newest one. Claude reads the whole
  45. 1:42thread, answers, and forgets it all
  46. 1:44again. Everything Claude reads on each
  47. 1:47message is called the context, and that
  48. 1:49reading is what you pay for. So, a
  49. 1:51longer thread means more reading and
  50. 1:54more tokens on every message. That's why
  51. 1:56your chat gets more expensive the longer
  52. 1:58it runs. And a file Claude reads early
  53. 2:02stays in the thread, so you pay for it
  54. 2:04again on every message after. That's why
  55. 2:06you clear your chat or make a new one
  56. 2:08when you start a new job. All that
  57. 2:10reading sounds expensive, but Claude
  58. 2:13Code has a trick to keep that reading
  59. 2:14cheap, and it's called the cache. A
  60. 2:17cache is just short-term memory. Most of
  61. 2:19your chat hasn't changed since your last
  62. 2:21message. So, the cache remembers what
  63. 2:24Claude Code already read, and it only
  64. 2:26has to read your new message. Reading
  65. 2:29from the cache costs a tenth of the
  66. 2:31normal price or less. But, here's the
  67. 2:34catch. The cache only remembers your
  68. 2:37chat as long as nothing changes. Change
  69. 2:40something like switching to a different
  70. 2:42model, and Claude Code has to read your
  71. 2:44whole chat from scratch again at full
  72. 2:47price. And the cache doesn't last
  73. 2:49forever. On a monthly plan, it forgets
  74. 2:52after about an hour. If you pay per use
  75. 2:55or you're using extra credits you
  76. 2:57bought, it forgets after 5 minutes.
  77. 3:00Anthropic cares about this a lot. In
  78. 3:03their own write-up on building Claude
  79. 3:05Code, they say their engineers get an
  80. 3:07alert when the cache isn't being used
  81. 3:10enough, and they treat that alert as an
  82. 3:12emergency the same way they would if
  83. 3:14Claude Code went down. But, the cache
  84. 3:17isn't the only way Claude Code keeps
  85. 3:19your reading light. Here are the other
  86. 3:20tricks one at a time. The first trick is
  87. 3:23connectors. A connector is how Claude
  88. 3:26plugs into an app like Slack or GitHub.
  89. 3:29Each connector comes with a long list of
  90. 3:31instructions for how to use it. Claude
  91. 3:33Code doesn't load all of that at the
  92. 3:35start. It loads just the connector's
  93. 3:37name, and it pulls in the rest only when
  94. 3:40Claude actually uses it. So, click the
  95. 3:42plus, then connectors, and browse for
  96. 3:44existing connectors to your most
  97. 3:46frequently used platforms. There's a lot
  98. 3:48of them. The second trick is how Claude
  99. 3:51handles really long results. Sometimes
  100. 3:54Claude gets back a giant wall of text
  101. 3:56like when it checks its own work. Claude
  102. 3:58code cuts off the long ones and saves
  103. 4:00the full thing in a separate file that
  104. 4:03Claude can open if it needs it. And the
  105. 4:05third trick is helper chats called
  106. 4:08sub-agents. For a big messy job, Claude
  107. 4:10code can start a helper that does the
  108. 4:12messy work on its own. Only a short
  109. 4:15summary comes back to your chat, but
  110. 4:17helpers cost tokens, too, so they're
  111. 4:19only worth it for big jobs.
  112. 4:22So, Claude code is already working to
  113. 4:24keep your reading cheap. Your job is to
  114. 4:27stop undoing it. And the first thing
  115. 4:29that undoes it is a command you've
  116. 4:31probably typed thinking you were saving
  117. 4:33money. So, trap one is treating compact
  118. 4:36like a diet. So, picture one chat.
  119. 4:39You're building a landing page and 90
  120. 4:42minutes in you're at message 60 and it's
  121. 4:44slow. So, you try a command called
  122. 4:47{slash} compact. Here's what {slash}
  123. 4:49compact is supposed to do. It takes your
  124. 4:51whole chat, writes a short summary of
  125. 4:53it, and replaces the chat with that
  126. 4:55summary. Everybody says that shrinks the
  127. 4:57chat, so it must shrink the bill. But
  128. 4:59does {slash} compact actually save you
  129. 5:01money? So, here's what happens. To write
  130. 5:04the summary, Claude has to read the
  131. 5:06entire chat one more time. And that read
  132. 5:09is an extra request. Then, the summary
  133. 5:11replaces your chat. It's like asking
  134. 5:13your assistant for meeting minutes.
  135. 5:15Somebody has to read the whole
  136. 5:17transcript to write them. The minutes
  137. 5:20are short, but the reading already
  138. 5:21happened. If the cache is fresh, that
  139. 5:24extra read is cheap, but if the cache
  140. 5:26expired, you pay full price for it, and
  141. 5:28the summary starts a new cache from
  142. 5:30scratch. So, what is {slash} compact
  143. 5:33actually good for? Making room. [snorts]
  144. 5:35There are two times it makes sense. One
  145. 5:37is when your chat is almost full and
  146. 5:39you're in the middle of a job you can't
  147. 5:40restart. Claude can only hold so much at
  148. 5:43once, so something has to get cut down.
  149. 5:45The other is when you're deep into a
  150. 5:46long project and about to move on to the
  151. 5:49next part of it. You can [snorts]
  152. 5:50actually tell {slash} compact what to
  153. 5:52keep, like {slash} compact keep the plan
  154. 5:55and the file names. If your next job has
  155. 5:57nothing to do with this one, {slash}
  156. 5:59clear is the better move. Either way,
  157. 6:01saving money isn't what compact is for.
  158. 6:04You pay for one big read right now and
  159. 6:06the next messages are cheap only if you
  160. 6:08keep going on the same job. It can also
  161. 6:11lose small instructions you gave early
  162. 6:13on, so check that Claude still remember
  163. 6:15remembers the important ones. Claude
  164. 6:16Code also compacts on its own when your
  165. 6:19chat gets close to full, so you don't
  166. 6:21need to baby sit it. So, if you're done
  167. 6:23with the job, use {slash} clear. And if
  168. 6:26Claude takes a wrong turn, don't type
  169. 6:27that didn't work, type {slash} rewind
  170. 6:30and Claude Code takes the chat back to
  171. 6:32before the wrong turn. And when your job
  172. 6:34isn't done, but your chat is heavy,
  173. 6:36there's a third option and it's my
  174. 6:38favorite, a handoff doc. Ask Claude to
  175. 6:41write a thorough file that covers your
  176. 6:43goal, what's done, what's left, the
  177. 6:45decisions you made, and what didn't
  178. 6:47work. Then run {slash} clear and tell
  179. 6:50your new chat to read that file. That
  180. 6:52costs about as much as compact or a
  181. 6:54little more because Claude has to read
  182. 6:56your chat and write the doc, but you get
  183. 6:58to read the doc and fix it first. You
  184. 7:00decide exactly what survives and you can
  185. 7:03keep it for next week. But there's a
  186. 7:04problem. There's actually a clock
  187. 7:06running behind every chat that can wipe
  188. 7:09out all of this and you've probably
  189. 7:11never seen it. Trap number two is the
  190. 7:13cache expiring. So, that clock is the
  191. 7:16cache expiring. Let's go back to our
  192. 7:18landing page example. You've been
  193. 7:20working on your landing page all morning
  194. 7:22and you're not finished. So, you go to
  195. 7:24lunch. When you come back, you ask one
  196. 7:26tiny question, but what you don't
  197. 7:29realize is that this message costs more
  198. 7:31than the last one. But, why? Because the
  199. 7:34cache expired. So, when it expires, your
  200. 7:37next message re-reads your entire chat
  201. 7:40at full price. And after that, the cache
  202. 7:43is fresh again. Anthropic added a fix
  203. 7:45for this. Recent versions of Claude code
  204. 7:48compact a big chat that's been sitting
  205. 7:49idle for close to an hour right before
  206. 7:52the cache expires. So, when you come
  207. 7:53back, Claude code reads the short
  208. 7:55summary and not the whole chat. That's a
  209. 7:57good example of Claude code getting
  210. 7:59better at cutting your costs with each
  211. 8:01release. But, it's still compact, so it
  212. 8:04still has to read the whole chat once
  213. 8:05and it could still lose small details.
  214. 8:07Another thing that wipes [clears throat]
  215. 8:09the cache is switching models. So,
  216. 8:11Claude comes in different models like
  217. 8:13Opus and Sonnet. Opus is the bigger and
  218. 8:16more expensive one, and Sonnet handles
  219. 8:18most jobs for less. The cache is tied to
  220. 8:21one model, so say you're an hour into a
  221. 8:23chat on Opus and you switch to Sonnet to
  222. 8:26save money. Sonnet can't use Opus's
  223. 8:28cache, so it reads your whole chat from
  224. 8:30scratch at full price. That's a surprise
  225. 8:33because switching to a cheaper model
  226. 8:35sounds like saving. So, pick your model
  227. 8:37before the job starts and stick with it.
  228. 8:40There's also a setting that switches
  229. 8:41models for you. If you type {slash}
  230. 8:44model Opus plan, all one word, while
  231. 8:47you're in plan mode, Claude uses Opus,
  232. 8:49the bigger model, to make the plan. When
  233. 8:51it's time to build, Claude switches to
  234. 8:53Sonnet, the cheaper model, to do the
  235. 8:55building. It's useful, but every switch
  236. 8:57costs that same one-time read. So, if
  237. 9:00the job's done when you walk away, clear
  238. 9:02it, but if the job's not done, a big
  239. 9:04chat may get compacted or the first
  240. 9:06message back costs more. The third of
  241. 9:09the four things quietly costing you
  242. 9:10money happens before you type a single
  243. 9:13word. Let me show you what I mean. Trap
  244. 9:15three is what's already loaded. So, you
  245. 9:17open a fresh chat and you type "Hi."
  246. 9:20But, what you don't realize is that a
  247. 9:21big file just got loaded into your
  248. 9:23contacts automatically. That file is
  249. 9:26Claude.md, which is the file Claude
  250. 9:28reads at the start of every chat. Say
  251. 9:30yours is 600 lines of rules. Claude code
  252. 9:33sends Claude.md with every message, so
  253. 9:36while the cache is fresh, it's cheap.
  254. 9:38But every time the cache expires, Claude
  255. 9:40pays full price to read all 600 lines
  256. 9:43again. So, Anthropic stocks say to keep
  257. 9:45Claude.md under 200 lines. The way to do
  258. 9:48that is to use your Claude.md file like
  259. 9:51an index. Think of it like a tree.
  260. 9:53Claude.md is the trunk and it holds only
  261. 9:56your highest level rules. Each branch is
  262. 9:59a separate file for one kind of job and
  263. 10:01Claude.md tells Claude which branch to
  264. 10:04climb. Or it can point to one index file
  265. 10:07that lists where everything else lives.
  266. 10:09Either way, Claude only opens a branch
  267. 10:11when the jobs needs it. Skills work the
  268. 10:14same way. A skill is a text file of
  269. 10:16step-by-step instructions that Claude
  270. 10:18only opens when it needs them. Until
  271. 10:21then, just a one-line description is
  272. 10:23loaded. And skills have a much bigger
  273. 10:26trick. A skill can also carry a script,
  274. 10:29which is a small program that does one
  275. 10:31job. So, say every Monday you pull last
  276. 10:33week's numbers out of a spreadsheet.
  277. 10:35Instead of Claude reading every row and
  278. 10:37working out the totals from scratch, a
  279. 10:39script adds them up on your computer.
  280. 10:42Never reads the code, it only sees the
  281. 10:44result like 42 sales up from 38. That's
  282. 10:47way more efficient than having Claude
  283. 10:49write new code and new rules every time.
  284. 10:52So, once you have a process that works,
  285. 10:54tell Claude, "Turn this into a skill."
  286. 10:57You create it once and next time you use
  287. 10:59it for almost free. The same thing
  288. 11:01happens with connectors and skills. It's
  289. 11:03easy to end up with too many of both and
  290. 11:06each one adds a little to every session.
  291. 11:09So, type {slash}mcp and turn off the
  292. 11:12connectors you aren't using. Then type
  293. 11:14{slash}context, which shows you what's
  294. 11:16taking up space in your chat. And every
  295. 11:19so often run the {slash}doctor command,
  296. 11:21which is a checkup for your setup and it
  297. 11:23flags problems you can clean up. Next up
  298. 11:26is the text Claude gets back when it
  299. 11:28checks its own work. When Claude builds
  300. 11:30something, it runs tests, which are
  301. 11:32quick checks that your project still
  302. 11:34works. A test can print hundreds of
  303. 11:36lines and most of them just say
  304. 11:38"passed". Claude Code only cuts results
  305. 11:41that are much longer than that. So,
  306. 11:43every one of those lines goes into your
  307. 11:45chat and gets reread on every message
  308. 11:47after. The fix is something called a
  309. 11:49hook, which is a little filter that
  310. 11:51trims those results before Claude sees
  311. 11:54them. You don't have to build it
  312. 11:55yourself, just tell Claude, "Write me a
  313. 11:57hook that trims test results down to
  314. 11:59just the failures. The last of the four
  315. 12:02things quietly costing you money is a
  316. 12:04default. A default is a setting Claude
  317. 12:06Code chose for you before you ever
  318. 12:08opened it, and two of them are quietly
  319. 12:10making every chat cost more. So, trap
  320. 12:13four is the default. On a paid plan,
  321. 12:16Claude Code starts on Opus and thinking
  322. 12:19is on. Thinking is Claude writing out
  323. 12:21its reasoning before it answers.
  324. 12:23Everything Claude reads counts as input
  325. 12:26and everything Claude writes counts as
  326. 12:27output. That reasoning counts as output,
  327. 12:30and output costs five times more than
  328. 12:32what input does. So, running Opus on
  329. 12:34every job is like sending your best
  330. 12:36surgeon to take your temperature. It
  331. 12:38works, but you're paying for skills the
  332. 12:40job didn't need. So, pick Sonnet for the
  333. 12:43build. Type {slash} effort, which is how
  334. 12:46hard Claude thinks, and pick a low for
  335. 12:48easy jobs like renaming a file. Switch
  336. 12:51to plan mode so Claude agrees on a plan
  337. 12:53with you before it touches anything. And
  338. 12:55be specific. If you type "fix the bug",
  339. 12:58Claude scans files to find it, and every
  340. 13:00file it reads gets added to your chat.
  341. 13:03But if you type "fix the date bug in the
  342. 13:05checkout file", it goes straight there.
  343. 13:07The words you type are a tiny part of
  344. 13:09what Claude reads, so shorter prompts
  345. 13:11barely matter. What you point Claude at
  346. 13:14matters far more. So, that's the four
  347. 13:16things, and here's the whole thing.
  348. 13:19Every one of these four things comes
  349. 13:21from the same place, making Claude
  350. 13:23reread more than it has to. Compact, a
  351. 13:26model switch, a long Claude MD, and a
  352. 13:29lunch break all add reading. So, the
  353. 13:31goal is simple. Keep the cash working
  354. 13:34for you. Stay on one model for the whole
  355. 13:37job, keep going while the cash is fresh,
  356. 13:40and clear your chat when the job is
  357. 13:42done. If you pay per use, that window is
  358. 13:44only 5 minutes, so take your breaks
  359. 13:46between jobs and not in the middle of
  360. 13:48one. And skip compact unless you really
  361. 13:50need the room. But, how do you know any
  362. 13:53of it is actually working? Well, there's
  363. 13:55one number that tells you, and it's
  364. 13:57{slash} usage. It shows you what each
  365. 14:00chat, sub agent, and connector actually
  366. 14:03used. So, here's what to do this week.
  367. 14:06Type {slash} usage today and look at
  368. 14:08where your tokens went. Then, do the
  369. 14:10four things. A week from now, type
  370. 14:12{slash} usage again. On a monthly plan,
  371. 14:15a lower number means more room before
  372. 14:16your limit. On an API key, a lower
  373. 14:18number means a lower bill. That's how
  374. 14:21you know it worked. If you're building
  375. 14:22with Claude every day, I co-founded the
  376. 14:25Claude Code Club. It's $9 a month, and
  377. 14:26the link's in the description. The
  378. 14:28cheapest message is the one Claude
  379. 14:30already remembers.

About this transcript

This page contains the full transcript of Give Me 14 Mins and I'll Save You Millions of Claude Tokens by Duncan Rogoff | Learn Claude Code, generated from the public captions YouTube serves with the video. The transcript has 2,720 words across 379 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.