Skip to content

Turning My Claude Usage Into a Minecraft Health Bar (Claude Mods)

Read the Portuguese translation →

Author: Better Stack · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Turning My Claude Usage Into a Minecraft Health Bar (Claude Mods) · Channel: Better Stack · 07:19 · Watch on YouTube

Topics: AI agents, Cybersecurity and software security, Claude Code, AI developer tools

The video introduces Claude mods, an official TypeScript-based feature that can modify Claude Code’s interface and behavior from inside the process. The presenter builds a Minecraft health-bar status line showing subscription and context-window usage, then creates a fake Twitch chat that reacts to Claude’s actions. The examples demonstrate how mods can use events, draw interface elements, and make authenticated requests, while also highlighting that mods can be powerful and should be checked before installation. The presenter encourages viewers to experiment with mods and share their use cases.

  • Claude mods are TypeScript files that work as plugins in both the CLI and desktop app.
  • Unlike hooks, mods run inside Claude Code and can rewrite events, draw UI, or replace features.
  • Mods can observe, rewrite, or skip events such as tool calls and prompt submissions.
  • The presenter used a mod to display 7-day usage, 5-hour usage, and context-window usage as Minecraft health-bar elements.
  • The mod obtained an additional usage figure by inspecting the response to the undocumented endpoint used by the /usage command.
  • Mods can render image-like graphics in a terminal using text characters, though the result may scale poorly.
  • Claude can build mods from natural-language prompts, and hot reloading lets changes take effect during a session.
  • A second mod used Claude Haiku to generate fake Twitch chat messages reacting to Claude Code’s actions.
  • Temporary mod files may be periodically cleaned up, so mods should be copied or installed elsewhere to keep them.
  • Because mods can rewrite or add to prompts, the presenter advises checking them before installation.
Start Chapter Summary
00:00 Introducing Claude mods The presenter explains what Claude mods can do and how they differ from hooks.
01:36 Building a Minecraft usage bar The presenter prompts Claude to create a Minecraft-themed status line and tests its usage readings.
03:08 How the mod works and how to keep it The video discusses how the mod retrieves usage data, renders graphics in the terminal, and can be saved for future sessions.
04:11 A fake Twitch chat that reacts live The presenter builds a chat pane that uses Claude Haiku to comment on Claude Code’s actions.
06:47 Safety advice and sign-off The presenter recommends trying mods, warns that they can alter prompts, and invites viewers to share ideas.

Hooks run outside of Claude code, whereas mods run inside the process. — 01:05

I want the health to be my 7-day usage. — 02:07

So I’m already being roasted by the fake AI chat. — 04:42

Mods actually have the power to rewrite your prompts entirely or add to them and loads of things. — 06:47

Claude Mods, Claude Code, Claude Haiku, Claude hooks, Minecraft, Subway Surfers, DOOM, Three.js

00:00 Waiting for Claude’s boring, but with this new feature, it doesn’t have to be. While you wait for the task to finish, you could play Subway Surfers and try and get your new high score. Or if solo gaming isn’t for you, why not have it open up a Doom lobby where everyone else in the lobby is also waiting for that Claude to finish, so you can enjoy some time with your fellow meat proxies. All of this and more is made possible thanks to Claude mods, an official feature that lets you modify how Claude works, letting you add your own interfaces or completely changing Claude’s, as well as adding commands, tool call rules, and more. So, let’s jump in and build our own.

00:34 So, Claude mod is actually really simple. It’s just a small TypeScript file that lives inside of Claude code as a plugin, and it works on both the CLI and the desktop app. And obviously, it’s meant for more useful options like showing extra information in a pane or the status line, or giving you things like PR and other get information inside of Claude. You can basically do anything you want with these, and I actually made one that loads up one of our videos while you wait for Claude to finish, so I could ask you to subscribe. Now, you might be thinking that you’ve seen this before with Claude hooks, but mods are actually different from those. Hooks run outside of Claude code, whereas mods run

01:05 inside the process. This means that hooks can’t rewrite events, draw UI, or replace features, but mods can. In fact, some of Claude’s features are just mods themselves, like the diff pane or the agents.md support. The way that these mods work is with events. Every time Claude code does something, like a tool call, prompt send, or finalizes a turn, they will send events, and mods use those events in three ways, either by simply observing them, rewriting them, or skipping them entirely. Then on top of this, mods can also draw, so they can add a pane into a conversation, add a band above a prompt, add buttons,

01:36 inputs, or even change Claude code’s UI, like changing the spinner to something custom. As you can see, these are incredibly flexible, so let’s build our own. I’ll do one semi-serious one, and then one silly one, and the good news is you don’t really have to care much about the code in these. You can just describe what you want to Claude code, and it can build the mod for you. I’ll start by building my semi-serious one, or at least the one that’s going to provide some value. It might not look too serious since I’ve just pasted in some of the Minecraft hard, but essentially what I want is my subscription usage to be displayed as a Minecraft health bar. So, I’ll go ahead and send the prompt.

02:07 Can you build me a status line mod? I want an exact recreation of the Minecraft hard. Feel free to use the internet if you need to download the real sprites. I want the health to be my 7-day usage. I want the saturation to be my 5-hour usage. I want armor to be my fable usage, and I want the XP bar to show my context window usage. Now, all we need to do is hit send, and hopefully in just a few minutes it should have this mod ready for us. Okay, it’s been working for about 5 minutes here. You can see it’s asking me to enable hot reloading for this session, which is really cool. Essentially, we can just enable this, and now it can build the mod and refresh it right here in the

