Template Variable Prompts
Definition (confidence: high)
A minimal skeleton prompt with {{variable}} placeholders filled at runtime. Used exclusively by Xcode actions (Document, Explain, Playground, Preview, System). Only ~2% of the corpus uses this pattern.
Example (confidence: high)
Explain the following {{language}} code:
{{code_selection}}
Focus on: {{focus_area}}
Key Characteristics (confidence: high)
- Token efficiency: Very high — the prompt is the minimum viable skeleton
- Human editability: High — easy to understand and modify
- No persona or workflow: The template assumes the tool provides context through variables
- Optimal for narrow, deterministic operations: Actions like “explain code” or “document function” don’t need a full agent persona
Why This Pattern Matters (confidence: high)
Template-variable prompts represent the purest expression of prompt minimalism. They achieve the highest token efficiency because they carry zero overhead — no role definition, no guardrails, no workflow instructions. The tool’s runtime environment provides all necessary context through variable substitution. This may be the optimal pattern for single-purpose tool integrations.
Related Concepts (confidence: high)
monolithic-prompt-limits — The extreme opposite: massive single-document prompts exceeding 30K tokens. Template variables are the counter-response to bloat.
communication-style-spectrum — Template prompts don’t specify a communication style; the style is determined entirely by the template’s structure and the variable content.
xcode-actions-prompt — The entity page for Xcode’s action prompts, the only tool family using this pattern.
Implications (confidence: high)
Template-variable prompts are an under-explored pattern in the corpus. For tool ecosystems with many small, deterministic actions, this pattern may be optimal. It avoids the overhead of persona definitions and workflow instructions that are irrelevant to single-purpose operations. As tool ecosystems grow (VS Code extensions, MCP servers), this pattern may see wider adoption.
Sources
- [raw/prompts/articles/taxonomy-synthesis-2026-07-16.md]