| 1 | --- |
| 2 | title: Slash commands |
| 3 | description: Shortcuts that can be activated by prefacing your input with '/' |
| 4 | keywords: [slash command, custom commands, step] |
| 5 | --- |
| 6 | |
| 7 |  |
| 8 | |
| 9 | Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown. |
| 10 |  |
| 11 | |
| 12 | Slash commands can be combined with additional instructions, including [context providers](../custom-providers.mdx) or highlighted code. |
| 13 | |
| 14 | ## Prompts |
| 15 | |
| 16 | ### Assistant prompt blocks |
| 17 | |
| 18 | The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types.md#prompts) to your assistant, which show up as slash commands in [Chat](../../features/chat/how-it-works.mdx). |
| 19 | |
| 20 | ### Prompt files |
| 21 | |
| 22 | It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more. |
| 23 | |
| 24 | Learn more about prompt files [here](./prompts.md) |
| 25 | |
| 26 | ### MCP Server prompts |
| 27 | |
| 28 | Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](./mcp.mdx) for more details. |