What Are Slash Commands in Anthropic’s Knowledge‑Work Plugins?
Slash commands are user‑typed triggers starting with a forward slash (e.g., /sales:call-prep) that invoke plugin functionality directly from chat interfaces like Zoom Team Chat.
In the anthropics/knowledge-work-plugins repository, slash commands provide a discoverable, command‑line‑style interface for running complex workflows. These commands route user requests to specific skills or legacy commands defined within a plugin, enabling team members to execute LLM‑driven logic without leaving their chat window.
How Slash Commands Work
When a user types a command beginning with /, the Cowork UI routes the request to the corresponding plugin via a webhook. The system delivers the command as a bot_notification event where the cmd field contains everything after the slash. The plugin then processes the input, runs its logic—such as calling external APIs or running LLM inference—and returns a rich card or text response.
According to partner-built/zoom-plugin/skills/team-chat/concepts/webhooks.md, this webhook structure allows plugins to parse the command name and arguments programmatically.
Declaring Slash Commands in the Repository
The repository supports two distinct formats for defining slash commands: a legacy Markdown‑based format and a modern skill‑based approach.
Legacy Format (Commands Directory)
In the legacy format, each slash command lives as a separate Markdown file within a commands/ directory. These files contain YAML front‑matter describing the command metadata and optional inline Bash scripts for execution.
Example from commands/hello.md:
---
name: hello
description: Say hello and echo the argument
arguments:
- name: name
required: true
description: Who to greet
---
#!/usr/bin/env bash
echo "Hello, $1!"
This approach is documented in cowork-plugin-management/skills/create-cowork-plugin/SKILL.md.
Modern Format (Skills)
The modern approach defines slash commands as regular skills located in skills/*/SKILL.md. The command name appears in the skill’s description field, and the Cowork UI automatically surfaces it as a slash command in the chat interface.
Example structure:
# skills/hello/SLACK.md
description: "Say hello – usage: `/hello <name>`"
arguments:
- name: name
required: true
description: Person to greet
---
# The skill's implementation (e.g., a Python script, a webhook, etc.)
The Zoom Team Chat skill at partner-built/zoom-plugin/skills/team-chat/SKILL.md demonstrates this modern implementation, exposing functionality like /sales:call-prep and /data:write-query directly to users.
Handling Slash Commands in Code
When the webhook fires, your application receives a bot_notification event containing the full command string in the cmd field. Parse this string to extract the command name and arguments, then execute the corresponding logic.
Example Node.js implementation:
app.post('/webhook', (req, res) => {
const { event, cmd } = req.body; // `event` === 'bot_notification'
if (event === 'bot_notification' && cmd) {
const [command, ...args] = cmd.split(' ');
if (command === '/hello') {
const name = args[0] || 'world';
return res.json({ text: `Hello, ${name}!` });
}
}
res.sendStatus(200);
});
Once the plugin is installed, these commands become instantly available in a user’s session, providing a consistent interface for triggering workflows defined in operations/README.md and other plugin components.
Summary
- Slash commands in
anthropics/knowledge-work-pluginsare triggers starting with/that invoke plugin functionality from chat interfaces. - Commands are delivered via
bot_notificationwebhook events containing the command text in thecmdfield. - Legacy commands are defined in Markdown files under
commands/with YAML front‑matter. - Modern commands are defined as skills in
skills/*/SKILL.mdwith command usage documented in the description. - Both formats support argument parsing and rich card responses.
Frequently Asked Questions
What chat platforms support these slash commands?
The repository primarily targets Zoom Team Chat, as evidenced by the partner-built/zoom-plugin/ directory. The bot_notification webhook structure is designed to work with Cowork UI integrations, though the underlying pattern could theoretically adapt to other platforms that support webhook‑based bot interactions.
How do I migrate from legacy commands to the modern skill format?
Move your command logic from commands/[name].md to skills/[name]/SKILL.md. Ensure the skill’s description field explicitly documents the slash command usage pattern (e.g., /command <arg>). The modern format decouples the user‑facing command name from the file structure, allowing more flexible organization while maintaining discoverability.
Can slash commands include optional arguments?
Yes. Both legacy and modern formats support argument definitions in YAML front‑matter. Mark arguments as required: false to make them optional, then handle missing values in your webhook handler code by providing defaults (such as defaulting to 'world' when a name argument is omitted).
Where does the bot_notification event originate?
The event originates from the Cowork UI when a user submits a message starting with /. The system POSTs to your configured webhook URL with the event type set to bot_notification and the raw command text in the cmd field, as documented in partner-built/zoom-plugin/skills/team-chat/concepts/webhooks.md.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →