Elffuss BraidHub

kikocis/continue public

37eef76c38ed · 1.6 KiBRawPermalink
1---
2title: Slash commands
3description: Shortcuts that can be activated by prefacing your input with '/'
4keywords: [slash command, custom commands, step]
5---
6
7![actions](/images/actions.gif)
8
9Slash 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![slash-commands](/images/slash-commands.png)
11
12Slash commands can be combined with additional instructions, including [context providers](../custom-providers) or highlighted code.
13
14<Note>
15 **Recommended approach**: Use prompt files to create slash commands instead of
16 the deprecated `config.json` approach. The methods described below provide
17 better flexibility and are the actively maintained ways to add custom
18 commands.
19</Note>
20
21## Prompts
22
23### Assistant prompt blocks
24
25The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types#prompts) to your assistant, which show up as slash commands in [Chat](../../features/chat/how-it-works.mdx).
26
27### Prompt files
28
29It 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.
30
31Learn more about prompt files [here](./prompts).
32
33### MCP Server prompts
34
35Any 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.