| name | template-based-generation-template |
| description | [REPLACE] Generate structured content from templates. Use when [REPLACE with specific triggers]. |
Template-Based Generation Template
Purpose
This template demonstrates structured content generation from templates with placeholder filling and validation.
Use this template when:
- Generating configuration files
- Creating boilerplate code
- Producing structured documents
- Output follows predictable patterns
Workflow
Phase 1: Gather Requirements
1. Identify required configuration values
2. Collect user inputs
3. Determine target environment
4. Check for optional features
5. Validate input completeness
Phase 2: Select Template
Based on requirements:
- Production: @references/production-config-template.md
- Development: @references/dev-config-template.md
- Testing: @references/test-config-template.md
Phase 3: Fill Template
1. Replace required placeholders
2. Apply conditional sections
3. Insert computed values
4. Format output appropriately
5. Add generation metadata
Phase 4: Validate Output
1. Check all placeholders replaced
2. Verify syntax correctness
3. Validate security settings
4. Confirm required fields present
5. Test configuration loading
6. List scripts that should be run to validate the output of this skill
Template Selection Logic
Production Configuration:
- High security requirements
- Performance optimization
- Monitoring and logging
- Secrets management
Development Configuration:
- Debug mode enabled
- Verbose logging
- Local service URLs
- Mock credentials
Testing Configuration:
- Test database
- Reduced timeouts
- Isolated environment
- Deterministic behavior
Progressive Disclosure
Core workflow (this file):
- Requirement gathering
- Template selection logic
- Validation rules
Templates (references/):
- @references/production-config-template.md - Production config example
- Domain-specific templates loaded when needed
Example Usage
<gather-requirements>
Environment: production
Database: PostgreSQL
Features: [caching, monitoring, rate-limiting]
Region: us-east-1
</gather-requirements>
<select-template>
Selected: Production configuration template
Security level: High
Monitoring: Enabled
</select-template>
<fill-template>
Generating config/production.json:
- Database URL: [REDACTED - from environment]
- Redis URL: [REDACTED - from environment]
- Rate limit: 1000 req/min
- Monitoring: DataDog integration
- Log level: info
</fill-template>
<validate-output>
โ No plaintext secrets
โ All required fields present
โ Valid JSON syntax
โ Security headers configured
โ CORS settings appropriate
Configuration ready!
</validate-output>
See Also
- @references/production-config-template.md - Complete config generation example