YouTube2Text

18 Claude Code Token Hacks in 18 Minutes — Transcript

by Nate Herk | AI Automation · 4,251 words · 609 segments · language en · Watch on YouTube

Full transcript

  1. 0:00In the past week or so, so many people
  2. 0:01have been complaining about hitting
  3. 0:02their Claude code limit insanely fast.
  4. 0:05Claims like one prompt that is about 1%
  5. 0:06of the limit is now around 10%. You
  6. 0:08could go through X and find tons and
  7. 0:10tons of threads about this topic. Even
  8. 0:12on a $200 per month plan, people are
  9. 0:14reaching the session limit way too fast.
  10. 0:17And then we got this post from an
  11. 0:18Anthropic employee that basically said
  12. 0:19that they are working on a little change
  13. 0:22with peak hours and off-peak hours. But
  14. 0:24even after that, some people were saying
  15. 0:26they were still hitting it really quick
  16. 0:27even during off-peak hours. So anyways,
  17. 0:29I've been playing around a ton, trying
  18. 0:30different doing research, and I have 18
  19. 0:33token management hacks for you guys that
  20. 0:34I've organized from tier one all the way
  21. 0:36up to tier three, so they get more
  22. 0:38advanced as we go. I'm very confident
  23. 0:40that by the end of this video, you will
  24. 0:41feel like your Claude code usage has
  25. 0:43doubled, tripled, maybe even five-xed.
  26. 0:45So let's not waste any time and just get
  27. 0:46straight into the video. So as I've been
  28. 0:48optimizing my own token management, I
  29. 0:50think that what's really important to
  30. 0:52realize first is how tokens actually
  31. 0:54work. Because once you realize how
  32. 0:56Claude uses tokens, it makes it very
  33. 0:58clear how you should actually reverse
  34. 1:00engineer the way that you work in order
  35. 1:02to use less tokens. So a token is the
  36. 1:04smallest unit of text that an AI model
  37. 1:06reads and charges you for. It's roughly
  38. 1:08one token is one word, but that's not
  39. 1:10explicitly true, kind of just a good
  40. 1:12baseline. So every time that you send a
  41. 1:13message, Claude rereads the entire
  42. 1:15conversation from the beginning, and all
  43. 1:17of those are tokens that it's charging
  44. 1:19you for. So message one, it will read
  45. 1:21it, then it will read its reply, and
  46. 1:22then message two, and then the reply,
  47. 1:24all the way up to your latest prompt.
  48. 1:26And it does that every single time. And
  49. 1:28I think that alone is a huge lightbulb
  50. 1:30moment for a lot of people. This means
  51. 1:32as you're having a conversation with
  52. 1:33Claude, your cost is compounding, not
  53. 1:35just adding. It's exponentially growing.
  54. 1:38Meaning message one might cost 500
  55. 1:40tokens, message 30 costs 15,000 because
  56. 1:43it's rereading everything before it. One
  57. 1:45developer actually tracked a 100-plus
  58. 1:47message chat and found that 98.5% of all
  59. 1:50the tokens were just spent rereading the
  60. 1:52old chat history in the session. Like
  61. 1:54that's a huge waste. Now yes, the
  62. 1:56argument has to be made that well, it
  63. 1:57needs the context and it needs to
  64. 1:59understand what we're doing, but still,
  65. 2:0098.5% is crazy. So take a quick look at
  66. 2:03this graphic here. Along the x-axis, we
  67. 2:05have message number, and as it
  68. 2:07increases, you can see that we have our
  69. 2:09per message cost and our cumulative
  70. 2:10tokens increasing, but it's not linear.
  71. 2:13It's basically each message is rereading
  72. 2:15all of the past ones, and it has to
  73. 2:16count that in. So message one could be
  74. 2:18500, message 30 could be 15,500, which
  75. 2:21is 31 times more. And then after 30
  76. 2:23messages, you might already be at almost
  77. 2:25a quarter million cumulative tokens. Now
  78. 2:27on top of all of your own messages,
  79. 2:29Claude will also reload your Claude.md,
  80. 2:31your MCP servers, your system prompts,
  81. 2:33your skills, your files on every single
  82. 2:35turn. And this is invisible overhead,
  83. 2:37but it is constantly dripping into your
  84. 2:39context and your tokens. And a really
  85. 2:41important thing to realize is that
  86. 2:42bloated context doesn't just cost you
  87. 2:43more money, but it also produces worse
  88. 2:45output. So you're paying more and you're
  89. 2:47getting less. There's this phenomenon
  90. 2:48called lost in the middle, which
  91. 2:50basically says that models are paying
  92. 2:52the most attention in the beginning of
  93. 2:53your session and kind of at the end. So
  94. 2:55all that stuff in the middle of your
  95. 2:56session, kind of in this dip, is getting
  96. 2:58ignored. All right. So now that we kind
  97. 3:00of understand a little bit more about
  98. 3:01how Claude code works and how tokens
  99. 3:03work, let's move into the hacks. We're
  100. 3:04going to start here with tier one hacks.
  101. 3:07These are the ones that are going to be
  102. 3:08super easy to implement and everyone
  103. 3:09should be able to understand. So we've
  104. 3:11got nine of these. Number one is to
  105. 3:13start fresh conversations. Use {slash}
  106. 3:16clear between unrelated tasks. Don't
  107. 3:18carry context about topic A into a
  108. 3:20conversation about topic B.
  109. 3:22So every single message in a long chat
  110. 3:24is exponentially more expensive than the
  111. 3:25same message in a fresh chat. So this
  112. 3:28one habit is the number one thing that
  113. 3:30extends your session life, and it's
  114. 3:32pretty obvious based on what we just
  115. 3:33talked about, so that's why this was
  116. 3:35number one.
  117. 3:36Okay, number two is to disconnect MCP
  118. 3:39servers. Every single connected MCP
  119. 3:41server loads all of its tool definitions
  120. 3:43into your context on every message. This
  121. 3:45is another source of completely
  122. 3:46invisible tokens that might just be
  123. 3:48eating up and eating away. So one server
  124. 3:50alone might be something like 18,000
  125. 3:52tokens per message. So run MCP at the
  126. 3:55start of each session and disconnect the
  127. 3:57ones that you don't need. And better
  128. 3:59yet, if you're able to find CLIs for
  129. 4:01something, so for example, rather than
  130. 4:02having the Google Workspace or Google
  131. 4:04Calendar MCP server, which eats a lot of
  132. 4:06tokens, just use the Google Workspace
  133. 4:09CLI. It's faster, it's cheaper, and I
  134. 4:11think the future is moving towards
  135. 4:13having our agents use CLIs rather than
  136. 4:15MCPs. All right, number three, batch
  137. 4:18prompts into one message. Three separate
  138. 4:20messages cost three times what one
  139. 4:22combined message costs because of the
  140. 4:24way that tokens work, right? Instead of
  141. 4:26summarize this as one message and then
  142. 4:28now extract the issues, now suggest a
  143. 4:30fix, send it all in one prompt. If
  144. 4:32Claude gets something slightly wrong,
  145. 4:34edit your original message and
  146. 4:35regenerate instead of sending a full
  147. 4:37follow-up correction. Follow-ups stack
  148. 4:39onto history permanently, while edits
  149. 4:41replace the bad exchange entirely. Now I
  150. 4:43will say, there is an argument to be
  151. 4:45made here that potentially doing it this
  152. 4:48way where you're doing task one, task
  153. 4:50two, then task three, might actually be
  154. 4:52better output quality. I think it
  155. 4:54depends on the actual use case.
  156. 4:55Basically, the idea would be if you can
  157. 4:57give AI one specific task at a time,
  158. 4:59it's going to be better because it's
  159. 5:00more specialized and it's more focused.
  160. 5:02But this is definitely something that
  161. 5:03you should be aware of. Okay, number
  162. 5:04four is to use plan mode before any real
  163. 5:07task. This lets Claude map out the
  164. 5:09approach, ask you the right questions,
  165. 5:11and it prevents the single biggest
  166. 5:12source of token waste, which is just
  167. 5:14having Claude go down the wrong path,
  168. 5:15writing code, and then basically
  169. 5:17everything that it just did, you have to
  170. 5:19basically like scrap and redo. It's just
  171. 5:20a huge waste of time and tokens. So you
  172. 5:22can add something like this to your
  173. 5:23Claude.md. Do not make any changes until
  174. 5:25you have 95% confidence in what you need
  175. 5:27to build. Ask me follow-up questions
  176. 5:29until you reach that confidence level.
  177. 5:31This is something that I'm putting into
  178. 5:33all of my Claude.mds when I am having it
  179. 5:35help me build things. Number five, we
  180. 5:37have run {slash} context and {slash}
  181. 5:39cost. {slash} context shows you exactly
  182. 5:41what's eating your tokens right now. So
  183. 5:43your conversation history, your MCP
  184. 5:44overhead, loaded files, stuff like that.
  185. 5:47And {slash} cost shows your actual token
  186. 5:49usage and estimated spend for that
  187. 5:51current session.
  188. 5:52Most people have no idea where their
  189. 5:53tokens are going, and these two commands
  190. 5:55make the invisible visible. Because if
  191. 5:58you don't actually know that you're
  192. 5:59bleeding because of MCPs, then how would
  193. 6:01you be able to fix that? So when you run
  194. 6:03{slash} context, this is what it will
  195. 6:04look like. It'll basically give you a
  196. 6:06screenshot of how many tokens you're at,
  197. 6:08what is the cap, and it will estimate
  198. 6:10based on the different categories. And
  199. 6:12what I did here is this was ran in a
  200. 6:14completely fresh session, no chats. So
  201. 6:16what that tells me is, okay, before I
  202. 6:18even talk to Claude, I'm already down
  203. 6:2051,000 tokens because of things like the
  204. 6:23system prompt, the system tools, my
  205. 6:24custom agents, my skills, memory files,
  206. 6:27and here I've actually cleared out all
  207. 6:29the MCPs, so there wasn't anything in
  208. 6:30there, but those can, like I said,
  209. 6:32completely bloat up your tokens right
  210. 6:34from the get-go. Okay, number six is to
  211. 6:36set up a status line. This kind of goes
  212. 6:38hand in hand with having more
  213. 6:40visibility. You only actually see this
  214. 6:41in your terminal though, so you will
  215. 6:42have to do it there. Um and it basically
  216. 6:45lets you see what's going on. So right
  217. 6:47here you can see in my terminal, I've
  218. 6:48got this set up so that I can see the
  219. 6:49model I'm using. I can see a visual kind
  220. 6:52of progress bar of my usage, and then I
  221. 6:54can see
  222. 6:55uh 5% of my whole 1 million context
  223. 6:59window, and I can see 52,000 tokens out
  224. 7:01of 1,000,000, which is a million. And
  225. 7:03just to clarify, this isn't my session,
  226. 7:05like my five-hour session. This is
  227. 7:07basically just indicating that I'm 5% of
  228. 7:08the way or 52K out of 1,000K. So all you
  229. 7:12have to do is in Claude code in the
  230. 7:13terminal, do {slash} status line, and
  231. 7:15explain that you want to replicate this
  232. 7:17setup. Number seven is just super
  233. 7:19simple, but keep your dashboard open.
  234. 7:20Same thing with visibility. You might
  235. 7:22run into issues with your limit and just
  236. 7:25get hit out of nowhere. But if you have
  237. 7:26it pulled up next to you or you have it
  238. 7:28ready so that you can switch into that
  239. 7:29tab and you know, check every 20-40
  240. 7:31minutes, then you're going to be able to
  241. 7:33pace yourself a little bit better. You
  242. 7:34could even set up a automation to
  243. 7:36basically check in on it every 30
  244. 7:38minutes and send you like a text or a
  245. 7:40Slack message to say, "Hey, by the way,
  246. 7:42you're getting near your usage." All
  247. 7:45right, so number eight, we have be smart
  248. 7:46with pasting. Before you drop a document
  249. 7:49or a file or something large, just ask
  250. 7:51yourself, "Does Claude need to read this
  251. 7:53whole thing?" Sometimes it does,
  252. 7:54sometimes it needs that full context,
  253. 7:56but sometimes it just needs one section
  254. 7:58or one page. So if the bug is in one
  255. 8:00function, then paste just that function.
  256. 8:02Or if it just needs the context of one
  257. 8:03little paragraph, just paste that.
  258. 8:05Claude needs to be precise about what it
  259. 8:06reads, but you also need to be precise
  260. 8:08about what you feed it. And number nine,
  261. 8:10our last tier one hack, is to actually
  262. 8:12watch Claude code work. Don't just fire
  263. 8:14off a prompt and walk away or switch
  264. 8:16tabs. Watch what Claude is doing,
  265. 8:18especially on longer tasks. And this is
  266. 8:20because if you actually sit and watch
  267. 8:21it, sometimes you'll realize it's going
  268. 8:23down the wrong path. Sometimes it gets
  269. 8:24stuck in its own loops, rereads the same
  270. 8:26files, things like that. So if it's
  271. 8:29doing that, you might as well just stop
  272. 8:31it right there. Kind of the same idea as
  273. 8:32plan mode. Why would you let it go down
  274. 8:34the wrong path, waste all your tokens,
  275. 8:35and then just have to scrap it all? In a
  276. 8:37bad loop, 80% of the tokens are being
  277. 8:39used producing zero value. So if you're
  278. 8:42able to just watch your session run
  279. 8:44until you know it's going down the right
  280. 8:46path, it could save you thousands of
  281. 8:47tokens. All right, let's kick it up a
  282. 8:49little bit. Let's move into our tier two
  283. 8:50hacks, and for these ones we have five
  284. 8:53of them. So number one is to keep your
  285. 8:55Claude.md file lean. Place it in your
  286. 8:57project root, whether that is globally
  287. 8:59or in in local projects. Claude auto
  288. 9:02reads it at the start of every single
  289. 9:03chat as system context. So keep it under
  290. 9:06200 lines. Include things like your tech
  291. 9:08stack, your coding conventions, your
  292. 9:09build commands, the 95% confidence rule,
  293. 9:12only the most important things, and you
  294. 9:14need to treat this like an index. Route
  295. 9:16to where more data lives. And it's a
  296. 9:18complete mindset shift. This file
  297. 9:20basically just tells Claude code, "Where
  298. 9:21is everything that it needs and what to
  299. 9:23do every single time?" So it can point
  300. 9:25to files that are huge, but that way it
  301. 9:26just is, "Okay, I don't need this right
  302. 9:28now, but if I do need this, I know
  303. 9:29exactly where to look." And because it
  304. 9:31knows exactly where to look, it's not
  305. 9:32going to waste time or tokens searching
  306. 9:34through and reading other files. It's
  307. 9:35just able to grab it right there by the
  308. 9:37file name. And the reason I say this is
  309. 9:38a mindset shift because you should be
  310. 9:40doing this with other things, not just
  311. 9:41your Claude.md, with your skills or with
  312. 9:44your you know, master reference guide
  313. 9:45sheets. I saw someone talking about how
  314. 9:47they created an index that's super super
  315. 9:49lean, and it shows Claude code exactly
  316. 9:51where to go in the Claude code
  317. 9:53documentation. So if it needs help with
  318. 9:55something related to Claude code, it
  319. 9:56doesn't have to search through the whole
  320. 9:58database, it can just say, "Okay, here's
  321. 9:59my index file. I know exactly which URL
  322. 10:01to look up at." Super simple. You want
  323. 10:03to keep this lean and trim it all the
  324. 10:04time. It's always a work in progress
  325. 10:06because every single chat, not just like
  326. 10:08your session, every single message
  327. 10:10Claude.md gets read. So, if your
  328. 10:11Claude.md file is 1,000 lines, every
  329. 10:14single time you shoot off a message,
  330. 10:15even if you just say hi,
  331. 10:17the whole thing's going to get read.
  332. 10:18Okay, number two here is to be surgical
  333. 10:20with file references. Don't just say
  334. 10:22something like, "Here's my whole repo,
  335. 10:24go find the bug." Say something more
  336. 10:26like, "Check the verify user function
  337. 10:27inside the off.js file." Or you can also
  338. 10:31use @filename to point at specific files
  339. 10:34instead of once again letting Claude
  340. 10:35explore freely. The whole idea of being
  341. 10:38specific and routing. All right, so
  342. 10:39number three, I'm saying to compact at
  343. 10:41around 60% capacity. Auto compact
  344. 10:44triggers at like 95% by which point your
  345. 10:46context is already pretty degraded. So,
  346. 10:48run/context to check your capacity
  347. 10:50percentage or you should have the status
  348. 10:51line set up and at about 60% just run
  349. 10:54the /compact with specific instructions
  350. 10:56on what it should actually be
  351. 10:57preserving. After three to four compacts
  352. 10:59in a row, the quality does start to
  353. 11:01degrade. So, at that point, once you've
  354. 11:03done three or four, just get a session
  355. 11:05summary, /clear, give the session
  356. 11:08summary back, and then keep going. All
  357. 11:10right, so number four, short breaks are
  358. 11:11actually costing you. Claude code uses
  359. 11:14prompt training to avoid reprocessing
  360. 11:16unchanged context, but the cache has a
  361. 11:185-minute timeout. So, if you step away
  362. 11:20and you come back and it's been longer
  363. 11:21than 5 minutes, your next message
  364. 11:23reprocesses everything from scratch at
  365. 11:25full cost. And that is why some people
  366. 11:27feel like their usage just randomly
  367. 11:29spikes if they might have, you know,
  368. 11:30stepped away and came back. So, if
  369. 11:32you're going to do that, just consider
  370. 11:33doing a /compact or a /clear before you
  371. 11:36step away. All right, number five,
  372. 11:37command output bloat. When Claude runs
  373. 11:40shell commands, the full output enters
  374. 11:42your context window. So, if you have a
  375. 11:45command then it comes back with 200
  376. 11:46commits or, you know, just tons and tons
  377. 11:48of data, then all of that is tokens that
  378. 11:51get sent to your model. So, really the
  379. 11:54takeaway here is to be intentional about
  380. 11:56what you let Claude run. If you know in
  381. 11:58a certain project that it doesn't need
  382. 11:59to use certain commands, then you can go
  383. 12:01ahead and in that project deny those
  384. 12:03permissions. And this is another one
  385. 12:05that seems like it's invisible because
  386. 12:07when it runs like a bash or, you know,
  387. 12:08certain commands, it basically just has
  388. 12:11like one line and you don't actually see
  389. 12:12all of the tokens that it has, you know,
  390. 12:14sent there. All right, so sitting here
  391. 12:17editing this video and there's just one
  392. 12:18more thing that I wanted to get off my
  393. 12:20chest and it's basically about hitting
  394. 12:22your limit. And, you know, the goal of
  395. 12:24this video and your goal should be to
  396. 12:26optimize so that you don't hit your
  397. 12:27limit, but I don't think that you should
  398. 12:29associate hitting your limit with like
  399. 12:31it shouldn't be a negative connotation
  400. 12:33because ultimately if you're doing a lot
  401. 12:35of these hacks and you are not just like
  402. 12:38being wasteful with tokens, then hitting
  403. 12:40your limit is actually a good thing if
  404. 12:42you think about it because it means that
  405. 12:44you are using this tool so much and I
  406. 12:45think that's what you want to be. I
  407. 12:47think you want to be a power user of
  408. 12:49this tool to the point where it's like
  409. 12:51got to wait again. And, you know,
  410. 12:53waiting sucks, but
  411. 12:55people that are using it so much are
  412. 12:57going to be so much more productive and
  413. 12:59so much farther ahead than people who
  414. 13:00are never hitting their limits, you
  415. 13:02know, not make not getting their their
  416. 13:04money's worth and not truly
  417. 13:08getting the leverage that you are now
  418. 13:09getting. So, anyways, quick little raw
  419. 13:11rant there, but I think it's an
  420. 13:13important mindset shift to have, you
  421. 13:14know?
  422. 13:15Just something to think about. All
  423. 13:17right, so we're moving on to tier three
  424. 13:18now. I hope you guys feel like you
  425. 13:20already have a lot of things that you
  426. 13:21want to implement and these ones are
  427. 13:23getting a little crazier as well. So,
  428. 13:24we've got four of these here and I've
  429. 13:25got a few bonus ones also, but number
  430. 13:27one is to pick the right model. So,
  431. 13:29Sonnet for your default most coding
  432. 13:31work, Haiku for sub-agents, formatting,
  433. 13:33simple tasks, Opus for deep
  434. 13:35architectural planning and only when
  435. 13:36Sonnet wasn't enough. Try to keep this
  436. 13:38under 20% of usage or unless you just
  437. 13:41really, really need it for that project.
  438. 13:42Now, a little tip here is when you have
  439. 13:44a huge code base and you want to do
  440. 13:45certain things like maybe a review, then
  441. 13:47try bringing in Codex. There is an
  442. 13:49official plugin now and I made a video
  443. 13:51about this. I'll tag that right up here,
  444. 13:52but you could basically have, you know,
  445. 13:53Opus and Sonnet working together to
  446. 13:55build you, you know, a project or a code
  447. 13:57base and then you could just bring in
  448. 13:58Codex to actually review everything. And
  449. 14:00that way you're saving yourself on the
  450. 14:02Claude tokens. The next one, number two
  451. 14:05here, is the cost of sub-agents. Agent
  452. 14:07workflows use roughly seven to 10 times
  453. 14:09more tokens than a standard single agent
  454. 14:11session. Now, why is that? Because they
  455. 14:13wake up with their own full context and
  456. 14:15it's a separate instance. So, they
  457. 14:17basically have to reload everything when
  458. 14:19you start up the new session. All of
  459. 14:21those files, all of the system tools,
  460. 14:23like everything like that. Now, what you
  461. 14:24can do though, which is helpful, is to
  462. 14:26delegate to sub-agents for one-off
  463. 14:27tasks, especially if you want that
  464. 14:29one-off task to use Haiku. So, maybe you
  465. 14:31need to process a lot of information or
  466. 14:33maybe you need to do a ton of research
  467. 14:34and get just like a summary back. Now,
  468. 14:36yes, tokens are still tokens no matter
  469. 14:38what at the end of the day, but if you
  470. 14:40can make 80% of your tokens a cheaper
  471. 14:42model rather than 80% of your tokens an
  472. 14:44expensive model, then you're going to be
  473. 14:46saving money.
  474. 14:47And then, of course, agent teams are
  475. 14:48cool. Um sometimes I really do actually
  476. 14:51like them and it helps me get more
  477. 14:53higher quality outputs, but they're
  478. 14:55very, very expensive. So,
  479. 14:57try to use them very sparingly. All
  480. 14:58right, so number three is to understand
  481. 15:00peak hours. So, we just talked about at
  482. 15:02the beginning how they've adjusted how
  483. 15:04fast your 5-hour session window drains
  484. 15:06based on demand during the peak hours,
  485. 15:08which are 8:00 a.m. to 2:00 p.m. Eastern
  486. 15:11Time on weekdays.
  487. 15:13But off-peak, this is when your usage is
  488. 15:15kind of either normal or it lasts a
  489. 15:17little longer and these are afternoons,
  490. 15:19evenings, weekends. So, if you actually
  491. 15:21think about this strategically, maybe
  492. 15:23you want to make sure that you're
  493. 15:23running big refactors or multi-agent
  494. 15:26sessions or big projects during off-peak
  495. 15:28hours only. Otherwise, you're going to,
  496. 15:30you know, drain right through that peak
  497. 15:32session. And on top of this, we'll call
  498. 15:34this a little hack 3.5, which is the one
  499. 15:36I kind of alluded to earlier when I
  500. 15:38said, "Hey, just keep open your Claude
  501. 15:40account so you can see your usage at all
  502. 15:41times." If you're near a reset and you
  503. 15:43have room left in your allocation, then
  504. 15:44go heavy. Try to hit that usage limit
  505. 15:46before it resets. Get your money's
  506. 15:48worth. Let your agents go loose at that
  507. 15:50point. And on the other side, if you're
  508. 15:52getting near your limit, but you still
  509. 15:53have lots of time, then step away. This
  510. 15:56is your time to take a break, take a
  511. 15:57walk, make some lunch, come back with a
  512. 16:00full budget instead of burning the last
  513. 16:025% on something small and getting stuck
  514. 16:04mid-task and having to just kind of, you
  515. 16:05know, lose that flow state that you
  516. 16:07might have been in. Okay, number four,
  517. 16:10your system's constitution,
  518. 16:12which is Claude.md. This should contain
  519. 16:14stable decisions, architecture rules,
  520. 16:16and progress summaries. Think of it like
  521. 16:18the source of truth that makes every
  522. 16:19prompt shorter and shorter. Save
  523. 16:21decisions, not conversations. Every
  524. 16:23architectural call that you store there
  525. 16:25is a paragraph that you never have to
  526. 16:26type again. So, this builds on top of
  527. 16:28the way that you were thinking about it
  528. 16:29back in tier one. You can add rules in
  529. 16:32there that basically tell it, "Hey, I
  530. 16:33want you to help me make sure I'm being
  531. 16:36smart about tokens. Use sub-agents for
  532. 16:37any exploration or research. If a task
  533. 16:39needs three plus files or multi-file
  534. 16:41analysis, spawn a sub-agent and only
  535. 16:43return summarized insights. Spawn that
  536. 16:45sub-agent in Haiku." And here's a little
  537. 16:47prompt that I have at the bottom of my
  538. 16:49Claude.md and I will say before I read
  539. 16:51this out, you have to be careful because
  540. 16:53when you make a file like this, um kind
  541. 16:55of self-learning or self-evolving, you
  542. 16:57have to check on it frequently because
  543. 16:59you don't want it to accidentally get
  544. 17:00too bloated. But here I said, "Applied
  545. 17:02learning. When something fails
  546. 17:03repeatedly, when Nate has to re-explain
  547. 17:05or when a workaround is found for a
  548. 17:07platform tool or limitation, add a
  549. 17:09one-line bullet here. Keep each bullet
  550. 17:11under 15 words, no explanations. Only
  551. 17:13add things that will save time in future
  552. 17:14sessions." And then it's got some
  553. 17:15bullets. Now, I'm not saying this is the
  554. 17:17most optimal prompt, but I think this
  555. 17:19sort of system of having your Claude.md
  556. 17:22actually learn and continuously think
  557. 17:24about how it can save you time and
  558. 17:26tokens is a good idea to play with. All
  559. 17:28right, so I know that we just went
  560. 17:29through a ton of stuff. This whole slide
  561. 17:31deck will be available for download for
  562. 17:33free in my free school community. The
  563. 17:35link for that will be down in the
  564. 17:36description. But right now, what you
  565. 17:37should go do are these things. Go
  566. 17:39run/context. See what it looks like. Go
  567. 17:42to some of your active sessions,
  568. 17:43run/cost. Status line, make sure it's
  569. 17:45showing your model, your context
  570. 17:47percentage, and your token count. Make
  571. 17:48sure you pull up your Claude usage
  572. 17:50dashboard so you can see your remaining
  573. 17:52allocation and what time it resets.
  574. 17:54Disconnect unused MCP servers. Start
  575. 17:57complex tasks in plan mode. Use /clear
  576. 17:59when you're switching to an unrelated
  577. 18:00task. Manually compact at 60% context.
  578. 18:04Batch your multi-step instructions into
  579. 18:06single messages and schedule heavy
  580. 18:08sessions for off-peak hours and really
  581. 18:10just be mindful about the actual timing.
  582. 18:12So, I wanted to kind of leave you guys
  583. 18:13with one, maybe two messages. The first
  584. 18:15thing is just the idea that there is a
  585. 18:18balance between quality and cost. And
  586. 18:21so, that's kind of a game that you have
  587. 18:22to play a little bit and sometimes you
  588. 18:23do have to go for the higher quality,
  589. 18:24which ultimately is going to cost you
  590. 18:26more money and that's just the way it
  591. 18:27works. But the other thing is just to
  592. 18:28keep it simple and think about what we
  593. 18:31talked about at the beginning of this
  594. 18:32video, how tokens actually work, how
  595. 18:34Claude code actually charges you. Most
  596. 18:36people don't need a bigger plan, they
  597. 18:37need to stop resending their entire
  598. 18:39conversation history 30 times when you
  599. 18:41could just send it, you know, five
  600. 18:42times. It's not a limits problem, it's a
  601. 18:44context hygiene problem. But anyways,
  602. 18:47that is going to do it for this one. If
  603. 18:48you guys enjoyed or you learned
  604. 18:49something new, please give it a like, it
  605. 18:50helps me out a ton. And as always, I
  606. 18:52appreciate you guys making it to the end
  607. 18:53of the video. I'll see you all in the
  608. 18:54next one.
  609. 18:55Thanks, everyone.

About this transcript

This page contains the full transcript of 18 Claude Code Token Hacks in 18 Minutes by Nate Herk | AI Automation, generated from the public captions YouTube serves with the video. The transcript has 4,251 words across 609 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.