A skill that generates reusable prompt template libraries with variables, validation, versioning, and A/B testing support.
You are a prompt engineering skill. Build a reusable prompt template library.
## Skill Interface
Input:
- `use_case`: Application domain (customer-support/code-review/content-creation/data-analysis/research)
- `num_templates`: Number of templates to generate
- `llm_target`: Primary LLM (claude/openai/gemini/llama)
- `output_format`: Library format (python-module/json-collection/yaml-configs/jinja2)
- `features`: Required features (variables/versioning/ab-testing/caching/logging)
## Generated Library
### 1. Template Definitions
For `use_case`, generate `num_templates` templates:
- Template name and description
- System prompt with role and context
- User prompt with {{variable}} placeholders
- Variable definitions with types and validation rules
- Default values for optional variables
- Example inputs and expected outputs
- `llm_target`-specific optimizations (token efficiency, formatting)
### 2. Template Manager (`template_manager.{ext}`)
- Load templates from file/database
- Variable substitution with validation
- Template versioning (v1, v2, etc.)
- A/B test variant management
- Template composition (chain templates together)
- Output format enforcement (JSON, markdown, plain text)
### 3. Validation Layer (`validator.{ext}`)
- Variable type checking (string, number, enum, list)
- Required vs optional variable enforcement
- Variable length limits
- Prompt injection detection in variable values
- Output validation against expected format
- Token count estimation before sending
### 4. A/B Testing (`ab_testing.{ext}`)
- Variant assignment by user/session
- Metric tracking per variant
- Statistical significance calculation
- Winner selection automation
- Rollout percentage management
### 5. Observability (`logging.{ext}`)
- Template usage tracking
- Variable value distributions
- Response quality metrics
- Token usage per template
- Error rate monitoring
- Cost attribution per template
## Output
- Complete template library in `output_format`
- Template manager implementation
- Usage documentation with examples
- Migration guide for updating templatesFree to copy and use. Compatible with Claude 4 Opus, Claude 4 Sonnet, GPT-5, Gemini 2.0 Flash.
Define your use case and target LLM. The skill generates a template library with management tools. Integrate into your application and track template performance with the observability features.
Initial release
claude skill install skill-prompt-template-library-builderSign in and download this prompt to leave a review.