Enterprise template management (UV script migrated to builder-skill-uvscript)
npx playbooks add skill rdmptv/adbautoplayer --skill moai-workflow-templates
> ⚠️ UV Script Migration Notice
>
> The UV CLI script has been consolidated into the builder-skill-uvscript skill on 2025-11-30.
>
> New script location:
> - builder-skill_generate_template.py (previously template_generator.py)
> - Find script in: .claude/skills/builder-skill-uvscript/scripts/
>
> Usage: uv run .claude/skills/builder-skill-uvscript/scripts/builder-skill_generate_template.py
>
> This skill retains its template knowledge base and patterns.
Unified template system combining code boilerplates, feedback templates, and project optimization workflows for rapid development and consistent patterns.
Core Capabilities:
When to Use:
/moai:9-feedbackKey Features:
Quick Access:
Pattern 1: Template Structure
templates/
├── fastapi-backend/
│ ├── template.json (variables)
│ ├── src/
│ │ ├── main.py
│ │ └── models/
│ └── tests/
├── nextjs-frontend/
│ ├── template.json
│ ├── app/
│ └── components/
└── fullstack/
├── backend/
└── frontend/
Pattern 2: Template Variables
{
"variables": {
"PROJECT_NAME": "my-project",
"AUTHOR": "John Doe",
"LICENSE": "MIT",
"PYTHON_VERSION": "3.13"
},
"files": {
"pyproject.toml": "substitute",
"README.md": "substitute",
"src/**/*.py": "copy"
}
}
Pattern 3: Template Generation
def generate_from_template(template_name, variables):
1. Load template directory
2. Substitute variables in marked files
3. Copy static files as-is
4. Run post-generation hooks (install deps, init git)
5. Validate generated project structure
template_generator.py - IndieDevDan Template Scaffolding
Generate skills, agents, commands, or scripts from IndieDevDan templates with automatic variable substitution.
Usage Examples:
# Generate a new skill (dry-run to preview)
uv run scripts/template_generator.py --type skill --name my-custom-skill --dry-run
# Generate agent with description
uv run scripts/template_generator.py --type agent --name task-coordinator --description "Coordinates multi-step tasks"
# Generate command with JSON output
uv run scripts/template_generator.py --type command --name analyze-project --json
# Generate script template
uv run scripts/template_generator.py --type script --name data_processor.py
Template Types:
skill - Full skill structure with SKILL.md, modules/, scripts/agent - Agent definition with workflow and toolscommand - Custom slash command with parametersscript - Python script with PEP 723 dependencies and Click CLIOutput Features:
[REPLACE: ...] variable substitutionExit Codes:
0 - Success (template generated)1 - Invalid input (missing required parameters)2 - Template processing error (file reading/writing failed)3 - Validation error (generated template invalid)Concept: Rapidly scaffold projects with production-ready boilerplates.
Usage Example:
# Generate FastAPI project structure
template = load_template("backend/fastapi")
project = template.scaffold(
name="my-api",
features=["auth", "database", "celery"],
customizations={"db": "postgresql"}
)
Details: See [Code Templates](modules/code-templates.md) for complete library and examples.
---
Concept: Structured templates for consistent GitHub issue creation.
6 Template Types: Bug Report, Feature Request, Improvement, Refactor, Documentation, Question/Discussion
Integration: Auto-triggered by /moai:9-feedback command.
Details: See [Feedback Templates](modules/feedback-templates.md) for all template types and usage.
---
Concept: Intelligently merge template updates while preserving user customizations.
Smart Merge Algorithm:
def smart_merge(backup, template, current):
"""Three-way merge with intelligence."""
# Extract user customizations from backup
user_content = extract_user_customizations(backup)
# Get latest template defaults
template_defaults = get_current_templates()
# Merge with priority
merged = {
"template_structure": template_defaults, # Always latest
"user_config": user_content, # Preserved
"custom_content": user_content # Extracted
}
return merged
Details: See [Template Optimizer](modules/template-optimizer.md) for complete workflow and examples.
---
Concept: Automatic backup management with intelligent restoration.
Restoration Process:
def restore_from_backup(backup_id: str):
"""Restore project from specific backup."""
# Load backup metadata
backup = load_backup(backup_id)
# Validate backup integrity
if not validate_backup_integrity(backup):
raise BackupIntegrityError("Backup corrupted")
# Extract user customizations
customizations = extract_customizations(backup)
# Apply to current project
apply_customizations(customizations)
Details: See [Template Optimizer - Backup Restoration](modules/template-optimizer.md#restoration-process) for complete implementation.
---
Concept: Track template versions and maintain update history.
Version Tracking:
{
"template_optimization": {
"last_optimized": "2025-11-24T12:00:00Z",
"backup_version": "backup-2025-10-15-v0.27.0",
"template_version": "0.28.2",
"customizations_preserved": [
"language",
"team_settings",
"domains"
]
}
}
Details: See [Template Optimizer - Version Tracking](modules/template-optimizer.md#version-tracking) for complete implementation.
---
Code Templates:
Feedback Templates:
/moai:9-feedbackTemplate Optimizer:
For detailed patterns and implementation strategies:
Agents:
Skills:
Commands:
/moai:0-project - Project initialization with templates/moai:9-feedback - Feedback template selection and issue creationProject Initialization:
1. Select code template (Pattern 1)
↓
2. Scaffold project structure
↓
3. Apply customizations
↓
4. Initialize version tracking (Pattern 5)
Feedback Submission:
1. /moai:9-feedback execution
↓
2. Select issue type (Pattern 2)
↓
3. Fill template fields
↓
4. Auto-generate GitHub issue
Template Update:
1. Detect template version change
↓
2. Create backup (Pattern 4)
↓
3. Run smart merge (Pattern 3)
↓
4. Update version history (Pattern 5)
---
Status: Production Ready (Enterprise)
Modular Architecture: SKILL.md + 3 core modules
Integration: Plan-Run-Sync workflow optimized
Generated with: MoAI-ADK Skill Factory
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.