docs: slash commands topic (#6333)

Co-authored-by: Angie Jones <jones.angie@gmail.com>
This commit is contained in:
dianed-square
2026-01-05 16:59:35 -08:00
committed by GitHub
parent 4050502354
commit c90ead254f
9 changed files with 180 additions and 55 deletions
+6 -1
View File
@@ -38,6 +38,11 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
description="Complete technical reference for creating and customizing recipes in goose via the CLI."
link="/docs/guides/recipes/recipe-reference"
/>
<Card
title="Custom Slash Commands"
description="Create custom shortcuts to quickly run recipes in any chat session with simple slash commands."
link="/docs/guides/context-engineering/slash-commands"
/>
<Card
title="goose Recipes Tutorial"
description="Learn how to create and use goose recipes with prompts, parameters, MCP servers, and more."
@@ -115,4 +120,4 @@ import VideoCarousel from '@site/src/components/VideoCarousel';
}
]}
/>
</div>
</div>
@@ -229,6 +229,10 @@ You can turn your current goose session into a reusable recipe that includes the
3. Find your recipe in the Recipe Library
4. Click `Use` next to the recipe you want to open
**Slash Command:**
1. Enter a [custom slash command](/docs/guides/context-engineering/slash-commands) in any goose chat session
2. The first time you run a recipe, a warning dialog displays the recipe's title, description, and instructions for you to review. If you trust the recipe content, click `Trust and Execute` to continue. You won't be prompted again for the same recipe unless it changes.
3. If the recipe contains parameters, enter your values in the `Recipe Parameters` dialog and click `Start Recipe`.
@@ -361,6 +365,8 @@ You can turn your current goose session into a reusable recipe that includes the
goose run --recipe recipe.yaml --params language=Python
```
**Slash Command** - Enter a [custom slash command](/docs/guides/context-engineering/slash-commands) in any goose chat session
</TabItem>
<TabItem value="github" label="GitHub Recipe">
@@ -416,55 +422,6 @@ You can turn your current goose session into a reusable recipe that includes the
</TabItem>
</Tabs>
## Custom Recipe Commands
Create shortcuts to quickly run recipes in any goose chat session. Type a custom command like `/daily-report` to instantly apply that recipe's instructions.
<Tabs groupId="interface">
<TabItem value="ui" label="goose Desktop" default>
1. Click the <PanelLeft className="inline" size={16} /> button in the top-left to open the sidebar
2. Click `Recipes` in the sidebar
3. Find the recipe you want to edit and click the <Terminal className="inline" size={16} /> button
4. In the modal that pops up, type your custom command (without the leading `/`) into the text box
5. Click `Save`.
Once you assign a custom command, the `Recipes` menu displays that command in purple text under the recipe's creation date. Typing `/` into the goose Desktop chat window shows a popup menu with the available recipe commands.
To run the recipe, type your custom command with a leading slash into any chat session in the desktop app:
```
/run-tests
```
</TabItem>
<TabItem value="cli" label="goose CLI">
Custom slash commands are configured in your goose [configuration file](/docs/guides/config-files.md). List the command (without the leading `/`) along with the path to the recipe:
```yaml title="~/.config/goose/config.yaml"
slash_commands:
- command: "run-tests"
recipe_path: "/path/to/recipe.yaml"
- command: "daily-standup"
recipe_path: "/Users/me/.local/share/goose/recipes/standup.yaml"
```
To run the recipe, type your custom command with a leading slash into any goose chat session:
```sh
Context: ●○○○○○○○○○ 5% (9695/200000 tokens)
( O)> /run-tests
```
</TabItem>
</Tabs>
When you run a recipe using a slash command, the recipe's instructions and prompt fields are sent to your model and loaded into the conversation, but not displayed in chat. The model responds using the recipe's context and instructions just as if you opened it directly.
:::info
- Custom Recipe commands don't support parameters or arguments.
- Command names are case-insensitive (`/Bug` and `/bug` are treated as the same command).
- Commands must be unique and contain no spaces.
- You cannot use names that conflict with [built-in CLI slash commands](/docs/guides/goose-cli-commands.md#slash-commands) like `/recipe`, `/compact`, or `/help`.
- If the recipe file is missing or invalid, the command will be treated as regular text sent to the model.
:::
## Validate Recipe
<Tabs groupId="interface">