The Claude Code Changelog
All Episodes
Claude Code Skill Doctor Cuts Hidden Token Bloat

Claude Code Skill Doctor Cuts Hidden Token Bloat

0:00|0:00

Claude Code 2.1.261 adds skill doctor to reveal unused loaded skills and their context costs, helping you prune token-heavy workspace setups. The episode also covers larger inline output limits, subagent prompt loading from files, and stronger rm safety checks.

Show Notes


Chapter 1

Auditing Token Overhead with Claude Code 2 point 1 point 261s Skill Doctor

Lachlan Reed

Brought to you by Jellypod AI, here is a quick question for anyone building with AI assistants. Have you ever noticed your terminal session slowing down to a absolute crawl, and you cannot figure out why?

James Turner

Oh man, all the time. You think you are just having a quick chat with your code base, and suddenly every single turn takes ten seconds to respond.

Lachlan Reed

mate, I, I, I literally had this happen last week. I was working on a project with eight custom workspace skills loaded up. Nothing crazy, right? Just some helper scripts. But I noticed this weird lag. Turns out, those eight custom skills were silently burning fifteen thousand context tokens on every single turn before I even typed a word!

James Turner

Fifteen thousand tokens? Just sitting there in the background prompt before you even ask it to do anything?

Lachlan Reed

Every. Single. Turn. It was like driving a ute with the handbrake pulled halfway up. You are paying for all that context overhead, and the model is getting bogged down reading system prompts for tools you might not even touch during that session.

James Turner

That context inflation is huge. Because people keep adding marketplace extensions and custom skills, thinking they only matter when you call them, but the model has to know they exist!

Lachlan Reed

Exactly right. But look, Anthropic just released Claude Code version 2 point 1 point 261, and according to their official changelog, they added a new command called skill doctor, specifically, and I quote, to show which loaded skills go unused and what they cost in context, so you can prune them.

James Turner

Wait, so it actually gives you a breakdown of the exact token count per skill?

Lachlan Reed

Yeah! You literally just type slash skill doctor right in your terminal session. It inventories every active skill, flags the ones whose definitions have not been invoked in your current conversation history, and prints out the exact context footprint for each one.

James Turner

That is so useful. So what is the actual workflow then once you run slash skill doctor? How do you prune things down?

Lachlan Reed

So, step one, you run the command and spot the bloat. In my case, I had a couple of massive SKILL dot md files that were basically full documentation dumps. So step two, if you do not need the skill for that project, you just disable or remove the bloated SKILL dot md definition. Or step three, which is my favorite, you tighten up the trigger descriptions in the frontmatter.

James Turner

Ah, right, so instead of shoving the entire instruction set into the system prompt upfront, you keep the description lean so Claude knows when to pull in the heavy stuff!

Lachlan Reed

Spot on! Keeps your prompt lean, saves your token budget, and speed snaps right back.

James Turner

That is a massive win for token optimization. And speaking of this 2 point 1 point 261 release, there are a few other killer quality of life upgrades in here too, right?

Lachlan Reed

Oh, absolutely. They added two new settings in dot claude slash settings dot json called bashOutputMaxChars and taskOutputMaxChars. You can bump those all the way up to 128,000 characters.

James Turner

Oh, thank goodness! No more truncated test logs right in the middle of a build error!

Lachlan Reed

Right? It used to dump the tail end to a text file if it overflowed, but now you can keep up to 128K inline before it offloads to disk. Huge when you are running big test suites.

James Turner

What about subagents? I saw something in the update notes about subagent prompts?

Lachlan Reed

Yeah, they added a flag, append subagent system prompt file. So if you have a massive prompt for a subagent that is too long to comfortably pass on the command line, you just load it straight from a file.

James Turner

Nice. And didn't they harden some of the safety prompts around bash commands as well?

Lachlan Reed

They did! They upgraded the dangerous rm safety prompts. Now it catches stuff like rm rf hidden inside positional parameters or nested inside double quoted sh c calls. So if a tool try to execute a dangerous deletion deep inside a subshell script, Claude Code flags it and asks for confirmation before blowing away your files.

James Turner

That is really smart. Between slash skill doctor saving context tokens, larger output buffers, and tighter safety checks, this 2 point 1 point 261 update is a really solid tune up.

Lachlan Reed

Too right, mate. Definitely run slash skill doctor on your workspace today and see what silent token eaters you have lurking in your prompt!