Now, there is yet another feature supported by
be skills, agent skills. You add them
by adding a skills subfolder in this GitHub
folder, and then per skill, you add a
subfolder in there, like for example, performance
review. The name is up to you. In that subfolder, you add
a skill.md file, like
this. And this skill.md file
is now again, in the end, a prompt file.
A file that will also smartly be loaded by the GitHub
Copilot agents to get extra instructions
or extra behaviors. But there is a difference compared to
Copilot instructions. Now first, every skill should
have a name, like performance
review, and a description. And the description is important
because the idea behind skills is that by default,
unlike the Copilot instructions or
agents.md, the full file with all
its instructions will not be loaded into prompts.
It will not be loaded into the context window.
Instead, only the name and description will be loaded, and then
the AI can decide whether it wants to get more
information about the skill or not, and it will decide that based on the
task you gave it. For example here, my description could be
thoroughly evaluates the performance of Python code, and with that,
I hopefully get the AI to load this skill
whenever I give it some prompt related to checking the
performance of Python code. And then in here, you could put your
detailed instructions on how to evaluate the performance of
Python code. So, we'll, here, for example, I added some
instructions with help of AI, to be honest.
And these are simply some instructions I want the AI to follow when it
checks code for performance issues or performance best practices.
But I don't always want to load this into every chat session I
have. That would all be tokens that are occupied in the context window
and which I'm paying for, and that's the idea behind skills.
This will all only be loaded if the AI determines that it needs that
skill, and it does determine it based on this
So here, I'll refine my description, say, check
for common mistakes and
ensure the code follows
well-known best practices. And I'll
also say thoroughly evaluate and fix the performance of Python
code. And with that, if I would say
improve
main.py performance, in theory, it should
load this skill. I'm not sure if it did here, to be very
honest. Doesn't list it here, but that's how skills work
behind the scenes to understand how to check for
performance issues and improve code in this case.
And you can, of course, set up skills for all kinds of skills
you want your agent to have. That can be best practices you
want it to follow, certain code patterns you want it to use,
internal rules you might have in your company.