creating-cursor-commands
БесплатноБез исполняемых скриптовНе проверенExpert guidance for creating effective Cursor slash commands with best practices, format requirements, and schema validation
Об этом скилле
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/) - usecreating-cursor-rules-skillinstead - 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
- NO frontmatter allowed - Cursor commands are plain Markdown only
- Descriptive filenames - The filename becomes the command name
- Clear instructions - Tell AI exactly what to do
- Include examples - Show desired output format
File Naming
Good filenames:
review-code.md→/review-codegenerate-tests.md→/generate-testsexplain-code.md→/explain-codeoptimize-performance.md→/optimize-performance
Bad filenames:
rc.md- Too crypticreview_code.md- Use hyphens, not underscoresReviewCode.md- Use lowercasereview-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
- Must be plain Markdown - No YAML frontmatter
- Content-only structure - Single
contentfield - 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic