add
Create a new prompt template interactively or from command-line arguments.
Usage
prompter add [name] [content] [flags]Flags
--editor,-e- Open the template in your editor after creation--force,-f- Overwrite existing template without confirmation--interactive,-i- Force interactive mode (prompts for name and content)
Interactive Mode
When called without arguments or with --interactive, Prompter will prompt you for:
- Template name
- Template content (multi-line text area)
prompter addNon-Interactive Mode
Provide the template name and content as arguments:
prompter add my-template "This is my template content"Examples
Create Template Interactively
prompter addYou’ll be prompted to enter:
- Name:
code-review - Content: (multi-line editor opens)
Create Template from Arguments
prompter add code-review "Review this code for best practices and potential issues"Create and Edit
prompter add code-review "Initial content" --editorThis creates the template and immediately opens it in your configured editor.
Create from Piped Input
cat template.txt | prompter add my-templateOverwrite Existing Template
prompter add code-review "Updated content" --forceWithout --force, you’ll be prompted to confirm overwriting.
Template Format
Templates are saved as Markdown files with optional frontmatter:
---name: "Code Review"description: "Review code for best practices"flag: "code-review"shorthand: "r"pin: false---
# Code Review
Review this code for:- Best practices- Potential bugs- Performance issuesAfter creating a template with add, you can edit it to add frontmatter metadata:
prompter edit my-templateSkills
Prompt templates are not skills; although they are very similar.
You can, however, use your skills as prompt templates with no import needed.
See include_agents for more info.
Template Location
Templates are saved to your configured prompts_location (default: $XDG_DATA_HOME/prompter/prompts).
To create a project-specific template, use the edit command in your project directory:
cd my-projectprompter edit project-templateThis will create the template in your local prompts/ directory.