Template Discovery
Prompter discovers templates from multiple locations, allowing for both global and project-specific templates.
Discovery Order
Templates are discovered in this order:
- User templates - Global templates from
prompts_location - Local templates - Project-specific templates from
local_prompts_location - Agent templates - AI agent configuration files (when enabled)
User Templates
Global templates available across all projects.
Default location: $XDG_DATA_HOME/prompter/prompts
- Linux:
~/.local/share/prompter/prompts - macOS:
~/Library/Application Support/prompter/prompts
Configure:
prompts_location = "$XDG_DATA_HOME/prompter/prompts"Create:
prompter add my-template "Template content"Local Templates
Project-specific templates that override user templates with the same name.
Default location: ./prompts (relative to current directory)
Configure:
local_prompts_location = "prompts"Create:
mkdir -p promptsprompter edit project-templateAgent Templates
Templates from AI coding agent configurations.
AGENTS.md
Workspace-level agent instructions.
Location: AGENTS.md in workspace root
Enable:
prompter --agentsOr configure:
include_agents = "all"Cursor Commands
Cursor IDE command files.
Location: .cursor/commands/*.md
Enable: Same as AGENTS.md
Kiro Steering
Kiro steering files.
Location: .kiro/steering/*.md
Enable: Same as AGENTS.md
OpenCode Templates
OpenCode template files.
Enable: Same as AGENTS.md
Configuration Options
Control which agent templates are included:
# Include all agent templatesinclude_agents = "all"
# Include noneinclude_agents = "none"
# Include specific typesinclude_agents = "agents" # Only AGENTS.mdinclude_agents = "cursor" # Only .cursor/commandsinclude_agents = "kiro" # Only .kiro/steeringinclude_agents = "opencode" # Only opencodeinclude_agents = "antigravity" # Only antigravityDirectory Strategy
Control how directory content is included:
# Use git tracked files (default)directory_strategy = "git"
# Walk filesystem (respects .gitignore)directory_strategy = "filesystem"Strategies explained:
git- Include only tracked files (respects git status)filesystem- Walk the directory tree (respects .gitignore)
Template Precedence
When templates have the same name:
- Local templates override user templates
- User templates override agent templates
- Agent templates are used if no other template exists
Example:
User: prompts/code-review.mdLocal: prompts/code-review.md ← This one is usedTemplate File Format
Templates must be Markdown files with .md extension:
prompts/├── code-review.md ✓ Discovered├── bug-fix.md ✓ Discovered├── notes.txt ✗ Not discovered└── draft.md.bak ✗ Not discoveredNested folders are supported:
prompts/├── reviews/│ ├── code-review.md│ └── security.md└── docs/ └── api-docs.mdListing Discovered Templates
See all discovered templates:
prompter listInclude agent templates:
prompter list --agentsTroubleshooting
Template Not Found
-
Check template location:
Terminal window ls -la ~/.local/share/prompter/prompts -
Verify file extension is
.md -
Check configuration:
Terminal window prompter config
Local Template Not Overriding
- Ensure you’re in the correct directory
- Check
local_prompts_locationconfiguration - Verify template name matches exactly (case-sensitive)
Agent Templates Not Showing
- Use
--agentsflag or configureinclude_agents - Verify agent files exist:
Terminal window ls -la AGENTS.md .cursor/commands .kiro/steering
Examples
Project-Specific Setup
# Create project templates directorymkdir -p prompts
# Create project-specific templateprompter edit api-design
# Use itprompter --template api-designMulti-Project Setup
~/projects/├── web-app/│ └── prompts/│ ├── frontend.md│ └── backend.md└── mobile-app/ └── prompts/ ├── ios.md └── android.mdEach project has its own templates, plus access to global user templates.
Agent Integration
# Create workspace agent instructionsecho "# Agent Instructions" > AGENTS.md
# Use with promptsprompter "explain this" --agents