Skip to main content

Cursor Commands – Automation and Day-to-Day Productivity

· 6 min read
Bruno Carneiro
Fundador da @TautornTech

While Rules define standards and Agents execute complex tasks, Commands are reusable workflows that standardize common processes. They transform repetitive tasks into simple commands with the / prefix.

What are Cursor Commands?​

Commands are Markdown files that define reusable workflows. By typing / in the chat, you see all available commands and can execute them with additional context.

They are perfect for:

  • Standardized checklists: Code review, security audit
  • Development workflows: Feature setup, PR creation
  • Quality processes: Testing, validations
  • Onboarding: Environment configuration

Where are Commands Stored?​

Commands can be in three locations:

1. Project Commands​

Stored in .cursor/commands/ of the project. Project-specific and versioned with Git.

2. Global Commands​

Stored in ~/.cursor/commands/ in your home directory. Available across all projects.

3. Team Commands​

Created by admins in the Cursor Dashboard. Automatically available to all team members (Team and Enterprise plans).

Structure of a Command​

Commands are simple Markdown files:

.cursor/commands/
├── code-review.md
├── create-pr.md
├── security-audit.md
└── setup-feature.md

Basic Example​

# Code Review Checklist

## Overview
Complete checklist for code review ensuring quality, security, and maintainability.

## Review Categories

### Functionality
- [ ] Code does what it's supposed to do
- [ ] Edge cases are handled
- [ ] Appropriate error handling
- [ ] No obvious bugs

### Code Quality
- [ ] Code is readable and well-structured
- [ ] Functions are small and focused
- [ ] Variable names are descriptive
- [ ] No code duplication
- [ ] Follows project conventions

Practical Examples​

1. Code Review Checklist​

# Code Review Checklist

## Overview
Comprehensive checklist for code review.

## Categories

### Functionality
- [ ] Code works as expected
- [ ] Edge cases handled
- [ ] Adequate error handling
- [ ] No obvious bugs

### Quality
- [ ] Readable code
- [ ] Small and focused functions
- [ ] Descriptive names
- [ ] No duplication
- [ ] Follows project standards

### Security
- [ ] No obvious vulnerabilities
- [ ] Input validation
- [ ] Sensitive data protected
- [ ] No hardcoded secrets

Usage:

/code-review Review PR #123 focusing on security

2. Security Audit​

# Security Audit

## Overview
Security review to identify and fix vulnerabilities.

## Steps

1. **Dependency audit**
- Check for known vulnerabilities
- Update outdated packages
- Review third-party dependencies

2. **Code review**
- Check for common vulnerabilities
- Review authentication/authorization
- Audit data handling practices

3. **Infrastructure**
- Review environment variables
- Verify access controls
- Audit network security

## Checklist
- [ ] Dependencies updated and secure
- [ ] No hardcoded secrets
- [ ] Input validation implemented
- [ ] Secure authentication
- [ ] Authorization correctly configured

Usage:

/security-audit Focus on authentication and authorization

3. Setup New Feature​

# Setup New Feature

## Overview
Systematically set up a new feature from planning to implementation structure.

## Steps

1. **Define requirements**
- Clarify scope and objectives
- Identify user stories
- Plan technical approach

2. **Create feature branch**
- Branch from main/develop
- Configure local environment
- Set up dependencies

3. **Plan architecture**
- Design data models and APIs
- Plan UI components and flow
- Consider testing strategy

## Checklist
- [ ] Requirements documented
- [ ] User stories written
- [ ] Technical approach planned
- [ ] Feature branch created
- [ ] Development environment ready

Usage:

/setup-feature Authentication feature with OAuth

4. Create Pull Request​

# Create PR

## Overview
Create a well-structured pull request with proper description, labels, and reviewers.

## Steps

1. **Prepare branch**
- Ensure all changes are committed
- Push branch to remote
- Verify branch is up to date

2. **Write description**
- Summarize changes clearly
- Include context and motivation
- List breaking changes
- Add screenshots if UI changes

3. **Configure PR**
- Create PR with descriptive title
- Add appropriate labels
- Assign reviewers
- Link related issues

## Template
- [ ] Feature A
- [ ] Bug fix B
- [ ] Unit tests passing
- [ ] Manual testing complete

Usage:

/create-pr For authentication feature, include screenshots

Parameters and Context​

You can pass additional context to Commands:

/code-review Focus on performance and security of the /api/users endpoint

The Agent will receive the Command content plus the additional context you provided.

Team Commands​

For teams (Team and Enterprise plans), admins can create Commands in the dashboard that are automatically synced to all members:

  1. Access Team Content Dashboard
  2. Create a new Command
  3. Define:
    • Name: Command name (appears after /)
    • Description: Context about what it does
    • Content: Markdown with the workflow

Benefits:

  • Centralized management: Update once, everyone receives it
  • Standardization: Ensures consistent workflows
  • Easy sharing: No need to distribute files
  • Access control: Only admins can create/modify

Day-to-Day Benefits​

Standardization​

  • Everyone follows the same processes
  • Consistent checklists
  • Fewer oversights

Productivity​

  • Complex workflows in one command
  • Less time explaining processes
  • Automation of repetitive tasks

Quality​

  • Nothing is forgotten in reviews
  • Standardized security processes
  • Faster onboarding

Collaboration​

  • Team aligned on processes
  • Easy knowledge sharing
  • Living documentation

Combining Commands with Rules​

Commands work even better when combined with Rules:

  1. Rules define standards and conventions
  2. Commands execute workflows using those standards

Example:

  • Rule defines: "Always use TypeScript, follow naming standards"
  • Command /setup-feature uses those Rules when creating a new feature

Best Practices​

✅ DO​

  • Be specific: Clear and actionable instructions
  • Use checklists: Makes it easier to follow the process
  • Include context: Explain the "why"
  • Keep updated: Review and improve regularly
  • Share: Put in Git for the team

❌ DON'T​

  • Don't be vague: Avoid generic instructions
  • Don't overdo it: Very long Commands are less useful
  • Don't duplicate: Reuse when possible
  • Don't ignore feedback: Improve based on usage

Conclusion​

Cursor Commands are a powerful way to standardize workflows and increase productivity. They transform complex processes into simple commands, ensuring consistency and quality.

By creating well-structured Commands, you:

  • Standardize team processes
  • Increase productivity
  • Improve quality
  • Facilitate collaboration

In the next article, we'll see a complete case study of how we used Agents, Rules, and Commands together to create an automated documentation system.

Next Steps​

  • Create your first Command for a common process
  • Explore Team Commands if you have a Team/Enterprise plan
  • Combine Commands with Rules for maximum efficiency
  • Read the complete Case Study
tip

Deepen Your Knowledge​

Want to learn more about Cursor? Explore our complete documentation trail:


Related Articles:

References: