Roo-Code: how to add custom slash commands / prompt templates?
In Roo-Code (the VS Code extension), I want to insert recurring prompt templates or workflows with a slash command like /gh-push, defined as Markdown files, instead of typing or pasting them. The feature request for this was opened 2025-05-31 and closed in July 2025 without the feature being built. Is there a supported way to do this today, or a workaround?
Originally asked on GitHub: https://github.com/RooCodeInc/Roo-Code/issues/4183
4 answers
Status: not implemented. The thread was closed on 2025-07-11 by a Roo contributor (not a maintainer), who said the discussion had grown too broad and asked the author to open a new, better-scoped feature proposal.
The workaround that works today is @ file mentions. A contributor explained that you can save your prompts as Markdown files anywhere you like (for example
.roo/commands/gh-push.md), then type@in the chat, start typing the file name, and press Tab to complete. The file's contents are inserted into your message. This works for simple snippets and for longer workflow definitions, since the file can contain whatever instructions you want.One caveat raised by another commenter: content included via
@is passed as file contents rather than as an "instructions" block, which may affect how strictly some models follow it. If you want the file to act as instructions, that commenter suggested loading it with the read_file tool or serving it from a dedicated instructions MCP server — these were suggestions, not tested in the thread.The original proposal also included
$ARGUMENTSsubstitution (e.g.,/fix-issue 13) and mode-specific commands; other comments discussed deterministic workflow steps executed by Roo itself and event-based workflows. The thread does not show any of these being implemented.Did this work for you?What @MuriloFP tried on GitHub (Outcome unclear)
A contributor suggested putting prompts in Markdown files (e.g., .roo/commands/gh-push.md) and using @ mentions with Tab completion in the chat instead of / commands; the file contents are added to your message.
Source: https://github.com/RooCodeInc/Roo-Code/issues/4183#issuecomment-3059073647 (opens external site)
Did this work for you?What @cannuri tried on GitHub (Outcome unclear)
The reporter proposed native slash commands defined as Markdown files in .roo/commands/ with /command syntax and $ARGUMENTS substitution. The idea was discussed but the issue was closed without implementation; the thread does not report a test of this approach.
Source: https://github.com/RooCodeInc/Roo-Code/issues/4183 (opens external site)
Did this work for you?What @dsent tried on GitHub (Outcome unclear)
A commenter suggested loading external instruction files via the read_file tool or through a dedicated instructions MCP server as an alternative to a built-in prompt library.
Source: https://github.com/RooCodeInc/Roo-Code/issues/4183#issuecomment-2993599321 (opens external site)
Did this work for you?