Now, besides these different agent types, there also are a couple
of other things you can configure here if you click on this gear
icon. For example, there is this prompt files feature,
and the idea behind the prompt file feature is that you might have certain
prompts that you run over and over again.
For example, let's say we want to analyze our code
use all common best practices. So we could have a prompt like this,
our code in a certain file and check if we're using common Python best
if we're violating any Python rules or patterns.
And of course, this could also be a more complex prompt.
Now, chances are that if you're working in a more complex
prompts like this over and over again, which of course is annoying.
That's the idea behind prompt files.
You can take that prompt, create a prompt file, and you can also
simply do this through a command, configure prompt files or
new prompt file, and then choose whether you want to store
data so that it works across multiple projects or in your local GitHub
prompts folder in this project to have a prompt file for this project.
And I'll use that, and I'll name it analyze
code. If we now hit enter, we end up in a
markdown file, and in here, we put our prompt.
Now, you can give this prompt file a name,
metadata field here, and also description.
You can choose for which agent type it will apply,
the agent mode, the ask mode, the edit mode, or you can use your custom
agents. Interestingly, plan is listed as a custom agent here,
but my research agent is also here, and I want to use the ask agent
indeed. And then of course, I don't wanna hard code
a reference like this in here, but instead, you can use
variables with curly braces and then, for example, specify
file as a variable. The official documentation lists all the
options you have for setting up such a prompt file,
can specify, and you'll find a link to
this lecture, of course. Now, with such a prompt file defined,
you can go to your agent chat and then type a forward
slash. This brings up a list of commands you can
to these commands later too. But here, you'll also find this
analyze code command, which is this prompt file.
Now, I'll just also specify my main.py file
input like this and switch to ask mode.
If I now hit enter, this prompt, which is defined in the prompt
file, will be executed on this file here, and
that, of course, is there for a very useful way of defining
reusable prompts or instructions, which you may need in different
places or at different times in your project.