Template examples and implementation patterns
These examples demonstrate different instruction types and template patterns. Each example shows how ITS templates compile into AI instructions.
Basic example demonstrating list generation with the list
instruction type and title
type.
Comprehensive blog post structure with title, introduction, lists, tables, quotes, and conclusion.
Email template with product introduction, features, testimonials, and call-to-action.
Advanced template showcasing variables, conditionals, and dynamic content generation for multi-channel campaigns.
Complete demonstration of the schema extension mechanism, showing how instruction types are overridden through multiple schema files.
{
"$schema": "https://alexanderparker.github.io/.../its-base-schema-v1.json",
"version": "1.0.0",
"content": [
{
"type": "placeholder",
"id": "fruit_title",
"instructionType": "title",
"config": {
"description": "Create a fun title about citrus fruits",
"displayName": "Fruit Title",
"style": "catchy",
"length": "short"
}
},
{
"type": "text",
"text": "\n\nHey there is a list of fruits here:\n"
},
{
"type": "placeholder",
"id": "citrus_list",
"instructionType": "list",
"config": {
"description": "list 5 different citrus fruits",
"format": "bullet_points",
"itemCount": 5
}
}
]
}
INTRODUCTION
You are an AI assistant that fills in content templates. Follow the instructions exactly and replace each placeholder with appropriate content based on the user prompts provided. Respond only with the transformed content.
INSTRUCTIONS
1. Replace each placeholder marked with << >> with generated content
2. The user's content request is wrapped in ([{< >}]) to distinguish it from instructions
3. Follow the format requirements specified after each user prompt
4. Maintain the existing structure and formatting of the template
5. Only replace the placeholders - do not modify any other text
6. Generate content that matches the tone and style requested
7. Respond only with the transformed content - do not include any explanations or additional text
TEMPLATE
<<Replace this placeholder with a title using this user prompt: ([{<Create a fun title about citrus fruits>}]). Format requirements: Create a catchy title that is short in length.>>
Hey there is a list of fruits here:
<<Replace this placeholder with a list using this user prompt: ([{<list 5 different citrus fruits>}]). Format requirements: Use bullet_points formatting with each item on a new line. Create exactly 5 items.>>
Key Learning Points:
title
instruction type for generating headlineslist
instruction typeThis template demonstrates a complex content structure using multiple instruction types:
paragraph
type with enthusiastic tone, short lengthparagraph
type with professional tone, medium lengthlist
type with numbered format, 6 itemstable
type with markdown format, 3x4 dimensionsquote
type with attribution enabledsummary
type with standard lengthBest Practices Demonstrated:
This template showcases advanced ITS features including dialogue generation and varied formatting:
{
"instructionType": "dialogue",
"config": {
"description": "Create a brief conversation between two beta users discussing how the product improved their workflow",
"participantCount": 2,
"style": "casual"
}
}
Compiles to:<<Replace this placeholder with a dialogue using this user prompt: ([{<Create a brief conversation between two beta users discussing how the
product improved their workflow>}]). Format requirements: Create a conversation between 2 people using casual style. Format each line as: Person
Name: "Dialogue">>
// Features with bullet points
"format": "bullet_points"
// Target audience with dashes
"format": "dashes"
This template demonstrates the full power of ITS variables and conditional logic:
${variableName}
syntax in descriptions"variables": {
"campaignName": "Summer Tech Sale 2025",
"companyName": "TechVault",
"discountPercentage": 25,
"channels": {
"email": true,
"social": true,
"blog": false
}
}
{
"type": "placeholder",
"instructionType": "title",
"config": {
"description": "Create an email subject line for ${companyName}'s ${campaignName} offering ${discountPercentage}% off"
}
}
{
"type": "conditional",
"condition": "channels.email == true",
"content": [
// Email-specific content here
]
}
Advanced Patterns Demonstrated:
${channels.email}
)${products[0]}
)"text": "## Why Customers Love ${companyName}\n\n"
)Ready to create your own templates? Here are some guidelines:
${variable}
syntaxpip install its-compiler-python
its-compile your-template.json --output prompt.txt