Besides rules and commands, Cursor has two other features that can be
quite useful. We can take a look at them in the Cursor
settings. Here under Rules, Memories, and
Commands, we can see that besides the rules which you
already saw, we, for example, also have memories.
Now, memories are a special feature offered by
Cursor which must be turned on which allows Cursor to
automatically detect certain preferences you might
have, which it then stores as memories.
So if you ask for something over and over again, if you have
specific instructions you repeat in different chats, chances are that
Cursor at some point will pick it up and store it as a memory, which
then essentially works just like a rule, but it's a rule
automatically created by Cursor, you could say.
So that's not something you have to actively do.
It's just something Cursor will bring up from time to time.
Besides that, we also have commands, though.
And just like rules, you can add commands to your project
overall user across multiple projects.
Here, I'll add one to the project and I'll name it
Smart Docs. The name is up to you, but I named this
Smart Docs because this command should actually
get Cursor to use the Context7 MCP to
find documentation for some technology it might be working with.
Now a command is still just some natural language you
write. So here, I wrote for the received instruction,
explore some documentation to learn how to correctly use a certain feature or
technology. And then I have this Use Context7 clause
should get it to use this Context7 MCP I installed before.
With this command saved, I can go
into agent mode or also in the editor
and open a new agent there. It doesn't matter.
Whenever I have a new instruction, like for example, in to-do list change the
animation to just fade in, fade out with this running list being
too, instead of typing Use Context7 here,
I can use a forward slash. Thereby default is a agent review
rule provided by Cursor which can be used for reviewing your code.
Here I'll use my Smart Docs command.
So instead of typing Use Context7, I'll just use Smart Docs Boom and
that should then get Cursor to use that MCP to take a look
at the documentation and learn how it works.
And you can set up all kinds of commands, including commands that do security
checks or evaluate the code for a certain quality
criteria you might have or whatever you need.
So that's a nice way of wrapping instructions you might be repeating over
and over again into easy-to-use commands.
Here I'll undo that, though.