| 1 | --- |
| 2 | title: "Using Slash Commands in Continue" |
| 3 | description: "Learn how to use and create Slash Commands in Continue to run custom prompts, access context providers, and speed up coding tasks." |
| 4 | keywords: [slash command, custom commands, step] |
| 5 | sidebarTitle: "Slash Commands" |
| 6 | --- |
| 7 | |
| 8 |  |
| 9 | |
| 10 | 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. |
| 11 |  |
| 12 | |
| 13 | Slash commands can be combined with additional instructions, including highlighted code. |
| 14 | |
| 15 | <Note> |
| 16 | **Recommended approach**: Use prompt files to create slash commands instead of |
| 17 | the deprecated `config.json` approach. The methods described below provide |
| 18 | better flexibility and are the actively maintained ways to add custom |
| 19 | commands. |
| 20 | </Note> |
| 21 | |
| 22 | ## Ways to Create Slash Commands in Continue |
| 23 | |
| 24 | ### Agent Prompt Blocks |
| 25 | |
| 26 | The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types#prompts) to your agent, which show up as slash commands in [Chat](../../features/chat/how-it-works). |
| 27 | |
| 28 | ### Prompt Files |
| 29 | |
| 30 | 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. |
| 31 | |
| 32 | Learn more about prompt files [here](./prompts). |
| 33 | |
| 34 | ### MCP Server Prompts |
| 35 | |
| 36 | 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) for more details. |