More Skills. Less Context.
Chapters12
The creator introduces the problem of bloated skill text and explains the aim to reduce context without losing function.
HashLips Academy shows how to shrink large agent-skills with MD Compressor, cutting characters and tokens dramatically across four compression levels.
Summary
HashLips Academy’s video introduces MD Compressor, a tool designed to shrink large skill files used with agent skills. Nick (the creator) demonstrates how bloated Markdown skill files accumulate text that taxes an LLM, and shows how compressing them preserves core meaning while slashing tokens. He walks through a real example with a cook-an-egg skill, comparing original text (6,900+ characters) to light, medium, heavy, and extreme compressions that reduce characters to as low as about 2,200 and tokens down to roughly 575. The video covers using the included token estimator to benchmark token usage before and after compression, plus how each compression level affects readability and reliability for AI understanding. You’ll see visual diffs of changes and a summary report highlighting context savings: light (~37%), medium (~64%), heavy (~85%), and extreme (~91%). HashLips also emphasizes best practices, like keeping a copy of originals and testing LLM comprehension after compression. If you work with many agent skills, this approach helps manage context and cost without sacrificing critical instructions. The session ends with encouragement to experiment with levels and adjust based on your LLM’s familiarity with the task.
Key Takeaways
- Original cook-an-egg skill had 6,900+ characters and was estimated to use about 6,500 tokens.
- Light compression reduces characters to roughly 16,000 and tokens to about 4,000, preserving readability.
- Medium compression further trims content, leaning on symbols (pipes, arrows) to condense structure while staying human-readable.
- Heavy compression drastically tightens text, prioritizing machine interpretability and essential details like heat timing.
- Extreme compression cuts characters to ~2,200 and tokens to ~575, with references shortened and readability challenged for humans.
- The compression levels yield significant context savings: ~37% (light), ~64% (medium), ~85% (heavy), ~91% (extreme).
- A token-estimator skill is used to benchmark before/after compression and generate a report on token/character reductions.
Who Is This For?
Developers and AI practitioners who build and deploy many agent skills or prompts in LLM-driven workflows, especially those concerned with token costs and context length. Great for anyone curious about balancing readability with machine efficiency.
Notable Quotes
"MD Compressor is the main one that's going to try and reduce the size of our skill files"
—Introduction to the tool and its purpose.
"The original skill characters was 6,900. We reduced it down to 1,300 and even 985, which turns into the estimated tokens"
—Shows concrete reductions in characters and tokens.
"Compression levels, light, medium, heavy, and extreme"
—Defines the four levels of compression.
"For the extreme case … it reduces even things like line brakes and it just keeps the necessary stuff"
—Describes how extreme compression maximizes compactness.
"The goal here is not to compress each skill to the extreme, but it is there as an option"
—Emphasizes practical usage and experimentation.
Questions This Video Answers
- How can I reduce token usage for large LLM prompts with MD Compressor?
- What are the trade-offs of light vs heavy compression for agent skills?
- How does the token estimator tool work in HashLips Academy tutorials?
- Can I safely compress my own skill files without losing essential instructions?
- What should I test to ensure an LLM still understands a compressed skill?
MD Compressoragent skillstoken estimatorLLM context reductioncompression levels (light, medium, heavy, extreme)HashLips Academycook an egg skillGPU-free prompt optimization
Full Transcript
Hey, how's it going guys? Welcome back to my channel. And in today's video, I'm going to show you how you can compress skills. And yes, I promise you, you are going to run into this problem at some point in the future if you work with a lot of agent skills. And today, I'm going to try and attempt to reduce skills, reduce the amount of context needed to run some of your skills by compressing them. So, we're going to take a look at a skill that I've made called MD Compressor. Now, you can find all the skills that I'm going to show you on the GitHub repo, agent skills.
I'll leave a link in the description, and we are looking at version 1.1.6. So, you can go and download the repo and try it out yourself. I've got some videos on how you can just simply add it your configuration files and get started. If we take a look at the main skill we'll be covering, it is this one over here, MD Compressor. Although, we will touch on token estimator as well. MD Compressor is the main one that's going to try and reduce the size of our skill files and generally any MD file out there. The whole idea is that as we've been building out skills, we sometimes put a lot of text and copy into these skills.
They become bloated. A lot of heavy copy later on turns into a lot of context that an LLM needs to process. Now, how do we reduce that? And that's by removing redundant unnecessary wording so that a machine can still understand. In this video, we're going to compress a skill. And I'm going to show you step by step how I do that. But here's metrics on a skill that I did compress. And just to show you, the original skill characters was 6,900. We reduced it down to 1,300 and even 985, which turns into the estimated tokens over here for a simple skill.md file.
Now, this is a lot of uh tokens that you're going to save when you work with skills and your LLM. So, let's jump right into it and I'm going to show you what this is all about. All right, I've pulled the repo and you should see something like this where all the skills are available here. If you actually want to use them, you need to put them in the cursor skills or or skills directory. You can see these are the ones I actively use. And there is the MD compressor skill. Feel free to read through the MD compressor skill and find out exactly how it does its compression.
And you can also amend it. This is open source, so feel free to do that as well. But now that it's there, I can close down the skills cuz we're going to focus on this output folder. Inside of the output folder over here, I've got a skill called cook an egg. Now this skill basically explains in detail how to cook an egg in various ways. It also have some reference files. You can see here we've got a boiled egg, a fried egg, equipment, uh safety and troubleshooting, scrambled egg. So basically this is a skill that is going to tell us exactly or the LLM exactly how to cook an egg.
Now from the overview of this or just a highlevel scanning of the skill you can see it's quite bulky and because it's so bulky it has a lot of characters in it. This is going to result in a lot of context being used up by your LLM if it has to read all of this. And on top of that it's going to cost you more tokens because there's more characters that you need to process. All right. So what is the solution? We have to squash it down. and we have to compress the skill without losing the integrity of the skill.
Now that we have this, let's get a benchmark. And this is why I also spoke about the token estimator skill. This skill is also included in the repo. And it's just a nice way for us to estimate, not get a legitimate billing grade uh estimation, but to get a rough estimation of how much tokens a skill would use in the sense of characters. We take the characters and we divide it by four. Okay, the character count. So to start off, I can simply ask my AI, please use the token estimator skill and estimate how many tokens does the cook an egg skill have in the output folder.
So this will be our bench line, right, that we're going to measure against. We're going to record the token size and we're going to put the skill through the compressor and then we're going to uh recheck all the estimations. So now that we open this up, we can see the character count and the estimated token count. So you'll see for this skill.md file, it's about 1,746. And then if we go down all the reference files, they also have their estimations. But altogether for the entire skill, if the LLM were to use every possible file in here, it's roughly about 6,591 estimated tokens.
And that's a lot for just a simple skill that tells us how to cook an egg. So now let's go ahead and see what options we have to compress this. Briefly, just opening the MD compressor skill, I want to go to its reference file. And in here we can get to the compression levels. So if you have a look here, we've got the compression levels, light, medium, heavy, and extreme. And of course, each one just gets more compressed than the uh one before it. So I will now show you an example as we compress with all different levels.
So again, it's up to your liking. If you are scared that you might lose a lot of context, then you can choose a lighter compression style. Also using the skill it should make a reference copy of your original but just to be safe do it yourself as well just make a copy um or unless you have source control that should be fine as well. Let's go ahead and clear all our tabs and let's start. Please use the MD compressor skill and go into the output folder and compress the cook and egg skill in all four different levels.
You can do light compression, medium compression, heavy compression, and an extreme compression. All right. And it's off. So, like I said, what we should expect is the skill should make a copy, actually four copies of this exact skill, and we should see the different levels of compression. And we're going to go over them and see uh what it gives us. And there you can see it started making these copies, these clones. And now we just leave it to do its thing. Now that it's done, we can go and analyze and see. So firstly, what I want to try and do is open up and just visually look at what the differences are before we actually pull out the metrics.
I'm going to open up the original egg skill.md file. And we can also open up all the references, but let's start with the light compression and compare them. So here you can see that uh because we're using source control, we can actually tell us what the differences were and you'll see how much it reduced. The red was the text that was there before and the green is what is there now. If we accept um all of this right in this file, it will collapse down. So I can just say keep right and you can see the major difference.
The light compression turned this file that had all this bulky text into a short summary listike um file and it did it for all the reference files as well as you can see over there. But let's keep our focus on the skill MD as these are the highlevel files. So immediately you can see that the skill is compressed. Definitely going to save us on tokens. And we can read through it and be sure that it didn't take away too much of the necessary things that it really needs for this skill. Next, we can have a look at the medium compression.
So if we go in here, we should see a lot more taken away. And you can see that there's a lot more red and a lot less green, meaning that it really took away things. And if we accept this file, you can see although it looks similar to the previous one now where it has the list, this one uses things like plus symbols, um, arrows, little pipes, and start using maybe more symbols to do pointers in this regard. So it is that medium that step up from the light compression of the skill. Now something to point out is that this is all still very much human readable.
Um I would say that the medium compression because it's using pipes does become a tiny bit difficult to read but still understandable right. Um we can fairly understand what this all means but it is more now to do with uh a symbolic meaning right list equipment plus ingredients. It's not saying you need this and it's using the symbol just to condense that into a single token. Right? So if we look at the heavy compression, this is now the step up above medium. We should see a lot of red and it reduced quite a lot of the unnecessary things that it feels like it needs.
It almost took out everything here in the beginning. So we can just accept this. And here we can see that it regarded the most important stuff for this skill to simply just say cook egg home stove top uh chicken eggs uh detail on heat timing you know dness and then it has the references heavy starts getting really more geared towards only a machine trying to understand what is meant here and you can argue that context at this point what level of detail are we losing? But we can do a quick test after this compression to ask the LLM how well it understands each skill and of course um it will need to be tested as well.
But this is going to save you a ton right on context. Now for the uh very very extreme case which I am excited to see because um it is sometimes quite funny to look at the file. Um so the extreme case here obviously a lot of red and this should be even more than the heavy and we can see if we keep the file um here we get into some pretty unreadable at least for a human difficult to to read and and keep track of. Um but the idea here is that it's one step above um the heavy.
So it reduces even things like line brakes and it just keeps the necessary stuff. Now you'll also see that it has these references but it even shortened the reference file names. So if we open up the reference file names whereas previously the reference files had very nice explanatory names here we've got these abbreviations like fr fried egg maybe boil just boiled egg and it's doing this so that it can save as much context as possible even throughout all these reference files you can see it is pretty pretty slim. Okay, now that we've seen the actual compressions and how cool we've seen how much it can take away, let's actually look at some reports.
So, I'm going to clean this tab. Let's ask it. All right, so we've gone ahead and compressed the cook and egg skill in the outputs directory. You can find the original there, a light, medium, heavy, and extreme version of the skill. You need to use the token estimator skill to estimate how much tokens each one of these skills have. Then work out for us the differences between the previous level of compression and give us back percentages on how much tokens we are saving, how much context we basically will be saving on to give that all for us in a nice report.
We want to see how much we actually compress the skill. On top of that, read the skill and make sure to give us a small status on how well you think an LLM will still be able to uh digest the information of that skill even at that compression level. All right. Now, that is a big prompt, but uh it's going to be good for us to see the actual metrics, the reports. And again, this is experimental. So you might find that a compression, light compression works well enough or medium or you might want to even change how it compresses which is totally up to you and totally fine as well.
So looking at the report the results are amazing. We can see here we've got the original light, medium, heavy, and extreme. And here you can see actually how much it compressed the characters. And not only that, obviously this results in the amount of tokens that would be needed when it consumes it. So for the original, we've got estimations about 26,000 characters resulting in 6,500 tokens. Then for the light, 16,000 characters with about 4,000 tokens. For medium, around about 9,000 characters. And the estimation of tokens is 2,000. And then heavy 3,700 characters, roundabout 943 token count.
For the extreme, we've got 2,200 characters. And that gave us a staggering token estimation of 575. Now, the goal here is not going to be to compress each skill to the extreme, but it is there as an option. We've got some more metrics on the differences between each level. And then a very interesting metric over here where we can see the differences between the compression and the original. So for light we freed up about 37% of the context that would be needed. For the medium 64% for heavy 85% and for the extreme uh 91%. So that's obviously a lot.
Now the true question becomes uh will AI still understand how to cook an egg? And if we look here at the tiny bit of reporting that the LLM did, it considers the original obviously as excellent because it's full sentences. Explains it very well. For the light, it's very good. Same front matter and it's very clear with sections. For the medium, it's good for agents already aligned with the task. or heavy, it says usable but brittle. And for the extreme, it says marginal for general use, okay, for expert retrieval. I guess that's basically if you have an LLM that's already trained to do a specific thing and this is just encouraging it towards that.
And so yeah, I mean, if you have a general LLM like this who knows potentially how to cook an egg by default because it's been trained on this somewhere on the internet, then giving it an extreme compression skill like this should still be okay because it just nudges it into the right direction. But if it's something that an LLM is not used to do, uh, basically that will not really work well in the extreme compression and you might want to go for more of a light and a medium compression. Although that being said, you can be the judge at the end of the day and I really hope you enjoyed this video.
I'm going to try and keep on experimenting with more skills like these and bring them on this channel. Anyway, till next time, I hope you have a wonderful day. Just one out.
More from HashLips Academy
Get daily recaps from
HashLips Academy
AI-powered summaries delivered to your inbox. Save hours every week while staying fully informed.









