# Slash commands

Type / in the chat to switch modes, run workflows, manage context, open settings and call your own commands and skills.

Slash commands switch modes, run workflows and open settings from the composer. Type `/` to open the command menu, keep typing to filter it, then press `Enter` to run a command.

The slash command menu with the Modes, Workflow, Context, Your commands and Actions groups.

## What you can do

- Open the menu with `/`, or with `Ctrl+Space` where your cursor is.
- Run a command from the menu, or type it in full and send it: both do the same thing.
- Write a command's name into your message without running it.
- See commands and skills as colored tags, in your draft and in the messages you send.
- List every command with `/help`, check the conversation's size with `/context`, and compact it with `/compact`.

## Open and use the menu

Type `/` at the start of your message or after a space. The menu lists every command, grouped by kind, with your installed skills after the groups. Keep typing to filter: the menu matches the command, its name and its description, so `/switch` finds **Switch model**.

| Key             | What it does                                                                                                          |
| --------------- | --------------------------------------------------------------------------------------------------------------------- |
| `Up` and `Down` | Move through the rows.                                                                                                |
| `Enter`         | Run the selected row, and only that row.                                                                              |
| `Tab`           | Write the selected name into your message, followed by a space. Nothing runs.                                         |
| `Escape`        | Close the menu and keep your text. Typing more keeps it closed.                                                       |
| `Ctrl+Space`    | Open the menu where your cursor is: on a half-typed name, even one you closed with `Escape`, or type the `/` for you. |

If you change a name you already picked or completed, the menu opens again on what is left.

## Typed or picked, the same result

A command you type in full and send with `Enter` runs exactly what its menu row runs:

- **Actions** such as `/clear` or `/model` run in the editor and send nothing to the AI. Add a value after the name: `/model` followed by a model name, or `/effort high`.
- **Modes** switch the chat mode, then send the rest of your message in that mode: `/plan add a pricing page`.
- **Workflows**, **Context** and **Your commands** are sent with your message, and the AI follows the command.
- A skill name selects that skill and sends the rest of your message with it.

> [!NOTE]
>
> **A slash with no match stays text**
>
> If nothing matches what you typed after `/`, pressing `Enter` sends your message as plain text. A path, a link or a slash inside a word also stays text.

## Commands and skills as tags

When a command or an installed skill matches a name exactly, it shows as a colored tag. Each kind has its own color:

| Color  | Kind                                                                   |
| ------ | ---------------------------------------------------------------------- |
| Purple | A skill.                                                               |
| Blue   | A command that comes with Lyna: actions, modes, workflows and context. |
| Green  | The MCP servers command, `/mcp`.                                       |
| Orange | A command you or a plugin wrote.                                       |

A tag is deleted whole: press `Backspace` after or inside it, or `Delete` before or inside it, and undo brings it back. A skill you pick from the menu joins your message as a purple tag with a remove button. Sent messages keep the same tags: a message that is only a command shows its tag with the command's description under it.

The composer with a purple skill tag and a blue command tag in the draft, above a sent message that shows the same colored tags.

## Modes

| Command  | What it does                                      |
| -------- | ------------------------------------------------- |
| `/build` | Switch to Build mode to make changes.             |
| `/plan`  | Switch to Plan mode to outline an approach first. |
| `/ask`   | Switch to Ask mode to ask without changing code.  |

## Workflow

| Command          | What it does                                                                                              |
| ---------------- | --------------------------------------------------------------------------------------------------------- |
| `/deep-planning` | Plan mode with a deeper look at the project structure first. The result is a plan you review and approve. |
| `/newtask`       | Condense the context and start fresh with the key information.                                            |
| `/newrule`       | Create or edit project rules.                                                                             |
| `/fix`           | Analyze errors and fix them.                                                                              |
| `/review`        | Review code changes for quality and correctness.                                                          |
| `/refactor`      | Restructure code safely, then check the result.                                                           |
| `/iterate`       | Improve existing code or UI in small rounds.                                                              |

## Context

| Command            | What it does                                                |
| ------------------ | ----------------------------------------------------------- |
| `/explain-changes` | Read the Git changes and summarize their intent and impact. |

## Actions

| Command         | What it does                                                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `/clear`        | Start a new conversation.                                                                                                             |
| `/compact`      | Summarize the conversation now to free room.                                                                                          |
| `/screenshot`   | Capture the preview and add it to the chat.                                                                                           |
| `/doctor`       | Detect and fix errors in your code.                                                                                                   |
| `/agent-review` | Review the changes since main for issues: Quick by default, or `/agent-review deep`. See [Agent Review](/features/code/agent-review). |
| `/plans`        | Open the project's saved plans.                                                                                                       |
| `/knowledge`    | Open project knowledge.                                                                                                               |
| `/figma`        | Import designs from Figma.                                                                                                            |
| `/rules`        | Open the project's AI rules.                                                                                                          |
| `/skills`       | Browse and manage skills.                                                                                                             |
| `/mcp`          | Turn MCP servers on or off.                                                                                                           |
| `/hooks`        | Turn hooks on or off.                                                                                                                 |
| `/api`          | Call REST, GraphQL, Auth or Storage endpoints of your Lyna Cloud backend.                                                             |
| `/model`        | Switch the AI model.                                                                                                                  |
| `/effort`       | Set the thinking effort.                                                                                                              |
| `/context`      | Open the details of the context meter.                                                                                                |
| `/diff`         | Show the files changed in this session.                                                                                               |
| `/help`         | List every command.                                                                                                                   |

Commands with a submenu (**Skills**, **MCP Servers**, **Hooks** and **API**) open a second list, and typing one of them opens the menu on its row. Choose **Back** to return.

### Help

`/help` lists every command once, grouped like the menu, with its description in your language.

The chat showing the /help card: every command grouped under Modes, Workflow, Context and Actions, each with its description.

### Context and compaction

`/context` opens the **Context** view of the context meter full screen: how much of the window the conversation uses, what takes the room, and when Lyna compacts. Before the first reply it shows a short card instead.

Lyna compacts a long conversation on its own when the context fills up. To do it now, type `/compact` or choose **Compact conversation** in the **Context** view. A short conversation is not compacted: a line says why a summary cannot help yet.

The Context view open full screen, with the meter bar, the breakdown of what takes the room and the Compact conversation button.

## The API command

`/api` builds a request to your project's backend for you. Pick **REST**, **GraphQL**, **Auth** or **Storage**, then an action such as **List rows** or **Insert row**. Actions that change data (insert, update, delete) ask for your approval before they run. Your project needs a database connected in project settings.

## Your commands and skills

- **Your commands** appear in their own group, marked **User** or **Plugin**. Create them in **Settings > AI > Customize > Commands**.
- **Skills** that match what you type appear in a **Skills** section after the command groups, so `/brand` finds a skill named `brand-footer`.

Settings open on Customize, Commands chip, with your commands and the built-in ones.

## Related

- [Skills](/features/ai/skills): Reusable instructions the AI loads on demand.
- [Chat](/features/ai/chat): The composer, the context meter and the conversation.
- [MCP servers](/features/ai/mcp-servers): Give the AI tools from outside services.
- [Hooks](/features/ai/hooks): Run commands at set moments.
