Claude Agent Skills Explained in 10 minutes (How to use in Cursor)
By Abid Saudagar
Summary
## Key takeaways - **Agent Skills Folder Structure**: Agent skill is a folder containing skill.md file, which is required, and bundle resources like scripts, references, and assets. The skill.md has front matter metadata with name and description, and an instructions section. [00:42], [01:04] - **Three Skill Content Types**: Three types: metadata (YAML front matter with name and description), instructions (how-to process in skill.md), and resources/code (detailed guides or scripts like forms.md). Resources are executed via bash without loading code into LLM context. [01:49], [02:25] - **Progressive Disclosure Loading**: Metadata loads at startup (~100 tokens), instructions load when skill triggered (~5k tokens), resources load as needed (unlimited tokens). This minimizes token usage: you only pay for what you use. [03:04], [03:44] - **MCP vs Skills Key Difference**: MCP dumps all tools and metadata into context at start for wide variety of tasks; skills use progressive disclosure for one specific repeatable workflow, teaching agent how to do a task reliably. [04:45], [05:32] - **Skills Benefits Over Generation**: Reliability from your scripts (few errors, consistent results), efficiency via progressive disclosure, time-saving by using existing solutions, portable across VS Code/Cursor, and Git version control. [05:41], [06:18] - **Cursor Skills Folder Setup**: Create .cursor/skills/ folder in project for local skills or ~/.cursor/skills/ for global. Enable beta nightly updates in Cursor settings to use agent skills. [06:31], [06:49]
Topics Covered
- Skills Enable Progressive Disclosure
- MCP Dumps All Tools Upfront
- Skills Boost Reliability with Scripts
- Trigger Skills via Keyword Descriptions
Full Transcript
agent skills, also known as cloud skill because it is made by anthropic, now it's an open standard and is supported by all the major players, like vs code, open code, and cursor.
in cursor, you have to enable beta nightly updates to make it work.
i will show you at the end.
so in this video, we'll see what exactly is agent or cloud skill, three type of skill content and their loading order, how they get loaded into the llm context.
we'll see mcp versus skill, when to use what, benefits of skill, we'll write and use our own skill within cursor, and at the end, i will share all the resources with you.
so without any further ado, let's start.
what exactly is agent skill?
it is just a folder which contains instructions scripts and resources that agent can discover and use as needed.
this is how the structure of the skill looks like.
it contains one skill.md
file, which is required and bundle resources, which can be scripts, references and assets, we'll come to that in a minute.
let's see how a skill.md file looks like.
skill.md file looks like.
so skill.md file have two sections.
one is this section, which contains name and the description.
this section we call as front matter metadata.
in this section, we have to put in the name of the skill.
and in the description, we have to give a brief description of what the skill does and when to use it.
it is important to specify when to use this skill in the description, because this is only how agent will know when to use this skill.
now comes to the second part.
in this section, you will put all your instruction, whichever you want to add.
and this section, we call it as instructions.
now let's take the example of pdf processing skill.md file.
skill.md file.
and we'll see what are the three major type of skill content.
number one is skill.md
metadata, which is yaml front matter, which we just saw.
this is how it will look.
name pdf processing description, extract text and tables from pdf files, fail forms merge documents, use when working with pdfs.
sorry, it got cut off.
second skill.md instructions.
in this you are going to put in the section how you want your pdf to be processed.
you can add something like use pdf number to extract text.
you can add code samples, and at the end, you can also add for advanced form filling, see forms.md file.
and this is very important.
this forms.md is a third type of content, which we call resources and code.
so here in this file, you can add detailed form filling guide.
so whenever the agent come across any form in your pdf, it will use this guideline to fill that form.
also, you can add scripts here.
the important thing here is the code of your script will not go into the context of the llm.
your agent will run your code using bash and only give the output to the llm because skill works on a principle of progressive disclosure.
let's see what it is.
so there are three content types, which we just saw metadata instruction and resources.
so metadata will always be loaded at the startup and metadata is just name and the description.
so it will be around just hundred tokens coming to instruction part.
so whenever that skill is triggered, whenever in the description agent saw that okay this skill is required now, then only all the instruction of that skill.md
file will be loaded into the context and that will be roughly around 5k tokens.
now the level three comes where the resources come into picture.
it can be any forms.md file or any scripts or any other file, which you have referred in your skill.md file,
and it will be loaded as needed and effectively unlimited tokens you can use here.
so bundle files executed via bash without loading content into context.
so this is an important point.
now we'll see how this skill flow in action works for pdf processing.
so this is basically a system prompt and these are all the metadata of the skill sort of snippet from each skill appended to the system prompt.
now initial message from user will come and user will ask fill out this pdf based on what you know about me and user will give the pdf as attachment.
now claude will decide to trigger the pdf skill by reading it.
and again, claude will decide to follow the reference from skill.md file
to the forms.md file because it came across a form in your pdf file.
and if you see, there's a tool use written here.
so it is kind of using this forms.md file as a tool to use that as a guideline to fill the forms which is present in your pdf file.
now the natural question arises that tool and instruction is also a part of mcp.
then why do we need agent skills?
let's see mcp versus agent skills.
both of them have tools and instructions, but in case of skills, tools are considered as scripts and resources.
the major difference is, in case of mcp, everything, all tools plus all the metadata of each tool will be dumped into the context window at the start.
but in case of skill, it works on progressive disclosure.
that means you only pay for what you use.
and this is a very important distinction between mcp and skill.
one other thing is agent can do wide variety of tasks in one go using mcp.
because via mcp, agent can connect to wide variety of tools and can perform wide variety of tasks.
but in case of skill, it is focused on one workflow rather than trying to do everything.
so the primary use case of mcp is providing tool access to agents.
on the other hand, the primary objective of skill is teaching agent how to do a specific repeatable task.
now let's see benefits of agent skills.
number one, reliability.
because you have written your own scripts, agent is not writing that.
so there are very few errors and the results will be consistent.
first efficiency because there is a progressive disclosure which minimizes the token usage.
you're not dumping everything into the context of the llm at once.
you're doing it as the agent needed.
next is time saving because agent uses existing solutions instead of generating code from scratch portable because you can use the same agent skill which you have created once and you can use it with cursor, cloud code, open code, vs code, etc. whichever supports the agent skill standard at least for now.
version control because skills are just normal markdown files or scripts so that you can easily track them using git github.
now let's see how you can use agent skills with cursor.
skills are automatically loaded from these locations.
so in your project level also you can create .cursor as a
create .cursor as a folder.
inside that you need to create skills as a folder and then inside of that you need to create your individual skill.
if you want your skills to be available globally then you have to add your skills in home.cursor
in home.cursor directory in this format.
as you can see i have created .cursor
folder inside that i have created skills folder and inside that i have created my first skill which is eli 5 which means explain like i am 5.
let's see how skill.md
file looks like.
so the name of the skill is explanation eli 5.
description is explain any concept in a very simple intuitive language as if speaking to a 5 year old.
use this when the user asks for an explanation, includes the keyword eli 5 and wants a plain easy to understand answer.
so this is how i have described this skill like what this skill does and when to trigger this skill.
now let's come to the instruction part of the skill.md file.
the skill.md file.
i have added one heading here when to use.
activate the skill only when the user query contains eli 5.
so this eli 5 keyword is very important.
if this eli 5 word is present in the user query then only this skill will get triggered.
now how to respond?
explain the core idea in a simple words then note the word count.
this is important.
when providing the explanation run the helper script to append the word count and i have created the script in this folder eli 5 rewrite and in this i am just counting the words which is present in the answer and i am appending that at the end.
so the word count will be appended at the end of the answer.
so let's see this skill in action.
so i will create a new agent and i will ask how llms work.
explain like m5 and if i run this it will plan its next moves.
it should ideally read the skill.md file which
the skill.md file which it is doing and now it is running the script here and it is asking me permission to run it.
i will just give it and it is success and it is giving me the answer.
in a very simple terms you can see here and at the end it is giving me the word count.
so this is how a simple skill can work.
at the end i will give you all the resources.
in the description resources are best practices to create skill.
it is a very interesting read from the entropic.
second is also a blog from entropic real world agents with skill.
third one is a github repo which contains a lot of example skills, a lot of very useful skills actually.
and the fourth one is how to use agent skills with cursor and this is a blog from cursor.
so let me just quickly show you how you can add agent support in your cursor.
so you have to go into the cursor setting and let me just close this part and this part as well.
and inside of this setting you have to go into this beta here and here you need to click on this nightly updates.
you have to enable this.
once you do this you just go to this cursor and restart to update.
once you do that you will get this tab.
this tab is already there but in this tab you will see this section of skill and here if you can see i have eli 5 skill which is loaded here properly.
so that is all from my side.
i hope you found this video helpful.
thank you so much.
Loading video analysis...