Slash commands are skills now: how to write one

· 3 min read

A slash command is a prompt you start yourself: you type /review-pr 123 and the AI tool runs the instructions with 123 filled in. Each tool used to have its own file for this. Claude Code, Cursor and GitHub Copilot now also read skills, and a skill that only starts when you type its name does the same job in one format.

This guide shows how to write one, and how to move the command files you already have.

Commands and skills: what changed

Tool Command file Skills
Claude Code .claude/commands/<name>.md .claude/skills/<name>/SKILL.md also creates /<name>
Cursor .cursor/commands/<name>.md Reads .agents/skills, .cursor/skills and .claude/skills
GitHub Copilot .github/prompts/<name>.prompt.md Reads skills in VS Code; check its documentation for /

In Claude Code, command files keep working, and a skill wins when both have the same name. Behaviour changes quickly: check each tool’s documentation before you rely on the details.

Command or skill?

Write a skill people start with /name when… Let the agent load the skill by itself when…
You start it on purpose, with something to work on It is know-how for many tasks
It runs once and reports back The agent should notice when it applies

Either way it is one SKILL.md, so it can grow references/ and scripts/ when it needs them.

The fields that make it a command

---
name: review-pr
description: Review a pull request for bugs and missing tests. Use when the user types /review-pr with a number.
argument-hint: '[pr-number] [focus]'
disable-model-invocation: true
allowed-tools: Bash(gh pr diff:*), Read
---
  • disable-model-invocation: true: the agent never loads it by itself. It starts only from /review-pr.
  • argument-hint: shown while you type, so people know what goes after the name.
  • user-invocable: false does the opposite: it hides the skill from the / menu, for background knowledge. Do not set both, or nothing can start the skill.

In Skill Builder these are How it starts, Slash menu and Arguments hint in the skill’s details.

Arguments

Write $ARGUMENTS where the typed text belongs. Say what it is, give an example, and say what to do when it is missing:

## Arguments

`$ARGUMENTS` is the text typed after the command.

- **What it is:** the pull request number, then an optional area to focus on.
- **Example:** `123 security`
- **If it is empty:** ask for the pull request number.

The Arguments block writes this for you. Copilot prompt files name their inputs instead (${input:pr}); Skill Builder turns those into $ARGUMENTS when it imports them.

Gather context first

A command usually needs the same facts every time. List the files to read and commands to run. In Claude Code, a line such as !`gh pr diff $ARGUMENTS` runs before the skill starts and puts the output in its place, when Allowed tools permits that command (Bash(gh pr diff:*)). Other tools read the same lines as steps. The Gather context first block has a switch for this.

Say what it hands back

A command people run often should end the same way each time. Add an Output format (a summary, then findings, most serious first) or a Checklist of what must be true before it stops.

Move the commands you have

  1. In Skill Builder, import your repository with Connect AI, or create a skill from the Slash command templates.
  2. Each command file becomes a skill set to Only when I type /name, with the same text.
  3. Check the description says when to use it, then export Ready for your project.
  4. Delete the old command files once the skills work, so each name is defined once.

Next: How to write a SKILL.md, or build one in Skill Builder.