Save and reuse a prompt in Rovo Dev CLI
Save your regularly used prompts so you can quickly access them to speed up your development flow.
Commands
Prompts menu
/prompts
- Opens an interactive menu to view and select saved prompts.
Run specific prompt
/prompts [title]
- Runs the prompt you specify.
Run a prompt with extra information
/prompts [title] [extra_information]
- Appends the extra information you specify to the end of your saved prompt and runs. Extra information can also be used to specify parameters that are expected by the saved prompt.
Non-interactive mode
You can run saved prompts in non-interactive mode from the command line:
acli rovodev run "/instructions local-code-review"
This is useful for automation scripts or CI/CD pipelines.
Create a saved prompt
Each saved prompt is stored in a markdown file which is referenced by a master instructions file.
Create a
prompts.yml
file in your.rovodev
directory:
prompts:
- name: my-custom-prompt
description: My custom prompt description
content_file: my_custom_prompt.md
2. Create a markdown file in the .rovodev
folder containing your prompt content:
.rovodev/my_custom_prompt.md:
# My Custom Prompt
Please analyze the current codebase and:
1. Check for any code smells or anti-patterns
2. Suggest improvements for code organization
3. Identify any potential performance issues
Focus specifically on the following areas:
- Function complexity
- Code duplication
- Error handling patterns
Built-in saved prompts
Rovo Dev CLI comes with built-in prompts for common development tasks:
create-prompt
- Create a new prompt within your current folder.
local-code-review
- Perform a code review of your local changes.
unit-test-coverage
- Analyze and increase unit test coverage.
improve-documentation
- Update or improve the codebase documentation.
summarize-jira-issues
- Provide a summary of Jira issues assigned to the current user.
summarize-confluence-page
- Generate a summary of a specified Confluence page.
Duplicate prompt names
Rovo Dev CLI loads prompts from multiple locations. If a saved prompt in one directory shares a name with a saved prompt in a different directory, Rovo Dev will use the higher priority one.
Saved prompts are prioritised in this order:
Built-in saved prompts.
Repository root (
.rovodev/prompts.yml
in your Git repository root)..rovodev/prompts.yml
in your current working directory.~/.rovodev/prompts.yml
for global user prompts.
Prompts with the same name in higher-precedence locations override those in lower-precedence locations.
When loading prompt content files, the CLI searches for files in this order:
Relative to the
prompts.yml
file location.Relative to the repository root (parent of
.rovodev
folder).As an absolute path.
This flexibility allows you to organize your prompt files in the way that works best for your project structure.
Tips for writing prompts
Clearly describe what you want Rovo Dev to do, and phrase it as an instruction.
Include any relevant context or background information about your project.
Use examples to show Rovo Dev the kind of output you're looking for.
Break down complex tasks into smaller, focused ones.
Refine your prompts based on the results you get.
Was this helpful?