# Commands

A **command** is a slash command the user invokes directly (e.g. `/flush-toilet`, `/review`, `/fix-pr`). Commands are the fastest way to give your team a named shortcut: deterministic, discoverable, and cheap because they only load when explicitly run.

## When to use a command vs a skill

* **Command** — the user knows what they want. They'd like a short name that produces a predictable behavior. Example: `/review` always runs the same review flow on the current branch.
* **Skill** — the user describes a task in their own words and the model chooses what to load. Example: "Help me refactor this view into a class-based admin." The `django-admin` skill might load automatically.

A command is "I know what I want, give me a shortcut." A skill is "Here's what I'm trying to do, figure out how."

## Directory layout

A command is a directory with a markdown entry point and frontmatter:

```
flush-toilet/
└── COMMAND.md
```

```markdown
---
name: flush-toilet
description: Prints ASCII art of a flushing toilet.
---

Print this ASCII art verbatim:

```

***

\| | | \~ | |\_\_\_\_\_|

```
```

Commands typically stay small — most are under 1k tokens. Heavy behavior belongs in a skill the command can reference.

## Arguments

Commands can take arguments from the user. The client parses `/command-name <args>` and passes the rest of the line into the command's prompt as a variable (Claude Code uses `$ARGUMENTS`, Cursor and GitHub Copilot have analogous mechanisms).

A command that accepts a branch name might look like:

```markdown
---
name: review
description: Review the named branch for bugs, quality, and architecture issues.
---

Run a senior-architect review of branch `$ARGUMENTS`. Check:
1. Correctness bugs
2. Performance regressions
3. ...
```

## Creating a command

Same as any asset: home-page assistant, **Create → Command**, or `sx add ~/.claude/commands/flush-toilet`.

## Client compatibility

Commands are first-class in Claude Code (as slash commands under `.claude/commands/`), Cursor, GitHub Copilot, Gemini CLI, Cline (as workflows), Kiro, and Codex. Each client renders commands in its own picker or slash menu.

## Discoverability

Commands show up in the client's slash menu on install. The description field is what the user sees when typing `/`; write it as a command-line helper would — short, in imperative form, says what you get.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sleuth.io/sleuth-skills/manage/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
