Podcast
304 - Agent Skills - When to Use Them and Why They Matter
Fragmented - AI Developer Podcast
- Skills Unlock Hidden Productivity
- Agent skills look deceptively simple but unlock major productivity gains when understood and used correctly.
- Kaushik and Iury emphasize skills as a powerful, low-effort productivity multiplier for engineers. Transcript: Kaushik Gopal But there’s two really common questions that come up whenever people talk about agent skills. The first is, when do I actually need to use agent skills? It’s a feature, but I don’t exactly know when I’m supposed to use this feature and what it’s meant to achieve. And the second is, now that you have an understanding of what it is, it feels very confusing because there are plenty of other tools and features like MCPs, slash commands, and it’s very Easy to get confused when to use one of these existing tools versus, say, an agent skill. So think of this episode as a crash course in understanding agent skills, because the thing with agent skills is they’re like deceptively simple, but incredibly powerful. Once you understand how agent skills work and how simple they are to get them working, you almost unlock a new level of productivity. Iury Souza Totally. Yeah. Especially since last week, if you’ve (Time 0:00:32)
- Replace Repetition With Skills
- Use skills for repeated tasks instead of copy-pasting prompts to reduce toil and increase consistency.
- Share skills across teammates so the whole team benefits from deterministic, reusable tooling. Transcript: Kaushik Gopal So when they came up with agent skills, it was as simple as just repetition. Every time you needed to repeatedly do the same thing with an agent. So think about cases where people would have prompts stashed away, or you would copy paste the same thing again and again into your agent. That’s a good sign, or as we say, code smell that, hey, you should probably be using an agent skill instead of repeatedly manually doing the same thing. So that’s the first reason to use agent skills, repetition. And the repetition can be across two dimensions, right? One is you yourself happen to be doing the same thing over and over again. That’s one dimension. The other dimension is say you work in a team and across the board, your teammates happen to do the same thing across the board, right? So you might do it today. Your colleague might do it two times tomorrow, another colleague might do it, you know, three or four times. That is another dimension of repetition where, again, if you just create an agent skill to do this, everyone can leverage and use that same functionality. (Time 0:02:16)
- Progressive Disclosure Solves Context Bloat
- Progressive disclosure is the key feature that differentiates skills from stuffing everything into the session context.
- Skills lazily load full instructions only when the agent decides it needs them, avoiding context bloat. Transcript: Kaushik Gopal That’s a great question. The answer to that is the second most important reason to use agent skills. Agent skills come with a feature called progressive disclosure and we’ll go into the details of progressive disclosure. It’ll make more sense once you understand what a skill is and how to build a skill. So we’ll just remember that term progressive disclosure. In the past we have talked even in our MCP episode we talked about the problem of context window bloat. Agent skills were specifically designed to address this problem. I think it’ll be easier to understand progressive disclosure once you know how skills are actually created and what they are. (Time 0:03:44)
- Package Skills As Small Folders
- Build a skill as a folder with a skill.md and optional scripts, references, and assets to package behavior for agents.
- Include scripts for deterministic work and examples in assets to improve LLM output reliability. Transcript: Iury Souza Yeah. So I did some research on that. And well, turns out it’s a folder with some markdown files. Kaushik Gopal So your PhD thesis paper is like two lines. It’s a folder with markdown instructions. Iury Souza Yeah, they keep on giving. But yeah, I think basically, I think this whole thing is just an evolution of what the other tools that came before, right? So because before, like, you could have, like, some slash command, which is also just a markdown file. But now you’re combining things because you’re also leveraging the tool calling capabilities. So it’s now you’re composing two things now. So an agent skill is just a simple folder with instructions, scripts, resources, anything that an agent can use and discover to do the work more reliably. So it’s like this small package of instructions with maybe a command or like a CLI tool or something. From a high level, that’s basically it. (Time 0:04:27)
- Front Matter Enables Discoverability
- Only skill.md is required; front-matter metadata is parsed by the agent harness to enable discovery.
- Reference docs and assets stay out of the main context until explicitly loaded by the agent. Transcript: Iury Souza That’s the main file where you have your markdown, description of what the skill is, like the instructions of the skill. But now you also have this header, which is in front matter metadata, right? So you can have a bunch of things there. You can need to look at the spec to know all the properties. The thing is that now you have this front matter metadata that can be parsed by the agent harness in this case. This is really important. This really differentiates how skills are used. Then you have the scripts folder like we talked about. Then you have the reference folder. This is where you put the documentation that can be loaded into the context. So if there is more than just the instructions, this is where you put it. And finally, you have an assets folder, which is where you put the templates or examples for output. So it’s really useful to have examples for using LLMs, right? So if you want to have very solid kind of response and outcome and have the LLM generating like good results, it’s really useful to have examples as part of the context for the LLM to generate Results reliably. So it’s part of the definition of a skill to have this folder so you can do exactly that. So that’s about it. So these are the four pieces you would need to have to create a skill, which, by the way, only the skill.md is actually required. The other ones are optional. (Time 0:07:16)
- Skills Load Only What’s Needed
- Skills only load name and description into the session; full instructions are lazy-loaded when the model decides to use them.
- This lazy-loading relies on models’ ability to find the ‘needle in the haystack’ in large contexts. Transcript: Kaushik Gopal So you gave us a high level overview of what a skill is, but maybe let’s zero in on that instructions file that you mentioned. So the standard requires you to have a YAML front matter at the top of that Markdown file. So a name and description field. The name should correspond to the same skill. So whenever you invoke the skill, it should be the same name used there. But in the description, you describe what the skill does. This is actually pretty important when we talk about progressive disclosure because the main difference between all of these tools say you wanted to put everything into your agents.md File or your cloud.md file every time you create a new session all of that is loaded into your context it the same applies into mcps and we talked again about this one of the disadvantages In mcps everything is loaded into your context which means regardless every time i open up cloud code or anyone opens a new session that context window is already taken up because you’ve Added all these instructions that’s the disadvantage the way skills goes about this is this yaml front matter that i talked about it only takes the name and description and loads that Into the context window only the words in your name and description are converted into tokens and used in your context window below field like you might have like 500 lines of instructions In that skill.md where you’re telling the agent what to do none of that is loaded by default into your session it only picks that up when explicitly the model realizes it needs to use this Skill then it reads that file again, takes all of that, converts it to tokens, and then loads it into the context. It lazy loads the information only as it needs. (Time 0:10:46)
- Set Who Can Invoke A Skill
- Understand whether a tool should be user-invokable or agent-invokable and set that flag in the skill definition.
- Use agent-invokable skills when you want the agent to discover and call tools autonomously. Transcript: Kaushik Gopal So effectively, slash commands and slash skills are pretty much the same. So I can reap, are they like almost interchangeable? Iury Souza They’re merging them, there is a difference and they are making that difference explicit now basically if you think about it slash commands it’s you who’s doing that right you invoke The slash commands but skills on the other hand skills are invoked by the agent you just add it to the context and the agent decides, hey, oh, I think it makes sense now to use that skill. But commands, no. Commands, you are the one doing that. So basically they added this parameter on the definition of a command and a skill. Is this user invokable or agent invokable? It can be either one of them or it can be both. (Time 0:14:58)
- Start Small And Use A Skill Creator
- Start with a simple, repeatable task (e.g., list open PRs) to build your first skill and iterate from there.
- Use a skill-creator skill or templates to avoid hand-editing YAML and folder structure mistakes. Transcript: Kaushik Gopal Say start at the beginner level, which is maybe just use a very simple MCP and try to get a repeatable set of tasks. So one good example is maybe if you want the agent to give you a list of open pull requests that you have to review for the day, that’s a good beginner example of how you can create a skill. So you create the skill, connect it to maybe a GitHub MCP or even if you don’t want to connect to the MCP, if you have the GHCLI utility available locally, you can create a skill with a set Of instructions to say, hey, hit the GitHub repository, pull the list of open pull requests that are assigned to me for review and present them to me. That’s the simplest skill you can start with. But if you thought the way to create the skill is to, you know, go and create a folder called skill, add a skill.md instructions file, I would say don’t even bother because you can use a Skill to create the skill, if that makes sense. You can just open up the agent and use this skill called skill creator. And it’ll do all of that. It’ll make sure it’s in the right format. And it’s a little nuanced because if you use cloud code, it doesn’t come built in with the skill. You have to install this skill. And you can install it from a marketplace. Anthropic has this repository called Anthropics slash skills. It’s a GitHub repository, it’s open. And in that you’ll basically have the skill called skill creator. It’s funny because in Codex, it actually comes built in. So the Codex CLI tool has a skill creator. I don’t know what they call it, but it’s a very similar term. I would say based on the tool or utility that you’re using, figure out if they have the skill built in. If not, install that skill and definitely use it. You don’t want to be handwriting your markdown and making sure the YAML front matter is all in the right format. (Time 0:17:10)
- Use Context Forks For Isolated Work
- Advanced YAML fields let you choose model, and use context fork to isolate sub-agent work and avoid polluting the main conversation.
- Context forks run in isolated threads and return only the final result to the main agent. Transcript: Kaushik Gopal There’s other very interesting fields. For example, one, you can specify the model that you want in that skill, because sometimes you don’t want to use the biggest, most powerful model because it’s more expensive. If you’re just retrieving or doing basic things, you want to actually use a much smaller, leaner model. So there is an attribute in the YAML front matter called model, but you can explicitly specify which model you want. That’s one example of how you can start to make these even more advanced. There’s one called context fork, which is very interesting. That’s the one that I think you and I were going back and forth. Do you want to tell us a little more about this one? Iury Souza So there’s this very interesting one field, right? It’s called context, which when you set to fork, it will run the skill on an isolated context. So the idea is that this is not going to pollute the context that from your main conversation, it would run as if it was like in a separate thread, so to speak. Kaushik Gopal And this context fork is actually pretty useful because when you think about it, even if you have repetitive tasks, because I’m not sure if you have faced this situation, but if you have An agent and you want this agent to do the thing repeatedly right which is like search a folder analyze come back with the results or make multiple api requests if it’s making 50 requests Because you know it pulls a list of ids and then it has to make an api request for each when you start to do these repetitive tasks, that’s a good reason to use ContextFork because you don’t Kind of want all of that API request and the back and forth to go into your main agent. You just want the results, especially when you have this repetitive process. So that’s another good reason to use ContextFork. (Time 0:19:44)
- Instagram Reels Transcription Skill
- Iury built a skill to transcribe Instagram Reels by pasting a URL and getting a transcript back.
- He uses it to avoid replaying videos and to assemble chunked transcriptions more reliably. Transcript: Iury Souza While he was saying that, I just thought about this, a good use case, because I have this skill that I built for transcribing Instagram Reels. Yeah, I know. Kaushik Gopal Oh man, Yuri, you’re like a machine. So you want to be cool and plugged into social media. Would you do it with an agent? You suddenly became very uncool. Iury Souza In my defense, you know, there’s some useful content on Instagram, but it’s really annoying to have to be, you know, like watching the thing over and over. So I just want to, yeah, just give me, just give me your context, you know. So I paste the URL to the agent and it goes, watches the thing, pulls back the transcript. So I think it’s a very good use case because it has to do a little back and forth. Like for example, there are some stories you have to split into multiple chunks and then you transcribe each chunk and then you put it together. So I think it’s a good idea to instead now fork it so it doesn’t pollute the main context, right? It just gives me the output, which is this file with the transcript. That’s a good idea. Maybe I should try that. (Time 0:21:36)
- Never Blindly Install Skills
- Inspect any skill code before installing and avoid blindly installing skills from marketplaces or hubs.
- Prefer building or vetting skills locally and isolate risky ones to sub-agents without access to secrets. Transcript: Iury Souza I think our whole industry is going through some very interesting phase now. With skills, if you step back and look at it for what it is, it becomes clear that this thing can be pretty dangerous. Because what is it that you have now is that you have this agent, which a lot of people give full access on their machine, right? And now you have something that can decide when to do something. And this something is basically running code that you download from the internet. So I think as a rule of thumb, you should really know what the skills that you have installed do. Ideally, maybe you should be building the skills that you use, I think. But I mean, eventually you’re going to find something that’s just so compelling to pulling skills into your agent and making it do different things. And I think that’s probably what made OpenCloud so popular is that there is this marketplace of crazy skills that you can just start adding to your agent, you know, like, and it’s just Become super smart and it just works. But for example, giving your agent access to your 1Password and letting it decide when to use that, you should be aware of what you’re doing when you install these skills and maybe try To isolate them to a specific sub-agent. There are ways to use them make them more safe. But one thing I can’t wrap my head around is using a package manager to install skills that you don’t know where they are coming from. Something that’s also interesting to do, there is the OpenClaw. They have this repo, this website where they have all these skills there and you can just install like with their platform. But what I recommend is that you browse it. You can literally just copy the repo. It’s just a repo. You copy, you clone it to your computer and then you browse it. You ask your agent to list the skills that are there. Like what are the interesting skills for, I don’t know, browsing social media or transcribing text. And then you can decide and look at the code and decide which ones you want to actually have. Don’t just mindlessly install stuff from the internet. (Time 0:23:18)