Skip to content

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 modelUser-invoked via /name
Skill✅ when description matches
Command

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 → /release

The 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: deploy
description: Deploy the application to production
disable-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.

Harnessdisable-model-invocation in SKILL.mdcommands/ 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

Inside a universal plugin, a commands/ subfolder creates user-invocable slash commands across harnesses:

ComponentClaude CodeCursorCodex
skills/✅ native✅ native✅ native
commands/✅ native✅ nativesilently ignored
agents/✅ native✅ nativesilently ignored
rules/silently ignored✅ nativesilently 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.