Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

creating-cursor-commands

БесплатноБез исполняемых скриптовНе проверен

Expert guidance for creating effective Cursor slash commands with best practices, format requirements, and schema validation

pr-pmот pr-pm★ 125 звёзд на GitHub19 установок в других каталогах

Об этом скилле

Creating Cursor Slash Commands

You are an expert at creating effective Cursor slash commands (.cursor/commands/*.md) that provide clear, actionable instructions for AI assistants.

When to Use This Skill

Use when:

  • User wants to create a new Cursor slash command
  • User asks to improve existing slash commands
  • User needs help understanding Cursor command format
  • User wants to convert prompts to slash commands
  • User asks about Cursor command validation

Don't use for:

  • Cursor rules (.cursor/rules/) - use creating-cursor-rules-skill instead
  • Claude Code slash commands - those use different format with frontmatter
  • Complex multi-step workflows - those should be Cursor rules

Quick Reference

Aspect Requirement
File Location .cursor/commands/*.md
Format Plain Markdown (NO frontmatter)
Filename Descriptive kebab-case (e.g., review-code.md, generate-tests.md)
Invocation /command-name in chat
Content Clear, actionable instructions with examples

Format Requirements

Critical Rules

  1. NO frontmatter allowed - Cursor commands are plain Markdown only
  2. Descriptive filenames - The filename becomes the command name
  3. Clear instructions - Tell AI exactly what to do
  4. Include examples - Show desired output format

File Naming

Good filenames:

  • review-code.md → /review-code
  • generate-tests.md → /generate-tests
  • explain-code.md → /explain-code
  • optimize-performance.md → /optimize-performance

Bad filenames:

  • rc.md - Too cryptic
  • review_code.md - Use hyphens, not underscores
  • ReviewCode.md - Use lowercase
  • review-code-thoroughly-with-security-checks.md - Too verbose

Schema Validation

Schema Location

https://github.com/pr-pm/prpm/blob/main/packages/converters/schemas/cursor-command.schema.json

Schema Structure

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://prpm.dev/schemas/cursor-command.schema.json",
  "title": "Cursor Command Format",
  "description": "JSON Schema for Cursor commands (slash commands) - plain Markdown files in .cursor/commands/",
  "type": "object",
  "required": ["content"],
  "properties": {
    "content": {
      "type": "string",
      "description": "Plain Markdown content describing what the command should do. No frontmatter supported."
    }
  },
  "additionalProperties": false
}

Key Validations

  1. Must be plain Markdown - No YAML frontmatter
  2. Content-only structure - Single content field
  3. No metadata - Unlike Cursor rules, commands have no configuration

Common Mistakes

Mistake Why It's Wrong How to Fix
Adding frontmatter Cursor commands don't support frontmatter Remove --- blocks entirely
Using default exports syntax Commands are not code files Write plain Markdown instructions
Vague instructions AI needs specific guidance Add concrete examples and steps
Too many tasks Commands should be focused Create separate commands or use rules
Missing context AI needs to know what to do Include expected output format

Best Practices

1. Be Specific and Actionable

❌ Bad - Vague:

# Review Code

Review the code for issues.

✅ Good - Specific:

# Review Code

Review the selected code for:
- Code quality and best practices
- Potential bugs or edge cases
- Performance improvements
- Security vulnerabilities

Provide specific, actionable feedback with code examples where appropriate.

2. Include Expected Output Format

❌ Bad - No guidance:

# Generate Tests

Generate tests for this code.

✅ Good - Clear format:

# Generate Tests

Generate comprehensive unit tests for the selected code.

Include:
- Happy path test cases
- Edge cases and error handling
- Mock external dependencies
- Follow existing test patterns in the project

Use the testing framework already configured in the project.

3. Provide Step-by-Step Instructions

✅ Good - Structured approach:

# Explain Code

Provide a clear explanation of what the selected code does.

Include:
- High-level purpose and goals
- Step-by-step breakdown of logic
- Any non-obvious behavior or edge cases
- Dependencies and side effects
- How it fits into the larger codebase

4. Reference Project Context

✅ Good - Context-aware:

# Add Component

Create a new React component following our project conventions.

Structure:
- Functional component with TypeScript
- Props interface defined separately
- Export as named export (not default)
- Co-locate styles if needed
- Follow existing component patterns in components/ directory

Use the same testing approach as existing components.

5. Focus on One Task

Each command should do ONE thing well.

❌ Bad - Too broad:

# Full St
Полный SKILL.md на GitHub

Установить creating-cursor-commands в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл creating-cursor-commands?

Expert guidance for creating effective Cursor slash commands with best practices, format requirements, and schema validation

Как установить скилл creating-cursor-commands?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл creating-cursor-commands запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить creating-cursor-commands с