Cursor Rules
Cursor Commands: Reusable Slash Workflows
Cursor commands are saved prompts you run from the slash menu. Each one captures a repeatable multi-step job, such as running the tests, fixing a failing CI check, or committing and opening a pull request, so you trigger it by name instead of retyping the instructions every time.
On this page
What are Cursor commands?
A command is a reusable prompt you invoke from the / menu. Where a rule is passive context the agent always carries, a command is an action you fire on demand. Good candidates are the multi-step chores you repeat: run the test suite and fix what breaks, update the changelog, commit and push, or open a pull request with a written summary.
- Rules shape how the agent works, always on in the background.
- Skills package how to do a kind of task; the agent loads them when relevant.
- Commands are jobs you start: a saved prompt run from the slash menu.
How do I create a Cursor command?
- 1Add a Markdown file under
.cursor/commands/in your repo (one file per command). - 2Name it for the verb you'll type:
run-tests.md,open-pr.md,fix-ci.md. - 3Write the prompt as clear instructions, including how you want the result reported back.
- 4Commit it so the whole team gets the same command in their slash menu.
Commit the current changes with a conventional-commit message. Push the branch and open a pull request. In the PR body, summarise what changed and why, and list how you verified it. Reply with only the PR link.
The most-skipped step is the response instruction. Ending a command with "reply with only the PR link" or "report the failing test and your fix" keeps the output tight and scannable instead of a wall of narration.
Commands vs rules vs skills: which do I use?
- Primitive
- Rule
- Trigger
- Always on (or by file glob)
- Use it for
- Conventions every prompt should respect
- Primitive
- Skill
- Trigger
- Agent decides, by description match
- Use it for
- A capability the agent should reach for when relevant
- Primitive
- Command
- Trigger
- You type it in the slash menu
- Use it for
- A repeatable job you start deliberately
- Primitive
- Sub-agent
- Trigger
- Spawned by another agent
- Use it for
- A role that works in parallel with its own context
| Primitive | Trigger | Use it for |
|---|---|---|
| Rule | Always on (or by file glob) | Conventions every prompt should respect |
| Skill | Agent decides, by description match | A capability the agent should reach for when relevant |
| Command | You type it in the slash menu | A repeatable job you start deliberately |
| Sub-agent | Spawned by another agent | A role that works in parallel with its own context |
Pick by who pulls the trigger and when.
Skill or rule: which is cheaper on context?
Skills and rules are both Markdown, so the choice between them is easy to get wrong. The real difference is when each one costs you context. A skill is invocable: you call it as a slash command, or the agent infers it's relevant and reaches for it, so it loads only when needed. A rule applies to every relevant prompt in its scope, which means it rides along every turn whether or not this prompt needs it.
- Format
- Skill
- Markdown
- Rule
- Markdown
- Fires when
- Skill
- Invoked: slash command, or agent infers relevance
- Rule
- Automatically, on every prompt in its scope
- Context cost
- Skill
- Loaded only when used
- Rule
- Spent every turn it's in scope
- Best for
- Skill
- Know-how needed some of the time
- Rule
- Conventions needed every time
| Skill | Rule | |
|---|---|---|
| Format | Markdown | Markdown |
| Fires when | Invoked: slash command, or agent infers relevance | Automatically, on every prompt in its scope |
| Context cost | Loaded only when used | Spent every turn it's in scope |
| Best for | Know-how needed some of the time | Conventions needed every time |
Same file format; different context bill.
Every rule in scope is paid for on every prompt, so a thick stack of rules makes the context window denser before the agent has read a single line of your code. Unless the information genuinely needs to be present every time, a skill is the more efficient home for it. Reserve rules for the conventions that truly apply to every relevant prompt.
One useful slash command strips the common low-quality patterns an agent tends to leave behind, the AI "slop" you'd otherwise flag by hand, so the diff is cleaner before a human reads it. A de-slop command like this is published in the public marketplace, so you can install it rather than write your own.
What is the Council command pattern?
A command can do more than run a single prompt: it can fan work out. The Council pattern is a command that spawns several sub-agents to study one question from different angles, then has a final agent synthesise their findings into one answer.
A /council command might launch ten sub-agents to each review a proposed design, then collect their notes and return a single ranked recommendation. You start one command; ten independent reads come back merged.
Frequently asked questions
Where are Cursor commands stored?
As Markdown files in a .cursor/commands/ directory in your repo, one file per command. Commit them so the whole team shares the same slash menu.
Can a command run other agents?
Yes. A command is just a prompt, so it can instruct the agent to spawn sub-agents and fan work out, as in the Council pattern, then synthesise the results.
Command or skill: which should I use?
Use a command for a job you start yourself from the slash menu. Use a skill for a capability you want the agent to reach for on its own when the task matches.
Why is a skill cheaper than a rule?
Both are Markdown, but a skill loads only when it's invoked or the agent infers it's relevant, while a rule is spent on every prompt in its scope. Too many rules make the context window denser from the start, so unless the information is needed every time, put it in a skill.
What does a de-slop command do?
It strips the common low-quality patterns an agent leaves behind before a human reviews the diff. One is published in the public marketplace, so you can install it instead of writing your own.
Sources & last verified
Cursor ships frequently. Facts verified against primary sources on June 25, 2026.