Claude Code : 4 outils pour économiser 70% de tokens #claude — Transcript
Full transcript
- 0:00I've already looked at your bill for
- 0:02paying Claude at the end of the month
- 0:03and I wondered where all those tokens
- 0:05are going. Claude rereads your files
- 0:09entirely with every question. It
- 0:12receives entire builds of 80 lines, 800
- 0:15lines, or 10 files even when it only
- 0:17needs three pieces of info. And
- 0:21sometimes it replies with 300 words
- 0:23when it only needed to give you 30, and
- 0:26those 30 words would be enough for you
- 0:28to understand what it means. The first
- 0:31tool we’re going to look at together
- 0:33is called Graphifi. So you have the
- 0:37tool's repo, and we’re going to
- 0:39quickly see what the tool actually does
- 0:41. It says here that Graphifi is a
- 0:46coding assistant that maps your entire
- 0:48project code, docs, and into a
- 0:54knowledge graph you can query instead
- 0:56of grepping files. So basically,
- 1:01Graphifi transforms your entire project
- 1:03into a knowledge graph that Claude
- 1:05queries on demand without actually
- 1:07rereading all the files every time. As
- 1:14we can see here in my slides, thanks to
- 1:16Graphifi, you can actually save over 80
- 1:19%of tokens. So the installation is
- 1:23quite simple. We’re going to install
- 1:25it together at the same time. Depending
- 1:29on your operating system—for example,
- 1:31I’m on Windows—so we’ll go to
- 1:33Windows, for instance. I’m going to
- 1:36type this command here. We can find it
- 1:40directly here on the guide. I’ll also
- 1:43put the link in the description. So
- 1:47once we have that command downloading.
- 1:50These are the prerequisites I’m going
- 1:52to download. I’m going to download,
- 1:54for instance, Astro UV. Next, you’ll
- 1:58need to download UV. Download Graphifi.
- 2:04I think I already had the installer.
- 2:09But otherwise, if you don’t, as it
- 2:11says here, you’d need to restart the
- 2:14interpreter—well, the terminal,
- 2:16rather. So what we’ll do now is go
- 2:22back to the git, as it’s marked there
- 2:24. So here, it says step two. Step one
- 2:28is install, graphifi install. So
- 2:33let’s go. Hop. There, it’s done.
- 2:47Graphifi install. So what is it telling
- 2:49me now? It tells me it’s going to
- 2:51make a reference to Graphifi. There we
- 2:54go. And a reference to Claude as well.
- 2:58So it said done, open your coding tool
- 3:01and type graphifi. So here I have
- 3:04Claude and other agents. But in this
- 3:07case, we’re testing Claude. So Claude
- 3:13gives me its interesting. OK. There,
- 3:18sorry about the display, I am working
- 3:20remotely at the same time. So I am
- 3:23going to type graphify. You see there,
- 3:34it tells me OK, it's loading skills. So
- 3:38there you go, once graphify is
- 3:40installed, you can now start using it.
- 3:46You will actually see that there is a
- 3:48real time saving of more than 80%
- 3:50because Claude won't go and read all
- 3:51the files in your project, but will
- 3:53directly take this graph reference to
- 3:55get what it wants. We can also see some
- 4:05commands, some important commands on
- 4:07the guide, some important commands to
- 4:09run like graphify point, graphify docs
- 4:11update. The second important tool we
- 4:18are going to look at is called
- 4:19CodeGraph. It is a little bit different
- 4:24from what we just saw with graphify.
- 4:28Graphify is for the big picture, the
- 4:31idea for architecture and onboarding.
- 4:34But when you are actively coding,
- 4:36Claude does something else. It opens
- 4:39files one by one to actually find a
- 4:42defined function. Right? You can have
- 4:4610 tool calls to find just one single
- 4:48thing at that level. Meaning that for a
- 4:53given project, for those who do a bit
- 4:55of projects, you don't really need to
- 4:57be a coder nowadays to develop a
- 4:59project. However, even when you develop
- 5:04a project, whether you are a coder or
- 5:07not, Claude here, for example, in this
- 5:09project, will go and read, it can call
- 5:11this file several times to understand
- 5:14the context. The solution is actually
- 5:19CodeGraph, which uses tree-sitter, an
- 5:22AST parser, to analyze your code at a
- 5:25semantic level (functions, classes,
- 5:27imports, dependencies) and then exposes
- 5:30a local MCP server. So what I am
- 5:37putting here is that it performs an AST
- 5:40tree-sitter parse, then it creates a
- 5:42local MCP server on port 3000. Claude
- 5:49will query this local server directly.
- 5:51So we can also take a look at the
- 5:55GitHub quickly. I always like, when you
- 6:06have a new project or a repo or
- 6:07something presented, it is good to go
- 6:09check the repo and read the README a
- 6:11bit to see what it looks like. So for
- 6:17installation, we see it's an IR command
- 6:20on Windows. For me, otherwise for those
- 6:22on Linux, it works very well. And I
- 6:26will still show you quickly what they
- 6:31say about why use CodeGraph. Here, it
- 6:34says agents need to understand slow way
- 6:44, grep, glob, one file, rebuilding
- 6:46dependencies of tools. So, actually,
- 6:51when an agent wants to understand code,
- 6:54what it does is ask questions or wants
- 6:56to make changes. And in fact, it says
- 7:00it discovers it has to read, it has to
- 7:02grep, it has to perform quite a few
- 7:04commands to understand the tool. And
- 7:11here, what Code Graph will do is that
- 7:13it will, here it says "give the agent
- 7:15exact code it needs in one call."
- 7:21Basically, Code Graph will make it so
- 7:23the agent doesn't need to make multiple
- 7:26calls; it will do it all at once. So, I
- 7:30really like this—let's call it this
- 7:33benchmarking—is that depending on the
- 7:35type of language, obviously, you save a
- 7:37huge amount of tokens. For example,
- 7:43here on a TypeScript project, you have
- 7:45fewer calls—well, fewer calls than
- 7:48possible—and as a result, it’s much
- 7:50cheaper, whereas without Code Graph, it
- 7:53would take a huge amount of time, a
- 7:55huge number of calls, and therefore a
- 7:57huge number of tokens. We're going to
- 8:03test it because I also have an internal
- 8:05project that is very interesting,
- 8:07written in Python. However, we’ll
- 8:09start by testing the installation. Very
- 8:11simple. So, we’ll open it. So here,
- 8:14we'll write in the web, write in the
- 8:16request thread. So it’s trying to
- 8:18install, trying to write. In any case,
- 8:20it's doing its little routine. But if
- 8:23we go back quickly to this level, to
- 8:28this level in my slide, is that the
- 8:36advantage with this tool is that it
- 8:38will allow you to save, depending on
- 8:40the type of language, and so on. But
- 8:46actually, you can save more than 58%of
- 8:48tool calls per session. That means
- 8:54it’s about a 15%reduction in cost.
- 8:57-16%in cost, and that’s not
- 8:59insignificant. So instead of opening 10
- 9:02projects all the time, thanks to what
- 9:05it puts in place—the LLM and the MCP
- 9:07—it won't make as many calls. It will
- 9:11directly call this tool. Directly call
- 9:14MCP. And the third tool we’re going
- 9:17to look at is called RTK. The problem
- 9:21is, where is it? Well, for example,
- 9:26let's say you run an npm run build, or
- 9:28git log, or pytest, or docker ps,
- 9:31commands that are actually verbose,
- 9:33that return walls of text. The problem
- 9:39with Claude is that it will receive all
- 9:41of that in its context, and it might
- 9:43display all 800 or 500 lines to you,
- 9:45which is sometimes verbose and useless.
- 9:49RTK places itself in the middle; it
- 9:51reads the CLI and asks Claude to
- 9:53display only what is necessary. So, in
- 9:57the example I'm showing, instead of
- 10:00displaying 8,400 tokens—8,400 tokens
- 10:03is huge—it will only display it will
- 10:10only display 1,000 tokens, and so
- 10:12that's actually a time saver. Or rather
- 10:20, a token gain of almost, yes, almost
- 10:2380%that you'll save, and well, saving
- 10:25tokens also means saving on your
- 10:27billing. So here, we can go check out
- 10:34the RTK AI GitHub. It summarizes the
- 10:40number of tokens it can save. For
- 10:44example, the different types of command
- 10:46operations, like ls or tree, are
- 10:48commands that eat up a huge number of
- 10:50tokens. So, for savings, we can see the
- 10:54installation here; it works on Windows.
- 10:59So, this Windows here Mac, on Windows,
- 11:03you actually have to download the
- 11:05releases and then install. So there,
- 11:09and then command analysis, super
- 11:11interesting for us. In my case, I'm
- 11:14going to go to the releases and then
- 11:16download it and then download it.
- 11:19Otherwise, well, there's also WSL that
- 11:22exists for that. So, they explain how
- 11:25it works without RTK? Well, Claude runs
- 11:28its commands, et cetera. It eats up
- 11:30your tokens; with RTK Well, Claude, git
- 11:33status for example, like well, RTK will
- 11:38filter, it will filter. git will return
- 11:41, and well, for example, there it
- 11:44returns 100 tokens to you, so you have
- 11:4610%...well, 10 times fewer tokens. So,
- 11:49we're almost at the end. The last tool
- 11:52we're going to see is called Caveman.
- 11:55The problem is that Claude, by default,
- 11:58is verbose; it starts its responses
- 12:00with "Great Question" and so on. It
- 12:03explains the context before giving the
- 12:05answer. It concludes with a summary
- 12:07paragraph. All of that is output tokens
- 12:10that you pay for and that slow down the
- 12:14final response. So Caveman, we can see
- 12:18it on GitHub, this is very important.
- 12:22It's features I didn't talk about for
- 12:23the others. Uh, for GitHub projects,
- 12:27it's always good to actually look at
- 12:29the community, always good to look at
- 12:31the number of forks, the number of
- 12:35stars. And on GitHub, we can see that
- 12:39it has more than uh 69,000 stars on
- 12:41GitHub. So the repo is quite popular
- 12:44because it solves a real problem that
- 12:47is universal. How to install it? Well,
- 12:49it's very simple. So you see here, we
- 12:53can see the number of stars, forks, and
- 12:56watches. You can even sponsor the
- 12:59project. Uh, so here, in fact, we take
- 13:04an example, which is that Cavem, that
- 13:07Claude is chatty. That's assuming that
- 13:09Claude is a journalist. There you go,
- 13:12he's very chatty. We want answers that
- 13:15are concrete and easy to understand.
- 13:17And so, saying concrete means that it
- 13:20saves you tokens. So here, for example,
- 13:22you have 69 tokens for all that, and
- 13:24well, we just need this. We understand
- 13:26the answer well. Done. So for now, it's
- 13:30very simple. So it's this command here,
- 13:33and as soon as you install it, you can
- 13:35start using it. There is also a skill
- 13:42to compress, well, all the answers
- 13:44given by Claude, and you can, in fact,
- 13:47uh, depending on how you want it
- 13:49reduced. So you have, I'd say, the
- 13:54slider set to that level. You have
- 13:57light, full, ultra, uh, wham. So for me
- 14:02, I would tell you not to go too far
- 14:04towards the upper part of the slider,
- 14:06staying on light or full. OK. So here
- 14:11as well, you have other commands for
- 14:14reviews, for git, etc. So that's what
- 14:19I'm showing here. You have four modes,
- 14:21light, full. I personally prefer to use
- 14:25it in full. And Wham there, the last
- 14:28one anyway, it's a bit, it's a bit
- 14:30intense. And there is also an important
- 14:35command, which is cavem compress, which
- 14:38also allows you to compress in compress
- 14:40. We can even use it with Claude MD,
- 14:43which also compresses your Claude MD.
- 14:46Sometimes Claude MDs can be very, very
- 14:49long, and this allows you to also save
- 14:51tokens. So in conclusion, we have seen
- 14:56four tools to tokenize a huge number of
- 14:59tokens. The first one is that the
- 15:02problem it solves is that Claude
- 15:04re-reads the whole project, and so with
- 15:06graphify it allows you to save 80%of
- 15:08context tokens. The second one is that
- 15:12Claude opens, uh, 10 files for one
- 15:14answer because it wants to understand,
- 15:17for example, the project you are
- 15:19working on. Well, Code Graph comes in
- 15:23to solve the problem of tool calls or
- 15:25file prompt calls. And that allows you
- 15:29to also save more than 58%of your
- 15:31tokens. The third one is CLI tools that
- 15:36actually overload the context. When
- 15:40Claude calls Git, for example, there's
- 15:43a huge wall of text and the command is
- 15:45sometimes very verbose. Well, the tool
- 15:49that allows you to just compress all of
- 15:52that is RTK. It also allows you to save
- 15:5780%of your input tokens. The last one
- 16:05we saw is that sometimes Claude is
- 16:07chatty, so Cavem allows you to save
- 16:09tokens on output as well. So here, we
- 16:15can see the time savings each one gives
- 16:17you. Well, combined with all of that,
- 16:21you can actually save 70%of your tokens
- 16:23. However, there are still some
- 16:25drawbacks, as they say. There are still
- 16:28some disadvantages. It means that when
- 16:32you use these tools, depending on the
- 16:34ones you choose to use, it means you
- 16:36will still lose information sometimes.
- 16:39Okay? These aren't perfect tools.
- 16:41Neither is Claude, right? But it means
- 16:45you might lose information. You might
- 16:47lose a bit of context with Graphifi.
- 16:51You might lose some—if you compress
- 16:53too much, maybe you lose info on your
- 16:56APIs with Caveman, etc. In any case,
- 16:58it's up to you to parse a bit, to be
- 17:00able to say, "Okay, splitting the
- 17:02difference, I'll take a bit, or I'll
- 17:05take everything." Anyway, if you're
- 17:10only coding and, well, the very core of
- 17:13the project is something you don't have
- 17:15knowledge of, you might as well put
- 17:17everything in and go for it. The goal
- 17:21is that you really get your result. If
- 17:25these four tools taught you something
- 17:27about how Claude consumes your tokens,
- 17:29imagine what you can do when you truly
- 17:31master Claude Code from end to end.
- 17:36I’ve put together a complete training
- 17:38, everything I use in production, the
- 17:41prompts, workflows, four tools, and
- 17:43methods to help you save time, whether
- 17:45you're a dev or a salaried employee
- 17:47looking to use Claude effectively. And
- 17:52well, it's only priced at 47 €.
- 17:56Lifetime access, the link is in the
- 17:58description and if you don't find it
- 18:00yet, as soon as it's finished, as soon
- 18:02as it's ready, the link will be in the
- 18:04description. Otherwise, subscribe if
- 18:08you want more videos like this. In any
- 18:11case, I am now regularly publishing one
- 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.