# Cursor Commands vs Rules Files

> A command in Cursor is a markdown prompt you trigger with /. A rules file is always-on or glob-scoped context the model reads on every turn. When each one is the right tool.

Canonical: https://www.agentickit.co/compare/cursor-commands-vs-rules
Last updated: 2026-11-18

A command in Cursor (.cursor/commands/*.md) is a prompt you type with / and run on demand. A rules file (.cursor/rules/*.mdc) is context the model reads automatically, either always or when a glob matches, without you asking. Commands are something you do; rules are something the model already knows. Last updated 2026-10-26 by Rakshit Yadav.



## Verdict
They don't compete for the same job. A rules file sets standing context the model reads on every matching turn, with no action from you. A command is a one-off job you kick off by typing its name. The question isn't "command or rule" so much as "should this run automatically, or only when I ask."

## Commands vs rules at a glance
<table><thead><tr><th></th><th>Command</th><th>Rules file</th></tr></thead><tbody><tr><td>**Trigger**</td><td>You type `/name`</td><td>Always, or when a glob matches the file being touched</td></tr><tr><td>**Folder**</td><td>`.cursor/commands/*.md`</td><td>`.cursor/rules/*.mdc`</td></tr><tr><td>**Contains**</td><td>A sequence of steps for a job</td><td>Standing facts and bans the model should never forget</td></tr><tr><td>**Runs how often**</td><td>Once, when invoked</td><td>On every turn it applies to, forever, until you edit it</td></tr><tr><td>**Example**</td><td>[/ship](https://www.agentickit.co/commands/ship): run checks, then commit</td><td>"Never commit directly to main" or "use the tenant from the session, not from params"</td></tr></tbody></table>

## Why this pairing shows up in search
“Commands in Cursor” is a broad query that also pulls in people comparing commands against the other three config primitives: rules, skills, and MCP servers. We already cover [commands vs skills](https://www.agentickit.co/compare/cursor-skills-vs-commands) and [commands vs hooks](https://www.agentickit.co/compare/cursor-commands-vs-hooks); rules was the missing edge of that matrix, so if you searched “cursor command vs rule” and landed here, this is the piece those other pages didn't spell out directly.

## Use a command when
- The job has steps you'd otherwise retype every time: audit, review, deploy checklist.
- You want to choose the moment it runs, not have it fire on every matching file.
- The output is an artifact for that session (a PR, a report, a commit), not a standing rule for future sessions.

## Use a rules file when
- Breaking the rule would be bad even once, so it can't wait for you to remember to ask.
- It's short: a ban, a convention, a fact about the codebase (which ORM, which test runner, which env var holds the tenant).
- It should scope to a path, like a rule for `app/api/**` that never fires on marketing pages.

## The failure mode in both directions
Put a long playbook in a rules file and it loads on every turn whether or not the task needs it, burning context and diluting the parts that matter. Put a hard ban in a command instead of a rule and it only applies on the turns you remember to type `/the-command` — which is exactly when a careless edit slips through on an ordinary turn. If the standard is long, it probably belongs in a skill the agent loads on demand rather than either of these; see [Rules vs Skills vs Commands](https://www.agentickit.co/compare/cursor-rules-vs-skills) for that split.



## FAQ

### What is the difference between a Cursor command and a rules file?
A command is a markdown prompt in .cursor/commands that runs only when you type /name. A rules file in .cursor/rules loads automatically, either always or when a glob matches, with no action from you.

### Can a command read a rules file?
Rules load independently of commands. A command's prompt can reference the same conventions a rule states, but the rule itself fires on its own schedule (always, or by glob) regardless of which command you run.

### Should I turn my long command into a rule so I don't forget to run it?
Only if it's truly a standing constraint. If it's a multi-step job (run tests, then lint, then commit), keep it a command — rules aren't built to execute steps, only to supply context.

### Where do commands and rules live in a Cursor project?
Commands in .cursor/commands/*.md, rules in .cursor/rules/*.mdc.

## Related
- [Cursor Commands](https://www.agentickit.co/commands)
- [Rules File Grader](https://www.agentickit.co/tools/rules-grader)
- [Cursor Rules vs Skills vs Commands](https://www.agentickit.co/compare/cursor-rules-vs-skills)
- [Cursor Skills vs Commands](https://www.agentickit.co/compare/cursor-skills-vs-commands)
- [Cursor Commands vs Hooks](https://www.agentickit.co/compare/cursor-commands-vs-hooks)
- [Cursor rules for SaaS founders](https://www.agentickit.co/blog/cursor-rules-saas-founders)
- [Cursor Commands vs Claude Code Commands: Which to Standardize On](https://www.agentickit.co/compare/cursor-commands-vs-claude-code-commands)
