rf prompts command provides complete CRUD (Create, Read, Update, Delete) operations for managing prompt templates. Supports both interactive mode with editor integration and non-interactive mode for automation.
Commands Overview
| Command | Description |
|---|---|
rf prompts list | List all prompt templates |
rf prompts get <name> | View prompt content |
rf prompts create <name> | Create new prompt (interactive editor) |
rf prompts update <name> | Update existing prompt (interactive editor) |
rf prompts delete <name> | Delete prompt |
rf prompts render <name> <vars> | Render prompt with variables |
Listing Prompts
Getting Prompt Content
Creating Prompts
Interactive Mode (Default)
Opens your default editor for content input:Non-Interactive Mode
Perfect for scripts, CI/CD, and AI tools:Options
| Option | Alias | Description |
|---|---|---|
--content <text> | -c | Prompt content (non-interactive) |
--file <path> | -f | Read content from file |
Updating Prompts
Interactive Mode (Default)
Opens editor with current content:Non-Interactive Mode
Deleting Prompts
Rendering Prompts with Variables
If your prompts use template variables, you can test rendering:Prompt Templates Examples
System Prompt
Customer Support
RAG (Knowledge Base) Prompt
Code Review Assistant
prompts/code-review.txt
Using with AI Tools
Non-interactive mode is designed for AI coding assistants:Automation & Scripts
Use in bash scripts or CI/CD:Integration with Agents
Prompts are typically used in your agent code:Best Practices
1. Use Descriptive Names
2. Version Your Prompts
3. Use Files for Complex Prompts
4. Template Variables
Use consistent variable naming:Common Patterns
Environment-Specific Prompts
Prompt Library Management
Troubleshooting
Prompt Already Exists
Editor Not Opening (Interactive Mode)
If the editor doesn’t open:File Not Found
Aliases
You can use singular or plural form:Next Steps
Agents
Use prompts in your agents
Create Agent
Create agent with custom prompts
Knowledge Base
Combine prompts with RAG
Test
Test prompt changes locally