Commands
Commands are skills invoked explicitly by the user via /name, never triggered automatically by the model. Use them for workflows that should only run when you choose — deployments, releases, or any operation where accidental auto-invocation would be disruptive.
Regular skills description field is used by agents to trigger the skill automatically. Commands suppress that automatic invocation:
| Auto-invoked by model | User-invoked via /name | |
|---|---|---|
| Skill | ✅ when description matches | ✅ |
| Command | ❌ | ✅ |
Two mechanisms
Section titled “Two mechanisms”1. commands/ folder (legacy, wider support)
Section titled “1. commands/ folder (legacy, wider support)”Place a markdown file in .claude/commands/ (project) or ~/.claude/commands/ (user):
.claude/commands/ deploy.md → /deploy release.md → /releaseThe file content is the skill body. Frontmatter (description, allowed-tools) is supported. The model never auto-invokes these — they are user-only by design.
allowed-tools pre-approves the tools it lists so the command’s turn runs without permission prompts. It does not restrict the command to those tools: everything else stays callable, subject to your normal permission settings. To take a tool away, use disallowed-tools.
Claude Code marks commands/ as deprecated in favor of SKILL.md files, but it still works and is the more portable choice today (see harness compatibility below).
2. disable-model-invocation: true (modern, not universal)
Section titled “2. disable-model-invocation: true (modern, not universal)”Add the frontmatter field to any SKILL.md:
---name: deploydescription: Deploy the application to productiondisable-model-invocation: true---This prevents automatic loading while keeping the skill accessible via /deploy. It is the recommended approach in Claude Code’s own documentation, but not all harnesses support it.
Harness compatibility
Section titled “Harness compatibility”Standalone skills
Section titled “Standalone skills”| Harness | disable-model-invocation in SKILL.md | commands/ folder |
|---|---|---|
| Claude Code | ✅ | ✅ (deprecated, still works) |
| Cursor | ⚠️ bug: hides plugin-delivered skills from / menu (Mar 2026) | — |
| Windsurf | ✅ | — |
| GitHub Copilot CLI | ❌ (skills) | ✅ (reads .claude/commands/) |
| Codex CLI | ❌ (uses agents/openai.yaml instead) | — |
| Gemini CLI | ❌ | — |
Plugin commands
Section titled “Plugin commands”Inside a universal plugin, a commands/ subfolder creates user-invocable slash commands across harnesses:
| Component | Claude Code | Cursor | Codex |
|---|---|---|---|
skills/ | ✅ native | ✅ native | ✅ native |
commands/ | ✅ native | ✅ native | silently ignored |
agents/ | ✅ native | ✅ native | silently ignored |
rules/ | silently ignored | ✅ native | silently ignored |
Because Cursor supports commands/ natively in plugins, and the disable-model-invocation: true frontmatter field has a known bug in Cursor (plugin-delivered skills with this flag are hidden from the / menu), the commands/ folder is the safer choice for cross-harness plugin commands targeting both Claude Code and Cursor.
Recommendation: Use commands/ inside your plugin for user-only workflows. When the Cursor bug is resolved and disable-model-invocation: true has stable cross-harness support, you can migrate commands to skills/ with the frontmatter flag.
Related
Section titled “Related”- Agent Configuration — the full picture of skills, commands, and rules
- Universal Plugin governance — plugin component table and distribution
- Claude Code skills docs —
disable-model-invocationreference