documentation/docs/guides/prompt-templates.md
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import { PanelLeft } from 'lucide-react';
goose comes with built-in prompt templates that guide its behavior in different situations. You can edit these templates to customize how goose responds, creates plans, decides what to save during compaction, and more.
goose's default prompt templates are defined in the codebase and embedded in the application. You can override any default by creating a custom version in your local config directory (either directly or via goose Desktop).
When you customize a template:
Your changes can range from major updates to minor adjustments such as:
system.md to have goose respond in Dutch by adding an instruction to "Reply in Dutch"plan.md to add time estimates by adding instructions to "Include an estimated time for each step (e.g., "~5 min", "~30 min", "~2 hours")."See Template Variable Syntax for important information about modifying template variables.
:::info Related Configuration Other goose settings and features can also affect behavior or provide context, such as config files, .goosehints, and skills. :::
goose Desktop users can manage templates from the Settings page.
To customize a template:
Settings in the sidebarPrompts tabEdit next to the template you want to changeRestore Default to start over from the default template at any time.Save to apply your customizationCustomized prompt templates display a Customized badge.
To reset a template to its default:
Settings in the sidebarPrompts tabEdit next to the template you want to resetReset to Default to delete your local template fileOr click Reset All at the top of the tab to delete all of your local template files.
goose CLI users can edit template files directly in the file system.
Custom templates are stored in:
~/.config/goose/prompts/%APPDATA%\Block\goose\config\prompts\To customize a template:
prompts directory if it doesn't existsystem.md)To reset a template to its default:
prompts directoryThe following default templates can be customized.
| Template | Description | Applies To |
|---|---|---|
| system.md | General system prompt defining goose's role, capabilities, and response format | Desktop and CLI |
| apps_create.md | Prompt for generating new standalone apps (in development) | Desktop only |
| apps_iterate.md | Prompt for updating existing standalone apps (in development) | Desktop only |
| compaction.md | Prompt for summarizing conversation history when context limits are reached | Desktop and CLI |
| permission_judge.md | Prompt for analyzing tool operations for read-only detection | Desktop and CLI |
| plan.md | Instructions for creating detailed, actionable plans with clarifying questions | CLI only |
| recipe.md | Prompt for generating recipe files from conversations | Desktop and CLI |
| subagent_system.md | System prompt for subagents spawned to handle specific tasks | Desktop and CLI |
Customizable templates are enumerated in the TEMPLATE_REGISTRY array in prompt_template.rs.
Templates use Jinja2 syntax for dynamic content:
{{ variable }} - Inserts a value (e.g., {{ extensions }} lists enabled extensions){% if condition %}...{% endif %} - Conditional sections{% for item in list %}...{% endfor %} - Loops over itemsCheck out the default templates (linked to from the table above) to find common variables, such as {{ extensions }} and {{ hints }}.
If you need to include literal variable syntax in your templates without substitution, wrap it in single quotes:
This will substitute: {{ variable }}
This will appear literally: {{'{{variable}}'}}
:::warning Be careful when modifying template variables, as incorrect changes can break functionality. Test your changes in a new session to ensure they work as expected. :::
import ContentCardCarousel from '@site/src/components/ContentCardCarousel'; import promptBanner from '@site/blog/2025-03-19-better-ai-prompting/prompt.png';
<ContentCardCarousel items={[ { type: 'blog', title: 'AI Prompting 101: How to Get the Best Responses from Your AI Agent', description: 'Learn different prompting styles—from instruction-based to chain-of-thought—and discover which approach works best for your needs.', thumbnailUrl: promptBanner, linkUrl: '/blog/2025/03/19/better-ai-prompting', date: '2025-03-19', duration: '8 min read' } ]} />