WEBVTT

00:00:00.079 --> 00:00:03.919
There also is one special instructions
file which you can add and that's

00:00:03.959 --> 00:00:07.359
an agents.md file. This is a file or a

00:00:07.379 --> 00:00:11.279
convention that's supported by other
coding agents, like Cursor as well.

00:00:11.939 --> 00:00:15.219
And the idea is the same.
You can put general instructions in here.

00:00:15.800 --> 00:00:19.419
Unlike the instruction file from earlier,
it's not restricted to

00:00:19.520 --> 00:00:23.500
specific files though. Instead,
agents.md will essentially always

00:00:23.579 --> 00:00:27.379
be loaded for all your prompts. Therefore,
you also don't wanna make it too

00:00:27.439 --> 00:00:31.199
complex because all the instructions you
put in there will always be

00:00:31.279 --> 00:00:33.200
loaded and will always consume tokens.

00:00:33.520 --> 00:00:37.459
But for example,
I could put the instruction ensure we

00:00:37.540 --> 00:00:41.359
rules in there to make sure
that our Python code is in line with the

00:00:41.420 --> 00:00:45.419
PEP8 Python styling rules, which
is what that is about, in case you

00:00:45.459 --> 00:00:49.279
don't know Python. This
is simply a style guide in the end

00:00:49.340 --> 00:00:51.119
again, you can make that more complex.

00:00:51.159 --> 00:00:53.560
Put anything in there
that should always be loaded.

00:00:53.619 --> 00:00:56.779
You just should keep in mind
that it will always be loaded.

00:00:56.819 --> 00:01:00.299
You can also put multiple agents.md files
in your

00:01:00.380 --> 00:01:03.799
code and for example,
have them in subfolders.

00:01:03.840 --> 00:01:07.639
So let's say in a source folder,
and then the

00:01:07.720 --> 00:01:11.699
instructions in there would only be loaded
if the agent works in

00:01:11.779 --> 00:01:15.439
a file in that subfolder. So
that allows you to set up

00:01:15.519 --> 00:01:18.339
subfolder specific instructions with help
of

00:01:18.479 --> 00:01:22.259
agents.md.
When working with GitHub Copilot,

00:01:22.319 --> 00:01:26.159
those Copilot instructions
which I showed you before, like this

00:01:26.319 --> 00:01:30.079
one, or agents.md or both. That
is totally up to

00:01:30.180 --> 00:01:33.939
you. The advantage of agents.md is
that it will also work with other coding

00:01:34.040 --> 00:01:38.039
assistants. The disadvantage is
that you don't have the fine-grain control

00:01:38.120 --> 00:01:41.959
you have with the Copilot instructions.
