Cursor
Cursor skills and custom slash commands: .cursor/skills SKILL.md, .cursor/commands and /migrate-to-skills
How do I create my own slash command or skill in Cursor?
Create a folder in .cursor/skills/ (project) or ~/.cursor/skills/ (user) holding a SKILL.md file whose frontmatter has a name that matches the folder and a description. Type / in Agent chat and pick it, or let the agent apply it when the description fits. Add disable-model-invocation: true to make it run only when you call it, like a command. In Cursor 2.4 or later, /migrate-to-skills converts your existing slash commands and dynamic rules into skills.
Compare: Agent Skills (SKILL.md) in every AI coding agent →
Compare: custom slash commands in every AI coding agent →
Cursor settings change often
Get one email a week when a setting, flag or permission rule changes, checked against the vendor docs.
Where Cursor looks for skills
- Project: .cursor/skills/ and .agents/skills/. Each skill is a folder with a SKILL.md file inside.
- User (all your projects on this machine): ~/.cursor/skills/ and ~/.agents/skills/.
- For compatibility Cursor also loads .claude/skills/, .codex/skills/, ~/.claude/skills/ and ~/.codex/skills/, so skills written for Claude Code or Codex work without copying.
- Monorepos: a .cursor/skills/ or .agents/skills/ folder inside a subdirectory such as apps/web/ is found too, and its skills apply only to files under that directory.
- You can group skills in category folders, such as .cursor/skills/shipping/deploy-staging/SKILL.md. The skill name comes from the folder that holds SKILL.md.
Cloud Agents only get your ~/.cursor/skills/ folder if you turn on Sync Skills for Cloud Agents in Settings, under Agents. ~/.agents/skills/ and unsynced local skills are not copied to Cloud Agents, remote SSH sessions or self-hosted workers, so put skills a team needs in the repo.
SKILL.md frontmatter
- name (required): lowercase letters, numbers and hyphens. It must match the parent folder name.
- description (required): what the skill does and when to use it. The agent reads this to decide whether the skill is relevant.
- paths (optional): glob patterns that limit the skill to matching files, as a list or a comma-separated string. Without it the skill is available no matter which files are open. The older globs field still works as a fallback.
- disable-model-invocation (optional): when true, the skill is used only when you call it with /skill-name.
- icon and color (optional): the badge shown when you use the skill as a Custom Mode.
- metadata (optional): any extra key-value pairs.
.cursor/skills/react-component-patterns/SKILL.md
--- name: react-component-patterns description: Conventions for writing React components in this codebase. paths: - "**/*.tsx" - "packages/ui/**/*.ts" --- # React component patterns Use function components, colocate tests, and export one component per file.
A custom slash command that only runs when you call it
A command is a skill the agent should not pick on its own. Set disable-model-invocation: true, then type / in Agent chat and choose it. A skill you call by hand applies to that one message.
.cursor/skills/review/SKILL.md (run as /review)
--- name: review description: Review the current changes for bugs and missing tests. disable-model-invocation: true --- Review the current changes for bugs and missing tests. List problems in order of severity.
- Type / and the skill name, for example /review, to run it.
- Type @ and select the skill to attach it as context instead.
- To keep a skill on for the whole session, use it as a Custom Mode with Option+Enter on Mac or Alt+Enter on Windows.
- /create-skill runs a built-in guide that writes a new skill for you.
Old .cursor/commands files and /migrate-to-skills
Cursor 1.6 added custom slash commands as Markdown files in .cursor/commands/[command].md, run by typing / in the Agent input. Current Cursor docs describe commands only as something to convert into skills.
- Type /migrate-to-skills in Agent chat (Cursor 2.4 or later). This built-in skill finds eligible rules and commands and converts them.
- Converted: user-level and workspace-level slash commands, which keep their explicit invocation through disable-model-invocation: true, and dynamic rules (Apply Intelligently rules with alwaysApply false or unset and no globs).
- Not converted: rules with alwaysApply: true, rules with specific globs, and user rules, which are not stored as files.
- Review the generated skills in .cursor/skills/ before you delete the originals.
Scripts, references and assets
- scripts/: code the agent can run, such as scripts/deploy.sh <environment>.
- references/: longer documentation the agent loads only when needed.
- assets/: templates, images or data files.
- Keep SKILL.md short and move detail into these folders, because Cursor loads them progressively.
Rules, skills or commands: which to use
- Rules: short guidelines and constraints that Cursor adds to every matching conversation.
- Skills: longer, repeatable multi-step procedures that the agent loads when relevant or that you call with /skill-name.
- Commands: in current Cursor, a skill with disable-model-invocation: true.
To share a personal skill with your team, open Customize, then Skills, open the skill and choose Publish. It goes to your team's Default marketplace, where teammates can install it.
Built-in slash commands in Cursor CLI
The Cursor CLI (agent) has its own built-in commands. Its reference page does not describe custom commands. Some of the most used ones:
- /model [filter]: pick a model.
- /run-everything [on|off|status]: toggle Run Everything. /auto-run is an alias.
- /plan, /ask and /debug: switch to Plan, Ask (read-only) or Debug mode.
- /mcp [list|list-tools]: manage MCP servers. /plugin manages plugins and marketplaces.
- /sandbox: configure sandbox mode and network access.
- /summarize (alias /compress), /resume, /fork and /rewind: manage the conversation.
- /help [command]: help for any command.
Get Cursor settings changes by email
When a setting, flag or permission rule in this guide changes, it goes in the weekly AgentAtlas update, checked against the vendor docs. One email a week.
Sources
More on Cursor
More Cursor guides
- How to allow Cursor to run all commands: Run Everything, allowlist and sandbox
- Cursor Privacy Mode: telemetry, training and data retention
- Add MCP servers to Cursor with mcp.json
- Keep files out of Cursor with .cursorignore
- Cursor CLI: install, headless mode, permissions and CI
- Cursor hooks: hooks.json, beforeShellExecution, afterFileEdit and exit codes
- Cursor sandbox: sandbox.json, network allowlist and run modes
- Cursor settings: settings.json, Cursor Settings and the ~/.cursor config files
- Cursor browser agent: @browser, browser automation and approval modes
- Cursor subagents: .cursor/agents, frontmatter, built-in Explore and Browser
- Cursor telemetry and OpenTelemetry export (Privacy Mode, OTLP, Analytics API)
- Cursor rules setup: project, user and Team Rules, .mdc frontmatter, globs and AGENTS.md
Other guides
Reviewed Oct 20, 2026. Settings change often; the linked vendor docs are the source of truth.