YouTube2Text

Claude Code : 4 outils pour économiser 70% de tokens #claude — Transcript

by DynamicIA | Automatisation & IA · 2,354 words · 340 segments · language en · Watch on YouTube

Full transcript

  1. 0:00I've already looked at your bill for
  2. 0:02paying Claude at the end of the month
  3. 0:03and I wondered where all those tokens
  4. 0:05are going. Claude rereads your files
  5. 0:09entirely with every question. It
  6. 0:12receives entire builds of 80 lines, 800
  7. 0:15lines, or 10 files even when it only
  8. 0:17needs three pieces of info. And
  9. 0:21sometimes it replies with 300 words
  10. 0:23when it only needed to give you 30, and
  11. 0:26those 30 words would be enough for you
  12. 0:28to understand what it means. The first
  13. 0:31tool we’re going to look at together
  14. 0:33is called Graphifi. So you have the
  15. 0:37tool's repo, and we’re going to
  16. 0:39quickly see what the tool actually does
  17. 0:41. It says here that Graphifi is a
  18. 0:46coding assistant that maps your entire
  19. 0:48project code, docs, and into a
  20. 0:54knowledge graph you can query instead
  21. 0:56of grepping files. So basically,
  22. 1:01Graphifi transforms your entire project
  23. 1:03into a knowledge graph that Claude
  24. 1:05queries on demand without actually
  25. 1:07rereading all the files every time. As
  26. 1:14we can see here in my slides, thanks to
  27. 1:16Graphifi, you can actually save over 80
  28. 1:19%of tokens. So the installation is
  29. 1:23quite simple. We’re going to install
  30. 1:25it together at the same time. Depending
  31. 1:29on your operating system—for example,
  32. 1:31I’m on Windows—so we’ll go to
  33. 1:33Windows, for instance. I’m going to
  34. 1:36type this command here. We can find it
  35. 1:40directly here on the guide. I’ll also
  36. 1:43put the link in the description. So
  37. 1:47once we have that command downloading.
  38. 1:50These are the prerequisites I’m going
  39. 1:52to download. I’m going to download,
  40. 1:54for instance, Astro UV. Next, you’ll
  41. 1:58need to download UV. Download Graphifi.
  42. 2:04I think I already had the installer.
  43. 2:09But otherwise, if you don’t, as it
  44. 2:11says here, you’d need to restart the
  45. 2:14interpreter—well, the terminal,
  46. 2:16rather. So what we’ll do now is go
  47. 2:22back to the git, as it’s marked there
  48. 2:24. So here, it says step two. Step one
  49. 2:28is install, graphifi install. So
  50. 2:33let’s go. Hop. There, it’s done.
  51. 2:47Graphifi install. So what is it telling
  52. 2:49me now? It tells me it’s going to
  53. 2:51make a reference to Graphifi. There we
  54. 2:54go. And a reference to Claude as well.
  55. 2:58So it said done, open your coding tool
  56. 3:01and type graphifi. So here I have
  57. 3:04Claude and other agents. But in this
  58. 3:07case, we’re testing Claude. So Claude
  59. 3:13gives me its interesting. OK. There,
  60. 3:18sorry about the display, I am working
  61. 3:20remotely at the same time. So I am
  62. 3:23going to type graphify. You see there,
  63. 3:34it tells me OK, it's loading skills. So
  64. 3:38there you go, once graphify is
  65. 3:40installed, you can now start using it.
  66. 3:46You will actually see that there is a
  67. 3:48real time saving of more than 80%
  68. 3:50because Claude won't go and read all
  69. 3:51the files in your project, but will
  70. 3:53directly take this graph reference to
  71. 3:55get what it wants. We can also see some
  72. 4:05commands, some important commands on
  73. 4:07the guide, some important commands to
  74. 4:09run like graphify point, graphify docs
  75. 4:11update. The second important tool we
  76. 4:18are going to look at is called
  77. 4:19CodeGraph. It is a little bit different
  78. 4:24from what we just saw with graphify.
  79. 4:28Graphify is for the big picture, the
  80. 4:31idea for architecture and onboarding.
  81. 4:34But when you are actively coding,
  82. 4:36Claude does something else. It opens
  83. 4:39files one by one to actually find a
  84. 4:42defined function. Right? You can have
  85. 4:4610 tool calls to find just one single
  86. 4:48thing at that level. Meaning that for a
  87. 4:53given project, for those who do a bit
  88. 4:55of projects, you don't really need to
  89. 4:57be a coder nowadays to develop a
  90. 4:59project. However, even when you develop
  91. 5:04a project, whether you are a coder or
  92. 5:07not, Claude here, for example, in this
  93. 5:09project, will go and read, it can call
  94. 5:11this file several times to understand
  95. 5:14the context. The solution is actually
  96. 5:19CodeGraph, which uses tree-sitter, an
  97. 5:22AST parser, to analyze your code at a
  98. 5:25semantic level (functions, classes,
  99. 5:27imports, dependencies) and then exposes
  100. 5:30a local MCP server. So what I am
  101. 5:37putting here is that it performs an AST
  102. 5:40tree-sitter parse, then it creates a
  103. 5:42local MCP server on port 3000. Claude
  104. 5:49will query this local server directly.
  105. 5:51So we can also take a look at the
  106. 5:55GitHub quickly. I always like, when you
  107. 6:06have a new project or a repo or
  108. 6:07something presented, it is good to go
  109. 6:09check the repo and read the README a
  110. 6:11bit to see what it looks like. So for
  111. 6:17installation, we see it's an IR command
  112. 6:20on Windows. For me, otherwise for those
  113. 6:22on Linux, it works very well. And I
  114. 6:26will still show you quickly what they
  115. 6:31say about why use CodeGraph. Here, it
  116. 6:34says agents need to understand slow way
  117. 6:44, grep, glob, one file, rebuilding
  118. 6:46dependencies of tools. So, actually,
  119. 6:51when an agent wants to understand code,
  120. 6:54what it does is ask questions or wants
  121. 6:56to make changes. And in fact, it says
  122. 7:00it discovers it has to read, it has to
  123. 7:02grep, it has to perform quite a few
  124. 7:04commands to understand the tool. And
  125. 7:11here, what Code Graph will do is that
  126. 7:13it will, here it says "give the agent
  127. 7:15exact code it needs in one call."
  128. 7:21Basically, Code Graph will make it so
  129. 7:23the agent doesn't need to make multiple
  130. 7:26calls; it will do it all at once. So, I
  131. 7:30really like this—let's call it this
  132. 7:33benchmarking—is that depending on the
  133. 7:35type of language, obviously, you save a
  134. 7:37huge amount of tokens. For example,
  135. 7:43here on a TypeScript project, you have
  136. 7:45fewer calls—well, fewer calls than
  137. 7:48possible—and as a result, it’s much
  138. 7:50cheaper, whereas without Code Graph, it
  139. 7:53would take a huge amount of time, a
  140. 7:55huge number of calls, and therefore a
  141. 7:57huge number of tokens. We're going to
  142. 8:03test it because I also have an internal
  143. 8:05project that is very interesting,
  144. 8:07written in Python. However, we’ll
  145. 8:09start by testing the installation. Very
  146. 8:11simple. So, we’ll open it. So here,
  147. 8:14we'll write in the web, write in the
  148. 8:16request thread. So it’s trying to
  149. 8:18install, trying to write. In any case,
  150. 8:20it's doing its little routine. But if
  151. 8:23we go back quickly to this level, to
  152. 8:28this level in my slide, is that the
  153. 8:36advantage with this tool is that it
  154. 8:38will allow you to save, depending on
  155. 8:40the type of language, and so on. But
  156. 8:46actually, you can save more than 58%of
  157. 8:48tool calls per session. That means
  158. 8:54it’s about a 15%reduction in cost.
  159. 8:57-16%in cost, and that’s not
  160. 8:59insignificant. So instead of opening 10
  161. 9:02projects all the time, thanks to what
  162. 9:05it puts in place—the LLM and the MCP
  163. 9:07—it won't make as many calls. It will
  164. 9:11directly call this tool. Directly call
  165. 9:14MCP. And the third tool we’re going
  166. 9:17to look at is called RTK. The problem
  167. 9:21is, where is it? Well, for example,
  168. 9:26let's say you run an npm run build, or
  169. 9:28git log, or pytest, or docker ps,
  170. 9:31commands that are actually verbose,
  171. 9:33that return walls of text. The problem
  172. 9:39with Claude is that it will receive all
  173. 9:41of that in its context, and it might
  174. 9:43display all 800 or 500 lines to you,
  175. 9:45which is sometimes verbose and useless.
  176. 9:49RTK places itself in the middle; it
  177. 9:51reads the CLI and asks Claude to
  178. 9:53display only what is necessary. So, in
  179. 9:57the example I'm showing, instead of
  180. 10:00displaying 8,400 tokens—8,400 tokens
  181. 10:03is huge—it will only display it will
  182. 10:10only display 1,000 tokens, and so
  183. 10:12that's actually a time saver. Or rather
  184. 10:20, a token gain of almost, yes, almost
  185. 10:2380%that you'll save, and well, saving
  186. 10:25tokens also means saving on your
  187. 10:27billing. So here, we can go check out
  188. 10:34the RTK AI GitHub. It summarizes the
  189. 10:40number of tokens it can save. For
  190. 10:44example, the different types of command
  191. 10:46operations, like ls or tree, are
  192. 10:48commands that eat up a huge number of
  193. 10:50tokens. So, for savings, we can see the
  194. 10:54installation here; it works on Windows.
  195. 10:59So, this Windows here Mac, on Windows,
  196. 11:03you actually have to download the
  197. 11:05releases and then install. So there,
  198. 11:09and then command analysis, super
  199. 11:11interesting for us. In my case, I'm
  200. 11:14going to go to the releases and then
  201. 11:16download it and then download it.
  202. 11:19Otherwise, well, there's also WSL that
  203. 11:22exists for that. So, they explain how
  204. 11:25it works without RTK? Well, Claude runs
  205. 11:28its commands, et cetera. It eats up
  206. 11:30your tokens; with RTK Well, Claude, git
  207. 11:33status for example, like well, RTK will
  208. 11:38filter, it will filter. git will return
  209. 11:41, and well, for example, there it
  210. 11:44returns 100 tokens to you, so you have
  211. 11:4610%...well, 10 times fewer tokens. So,
  212. 11:49we're almost at the end. The last tool
  213. 11:52we're going to see is called Caveman.
  214. 11:55The problem is that Claude, by default,
  215. 11:58is verbose; it starts its responses
  216. 12:00with "Great Question" and so on. It
  217. 12:03explains the context before giving the
  218. 12:05answer. It concludes with a summary
  219. 12:07paragraph. All of that is output tokens
  220. 12:10that you pay for and that slow down the
  221. 12:14final response. So Caveman, we can see
  222. 12:18it on GitHub, this is very important.
  223. 12:22It's features I didn't talk about for
  224. 12:23the others. Uh, for GitHub projects,
  225. 12:27it's always good to actually look at
  226. 12:29the community, always good to look at
  227. 12:31the number of forks, the number of
  228. 12:35stars. And on GitHub, we can see that
  229. 12:39it has more than uh 69,000 stars on
  230. 12:41GitHub. So the repo is quite popular
  231. 12:44because it solves a real problem that
  232. 12:47is universal. How to install it? Well,
  233. 12:49it's very simple. So you see here, we
  234. 12:53can see the number of stars, forks, and
  235. 12:56watches. You can even sponsor the
  236. 12:59project. Uh, so here, in fact, we take
  237. 13:04an example, which is that Cavem, that
  238. 13:07Claude is chatty. That's assuming that
  239. 13:09Claude is a journalist. There you go,
  240. 13:12he's very chatty. We want answers that
  241. 13:15are concrete and easy to understand.
  242. 13:17And so, saying concrete means that it
  243. 13:20saves you tokens. So here, for example,
  244. 13:22you have 69 tokens for all that, and
  245. 13:24well, we just need this. We understand
  246. 13:26the answer well. Done. So for now, it's
  247. 13:30very simple. So it's this command here,
  248. 13:33and as soon as you install it, you can
  249. 13:35start using it. There is also a skill
  250. 13:42to compress, well, all the answers
  251. 13:44given by Claude, and you can, in fact,
  252. 13:47uh, depending on how you want it
  253. 13:49reduced. So you have, I'd say, the
  254. 13:54slider set to that level. You have
  255. 13:57light, full, ultra, uh, wham. So for me
  256. 14:02, I would tell you not to go too far
  257. 14:04towards the upper part of the slider,
  258. 14:06staying on light or full. OK. So here
  259. 14:11as well, you have other commands for
  260. 14:14reviews, for git, etc. So that's what
  261. 14:19I'm showing here. You have four modes,
  262. 14:21light, full. I personally prefer to use
  263. 14:25it in full. And Wham there, the last
  264. 14:28one anyway, it's a bit, it's a bit
  265. 14:30intense. And there is also an important
  266. 14:35command, which is cavem compress, which
  267. 14:38also allows you to compress in compress
  268. 14:40. We can even use it with Claude MD,
  269. 14:43which also compresses your Claude MD.
  270. 14:46Sometimes Claude MDs can be very, very
  271. 14:49long, and this allows you to also save
  272. 14:51tokens. So in conclusion, we have seen
  273. 14:56four tools to tokenize a huge number of
  274. 14:59tokens. The first one is that the
  275. 15:02problem it solves is that Claude
  276. 15:04re-reads the whole project, and so with
  277. 15:06graphify it allows you to save 80%of
  278. 15:08context tokens. The second one is that
  279. 15:12Claude opens, uh, 10 files for one
  280. 15:14answer because it wants to understand,
  281. 15:17for example, the project you are
  282. 15:19working on. Well, Code Graph comes in
  283. 15:23to solve the problem of tool calls or
  284. 15:25file prompt calls. And that allows you
  285. 15:29to also save more than 58%of your
  286. 15:31tokens. The third one is CLI tools that
  287. 15:36actually overload the context. When
  288. 15:40Claude calls Git, for example, there's
  289. 15:43a huge wall of text and the command is
  290. 15:45sometimes very verbose. Well, the tool
  291. 15:49that allows you to just compress all of
  292. 15:52that is RTK. It also allows you to save
  293. 15:5780%of your input tokens. The last one
  294. 16:05we saw is that sometimes Claude is
  295. 16:07chatty, so Cavem allows you to save
  296. 16:09tokens on output as well. So here, we
  297. 16:15can see the time savings each one gives
  298. 16:17you. Well, combined with all of that,
  299. 16:21you can actually save 70%of your tokens
  300. 16:23. However, there are still some
  301. 16:25drawbacks, as they say. There are still
  302. 16:28some disadvantages. It means that when
  303. 16:32you use these tools, depending on the
  304. 16:34ones you choose to use, it means you
  305. 16:36will still lose information sometimes.
  306. 16:39Okay? These aren't perfect tools.
  307. 16:41Neither is Claude, right? But it means
  308. 16:45you might lose information. You might
  309. 16:47lose a bit of context with Graphifi.
  310. 16:51You might lose some—if you compress
  311. 16:53too much, maybe you lose info on your
  312. 16:56APIs with Caveman, etc. In any case,
  313. 16:58it's up to you to parse a bit, to be
  314. 17:00able to say, "Okay, splitting the
  315. 17:02difference, I'll take a bit, or I'll
  316. 17:05take everything." Anyway, if you're
  317. 17:10only coding and, well, the very core of
  318. 17:13the project is something you don't have
  319. 17:15knowledge of, you might as well put
  320. 17:17everything in and go for it. The goal
  321. 17:21is that you really get your result. If
  322. 17:25these four tools taught you something
  323. 17:27about how Claude consumes your tokens,
  324. 17:29imagine what you can do when you truly
  325. 17:31master Claude Code from end to end.
  326. 17:36I’ve put together a complete training
  327. 17:38, everything I use in production, the
  328. 17:41prompts, workflows, four tools, and
  329. 17:43methods to help you save time, whether
  330. 17:45you're a dev or a salaried employee
  331. 17:47looking to use Claude effectively. And
  332. 17:52well, it's only priced at 47 €.
  333. 17:56Lifetime access, the link is in the
  334. 17:58description and if you don't find it
  335. 18:00yet, as soon as it's finished, as soon
  336. 18:02as it's ready, the link will be in the
  337. 18:04description. Otherwise, subscribe if
  338. 18:08you want more videos like this. In any
  339. 18:11case, I am now regularly publishing one
  340. 18:14video per week. and see you very soon.

About this transcript

This page contains the full transcript of Claude Code : 4 outils pour économiser 70% de tokens #claude by DynamicIA | Automatisation & IA, generated from the public captions YouTube serves with the video. The transcript has 2,354 words across 340 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.