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

Other guides

How to allow Claude Code to run all commands: permission modes, allow rules and skip permissionsClaude Code permissions: allow, ask and deny rules, rule syntax and allowed toolsCodex CLI: approval and sandbox modesGemini CLI: YOLO mode, auto_edit and allowing specific shell commandsClaude Code telemetry and data retention: what is sent and how to turn it offGemini CLI: turn off usage statistics and telemetryCLAUDE.md: where it goes, how it loads, and how it works with AGENTS.mdClaude Code hooks: all events, exit codes, PreToolUse allow/deny JSON and examplesClaude Code subagents: create one, limit its tools, and call itConfigure Codex with config.toml: Configure Gemini CLI with settings.json: Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes): Claude Code custom slash commands and skills (SKILL.md): GitHub Copilot custom instructions: Adding MCP servers to GitHub Copilot: Claude Code settings.json: file locations, precedence, and key settingsClaude Code plugins and marketplaces: install, create, and shareGemini CLI extensions and custom commands: Configuring OpenCode with opencode.json: Cline Rules: workspace, global, and conditional rulesKiro steering files: .kiro/steering, inclusion modes, and AGENTS.mdZed agent: instruction files, MCP servers, tool permissions, and ACP agentsAider: CONVENTIONS.md, .aider.conf.yml and API keysJunie guidelines, MCP and the Action Allowlist: Amp AGENTS.md, settings.json and MCP: Configure Goose extensions, hints, recipes and permissions: Customize OpenHands with skills, AGENTS.md, setup.sh and MCP: Configure Factory Droid CLI: AGENTS.md, settings.json, autonomy, custom droids and MCPConfigure Qwen Code: settings.json, providers, QWEN.md, MCP and approval modesClaude Code headless mode: claude -p, --output-format json, --bare and CI flagsClaude Code statusline: custom status bar in settings.json with context %, cost and git branchClaude Code /model: switch models, aliasesClaude Code /cost and /usage: check token spend, usage limits and reduce costsClaude Code VS Code extension: install, shortcuts, settings and /ideCodex AGENTS.md: global, project and override instruction files explainedCodex MCP servers: codex mcp add and [mcp_servers] in config.tomlCodex sandbox modes: read-only, workspace-write, danger-full-access and network accesscodex exec: run Codex non-interactively in scripts and CI with JSON outputCodex skills: create SKILL.md, skill folder locations and $skill invocationGEMINI.md in Gemini CLI: context file locations, imports and /memoryGemini CLI MCP servers: gemini mcp add and mcpServers in settings.jsonGemini CLI custom slash commands: TOML files, {{args}}, !{shell} and @{file}Gemini CLI headless mode: gemini -p, JSON output and exit codes for scripts and CIGemini CLI sandbox: enable Docker, Podman, macOS Seatbelt or gVisorcopilot-setup-steps.yml: set up the GitHub Copilot cloudGitHub Copilot CLI permissions: --allow-tool, --deny-tool, --allow-all-tools and trusted directoriesGitHub Copilot custom agents: .github/agents/*.agent.md profiles, tools and frontmatterGitHub Copilot code review settings: automatic PR reviews, rulesets, effort level and approvalsOpenCode MCP Server Setup: Local and Remote Servers in opencode.jsonOpenCode Permissions: Allow, Ask or Deny Bash, Edit and WebfetchOpenCode Custom Agents and Subagents: Markdown Files, Modes and @ MentionsCline MCP Setup: cline_mcp_settings.json for Local and Remote ServersCline Auto Approve and YOLO Mode: Run Commands and Edits Without PromptsCline Skills: SKILL.md Location, Format and Slash Command UseAmp MCP Setup: amp mcp add, amp.mcpServers and Workspace ApprovalAmp AGENTS.md: File Locations, @ Mentions and Glob-Scoped GuidanceAmp Skills: SKILL.md Folders, amp skill add and Search OrderKiro MCP Setup: .kiro/settings/mcp.json, autoApprove and OAuthKiro Hooks: .kiro/hooks JSON, PreToolUse, PostFileSave and StopKiro Permissions: permissions.yaml Allow, Ask and Deny RulesFactory Droid MCP Setup: droid mcp add, mcp.json Locations and /mcpFactory Droid Hooks: hooks.json, PreToolUse Matchers and Exit CodesFactory Droid Custom Droids (Subagents): .factory/droids Markdown FilesJunie MCP Setup: .junie/mcp/mcp.json for CLI and /mcp CommandJunie Brave Mode and Action Allowlist: Auto-Approve Commands in Junie CLIJunie Custom Slash Commands: .junie/commands Markdown Files and Argumentsgoose .goosehints and AGENTS.md: Global and Project Instructionsgoose Permission Modes: GOOSE_MODE auto, approve, smart_approve and chatgoose Recipes: recipe.yaml Format, Parameters and goose run --recipeZed Agent Tool Permissions: Auto-Approve Terminal Commands with tool_permissionsUse Claude, Codex and Gemini CLI in Zed: External Agents and agent_serversZed with Ollama, LM Studio and llama.cpp: Local Model Setup and Context LengthMCP 2026-07-28 Migration Guide: Stateless Protocol, No Sessions, server/discover, MRTR, and SDK v2 UpgradeSubagents and Custom Agents Compared: Claude Code vs Codex vs Cursor vs Gemini CLI vs GitHub CopilotAllow all commands in any AI coding agent: Cursor, Claude Code, Codex, Gemini CLI, Copilot CLI and 7 moreAdd an MCP server to any AI coding agent: Claude Code, Cursor, Codex, Gemini CLI, VS Code and 8 moreSettings file locations for every AI coding agent: Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Qwen Code, Amp and Factory DroidRules and instruction files in every AI coding agent: .cursor/rules, CLAUDE.md, AGENTS.md, GEMINI.md, Copilot instructions and moreGemini CLI hooks: settings.json, BeforeTool, AfterTool, exit codes and /hooksGitHub Copilot hooks: .github/hooks/*.json for Copilot CLI and the cloud agentHooks in every AI coding agent: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Kiro and Factory DroidAgent Skills (SKILL.md) in every AI coding agent: Claude Code, Codex, Cline, Amp and OpenHandsHow to deploy a remote MCP server (Streamable HTTP): Cloudflare Workers, Vercel, Railway and moreHeadless mode in every AI coding agent: claude -p, codex exec, gemini -p, Cursor agent -p and copilot -p for scripts and CIClaude Code sandbox: /sandbox, sandbox.enabled, allowedDomains, excludedCommands and strict modeSandbox modes in every AI coding agent: Claude Code, Cursor, Codex and Gemini CLI comparedCustom slash commands in every AI coding agent: file locations, arguments and examplesMigrate from Gemini CLI to Antigravity CLI (2026): Config, MCP, Skills, FlagsRun GitHub Copilot CLI with copilot -p in scripts and CI (2026): Agent Loops 2026: Ralph Loop, /loop, /goal and Headless Loops for AI Coding AgentsWeb Scraping MCP Servers Compared (2026): Bright Data, Firecrawl, Apify, Tavily and BrowserbaseCodex hooks: hooks.json, PreToolUse allow/deny, exit code 2 and config.toml [hooks]

Reviewed Oct 20, 2026. Settings change often; the linked vendor docs are the source of truth.