β Featured by Cursor
A curated collection of Cursor slash-command prompts that give your team reusable, version-controlled AI workflows directly inside the Cursor IDE.
π Also check out Cursor Hooks - that runs after every file edit
Cursor Commands are reusable AI prompts saved as Markdown files in
.cursor/commands/. When you type / in Cursor's chat input, the IDE lists
every command from your project and your global library so you can insert the
prompt instantly. They act like AI-driven shortcuts that automate repetitive
tasks, reinforce team standards, and keep feedback consistent.
- π Quick access: Type
/to surface every command without leaving your flow - π Reusable: Standardize prompts for common tasks across the whole team
- π₯ Shareable: Store commands in git so they ship with your repository
- π― Focused: Each command targets a specific workflow with clear structure
- π Customizable: Edit or extend the Markdown files to match your processes
Commands can live in two places:
- Project commands: Store Markdown files in
.cursor/commandsinside your repository - Global commands: Store personal commands in
~/.cursor/commandson your machine
Cursor automatically scans both directories when you type /, combines the
results, and inserts the selected command into the chat ready to run.
- Type
/in Cursor's AI chat or agent input - Select from the available commands
- Let the AI execute the prompt with the relevant project context
- Create a
.cursor/commandsdirectory in your project root - Add
.mdfiles with descriptive names (for example,code-review.md,run-all-tests-and-fix.md) - Write clear Markdown instructions describing what the command should accomplish
- Open Cursor, type
/, and choose your new command to execute it immediately
Example structure:
.cursor/
βββ commands/
βββ accessibility-audit.md
βββ add-documentation.md
βββ add-error-handling.md
βββ address-github-pr-comments.md
βββ clarify-task.md
βββ code-review.md
βββ create-pr.md
βββ deslop.md
βββ docker-logs.md
βββ database-migration.md
βββ debug-issue.md
βββ diagrams.md
βββ fix-compile-errors.md
βββ fix-git-issues.md
βββ generate-api-docs.md
βββ generate-pr-description.md
βββ git-commit.md
βββ git-push.md
βββ light-review-existing-diffs.md
βββ lint-fix.md
βββ lint-suite.md
βββ onboard-new-developer.md
βββ optimize-performance.md
βββ overview.md
βββ refactor-code.md
βββ roadmap.md
βββ run-all-tests-and-fix.md
βββ security-audit.md
βββ security-review.md
βββ setup-new-feature.md
βββ visualize.md
βββ write-unit-tests.md
lint-fix.mdβ Automatically analyze and fix linting issues in the current filelint-suite.mdβ Run project linters, apply fixes, and ensure codebase meets formatting requirementsrefactor-code.mdβ Improve code quality while maintaining functionalityoptimize-performance.mdβ Analyze and optimize code performanceadd-error-handling.mdβ Implement comprehensive error handling across the change setdeslop.mdβ Clean up AI-generated code by removing unnecessary complexity and verbosityclarify-task.mdβ Break down ambiguous tasks into clear, actionable steps
code-review.mdβ Comprehensive review checklist with structured steps and focus areasaddress-github-pr-comments.mdβ Process reviewer feedback and craft thoughtful responseslight-review-existing-diffs.mdβ Quick pass to highlight risky diffs and cleanup itemscreate-pr.mdβ Prepare a well-structured pull request with validation checklistgenerate-pr-description.mdβ Draft detailed pull-request descriptions automatically
run-all-tests-and-fix.mdβ Execute the full suite, triage failures, and confirm fixeswrite-unit-tests.mdβ Generate focused unit tests with proper coveragedebug-issue.mdβ Step-by-step debugging workflow for isolating defectsfix-compile-errors.mdβ Diagnose and resolve compilation failures quicklydocker-logs.mdβ Tail and monitor Docker container logs for debugging
add-documentation.mdβ Capture comprehensive product or code documentationgenerate-api-docs.mdβ Produce rich API documentation with schemas and examplesonboard-new-developer.mdβ Checklist-driven onboarding for new teammatessetup-new-feature.mdβ Plan requirements, branching, and architecture for new workvisualize.mdβ Generate visual diagrams and flowcharts from code or conceptsdiagrams.mdβ Generate Mermaid diagrams (flowcharts, sequence, class, ER, state diagrams)overview.mdβ Generate Mermaid diagrams for user journey and architecture flowroadmap.mdβ Analyze codebase and generate visual feature roadmaps
security-audit.mdβ Structured security checklist for code changessecurity-review.mdβ Broader vulnerability and risk assessment workflowaccessibility-audit.mdβ Review for WCAG compliance issuesdatabase-migration.mdβ Plan, create, and validate database migrations with rollbacksfix-git-issues.mdβ Resolve merge conflicts and repository problems safely
git-commit.mdβ Create well-structured commit messages with optional issue key linkinggit-push.mdβ Push changes to remote with pre-push checks
- Clone this repository or copy the
.cursor/commands/directory into your project - Open the project in Cursor IDE
- Type
/in the AI chat to browse available commands - Select a command and let Cursor execute the prompt with your code context
# Option 1: clone the repository
git clone https://github.com/hamzafer/cursor-commands.git
cd cursor-commands# Option 2: copy commands into an existing project
cp -r cursor-commands/.cursor /path/to/your/project/Alternatively, create the directory manually:
- Create
.cursor/commands/in your project root - Copy or author the Markdown command files you need
Use the existing files as templates or start from scratch:
touch .cursor/commands/my-custom-command.md# My Custom Command
Brief description of what this command does.
## Objective
Detailed explanation of the task and expected outcome.
## Requirements
- Specific requirements or constraints
- Coding standards to follow
- Expected formats or structures
## Output
Description of what the AI should produce.
Provide clear instructions for the AI to follow.# Generate API Documentation
Create comprehensive API documentation for the current code. Include:
- Endpoint descriptions and HTTP methods
- Request/response schemas with examples
- Authentication requirements
- Error codes and responses
- Rate limiting information
Format as OpenAPI/Swagger specification.# Security Audit
Perform a security audit of the current code. Check for:
- SQL injection vulnerabilities
- XSS attack vectors
- Authentication and authorization issues
- Input validation problems
- Sensitive data exposure
Provide specific remediation steps for each issue found.- Be specific: Describe the expected outcome and acceptance criteria
- Provide context: Reference project conventions, architecture, or standards
- Set boundaries: Clarify scope, assumptions, and tooling limits
- Include examples: Show expected formats or responses when helpful
- Stay focused: Keep each command targeted to a single, clear objective
- Review together: Treat command changes like code changes and review in PRs
- Use descriptive names: Make filenames reflect the command's purpose
- Open an issue for feedback or requests
- Refer to this README for the command index that ships with the prompts
This project is open source and available under the MIT License.