creating-cursor-commands

creating-cursor-commands is a skill for Claude Code, Codex from pr-pm/prpm. It costs 24 tokens per session (2,961 once invoked), scanned A, original, MIT.

A guide for creating Cursor slash commands: Markdown files that run when a developer types a command such as `/review-code` in Cursor.

In plain words
What is it for?
It helps create, improve, convert, and validate Cursor commands stored in `.cursor/commands/`.
Why use it?
It prevents incorrectly formatted or unclear commands that an AI assistant cannot use reliably.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pr-pm/prpm/creating-cursor-commands
Any agent
npx skills add pr-pm/prpm --skill creating-cursor-commands
Clone the repo
git clone --depth 1 https://github.com/pr-pm/prpm

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for creating-cursor-commands

README.md
[![agentmods](https://agentmods.dev/badge/skills/pr-pm/prpm/creating-cursor-commands.svg)](https://agentmods.dev/skills/pr-pm/prpm/creating-cursor-commands)
Your own site
<a href="https://agentmods.dev/skills/pr-pm/prpm/creating-cursor-commands"><img src="https://agentmods.dev/badge/skills/pr-pm/prpm/creating-cursor-commands.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.02961
Opus 5 $0.00012 $0.01481
Sonnet 5 $0.00005 $0.00592
Haiku 4.5 $0.00002 $0.00296

Measured 4d ago against content hash a9ad30b155bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

creating-cursor-commands scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/creating-cursor-commands/SKILL.md · 544 lines

How it starts

The opening of the file, as written. The whole thing — 544 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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
}

Read the full file on GitHub · 544 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 544 lines · 24 tokens per session scan A a9ad30b155bb

Subscribe to this mod's changes

creating-cursor-commands is a skill published in the GitHub repository pr-pm/prpm (120 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 2,961 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.