02:38 session without us having to reload anything. You can see the mod hot reloading is on. This session mods will load when this turn ends. So, we should see something once it’s done. And here we go, that turn is now over, and it literally just loaded in this mod for me. We now have a Minecraft hard that shows my subscription usage as well as my context window. So, we’re using up about 22% of my context window, as well as 10% of my 7-day usage and my fable usage. If I click down here, we should see that the information is correct, and yeah, there we go, it lines up exactly. So, everything does seem to be working.

03:08 The only thing that’s wrong with this is the white background. So, I’ll just send a follow-up prompt to ask it to remove it. And now it is absolutely perfect. I actually think this is really cool, and it’s done a really amazing job of building me this mod. I kind of want to keep this around for future videos just to see if people get confused as to why I have this. Now, there are two things this mod has done I think are really cool and want to point out. The first one is where I got the fable number from. You can see here it says the mod API only gives the 5-hour and 7-day figures. It doesn’t actually give the fable usage figures. So, what it did is it just read the {slash} usage command, saw what endpoint that hit, which is

03:40 undocumented, and then read the response itself, and it’s able to do that since this is a mod, so it can just send requests authenticated as my login. This means you can get a mod to do basically anything that Claude Code can. The second cool thing it did was add full backs when it can’t show images, in this case in the terminal. This is actually rendering in these pixels as two characters each, and that does mean that it scales a bit badly if I zoom in and make the font size larger, but at this scale it actually looks pretty good, and I’m sure I could send follow-up prompts to get this more resizable, or even add some custom commands so I could do that on the fly. Honestly, I was just really

04:11 surprised at how accurate it got this recreation. One thing to be aware of, if you do ask Claude to build its own mods, it will actually do this in a temporary folder, which does get cleaned up periodically, so it will delete everything. So if you do want to save this mod or share it with other people, all you need to do is just go here and copy the folder somewhere else, or you can do I did and simply ask Claude to install this into all of my other sessions, and it just copies it into my mods folder. So now in a new session, I’m going to send another prompt for a new silly mod, and you can see here that my Minecraft hard loads up straight away, but the new mod that I want is essentially just a fake Twitch chat,

04:42 where we have Claude Haiku read everything that Claude is doing, and then it reacts live on the side. Okay, build me my new mod where we have the fake Twitch chat, and honestly, it’s already being pretty funny. I actually closed this pane over here and didn’t know how to get it back, and apparently it’s just the {slash} back seat command, but it seemingly roasted me here, where it says bro, just {slash} back seat, it’s literally not that hard. So I’m already being roasted by the fake AI chat. I want to play around with this a bit more, so I’m just going to ask for a 3JS game and see what the chat does over here. You can see it’s saying that I’m trying to make Forza in a single HTML

05:13 file, which is a pretty funny chat, and yes, that seems to be what a lot of people do these days with 3JS. Saying chat, is this real or did you just accept the most unhinged task ever? And what’s actually happening here is it’s reading each task and each step that Claude is doing. So when it reads a file, this chat will know about it. When it tries to run a bash command, the chat will know about it, and it’s sending this to Haiku, generating the fake chat messages, and then sending them here. The other cool thing about that is since this is a mod, it can use my subscription for the Claude Haiku calls, so I don’t need to add any API keys or anything like that, it just all works.

05:44 Okay, so Claude has has started to do some things here, and you can see that chat reacted live to each step that we have here. You can see did it just speedrun into {slash} temp, so read it saw that. Reading PNGs now, what code is this? Chat, is this real or did Claude just speedrun? Bro, that path is cooked. What is the directory structure? Just rmrf and start over. Honestly, skill issue. Please don’t rmrf anywhere, please. I I really don’t want that. CD into the shadow realm speedrun. Bro, just read the file. What’s next? Send it to dev. No. Chat, is this real? We’re

06:16 loading images in the terminal and pog the file exists. Now, actually do something with it. This is honestly a little bit cursed. I just stopped it because I don’t actually want a 3.js demo, but you can see chat, is this a skill issue or nah? And GG interrupted mid-work. That’s rough. So, seems like Claude haiku is mourning that I stopped Claude doing what it could. But, now I’m going to ask it to remove anything related to the 3.js demo. Yo, 3.js getting yeeted. Someone speedrun. It’s really obsessed with speedruns this chat. Chat, is this real right now? I got gifted five subs, apparently.

06:47 Absolute spaghetti directory structure. Just rmrf that whole thing and start fresh. Bro just deleted the whole project. And then also chat, is he going to redo it or nah? This is sad. Honestly, I’m having way too much fun with these mods. I highly recommend you try them out. That you only showed you a bit of that power. If you want to see some other cool use cases, I’ll leave a few cool community repos and awesome list in the description down below. Although, do be careful when you install these things. Mods actually have the power to rewrite your prompts entirely or add to them and loads of things. So, always check what you’re installing. Do

07:19 you have any cool use cases for Claude mods or just plain silly ones? Let me know in the comments down below. While you’re there, subscribe. And as always, see you in the next one.