Handle template comparison and optimization workflows including backup detection, smart merging, and update completion reporting. Enhanced with Context7 MCP for up-to-date documentation.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
moai-project-template-optimizer
version
4.0.0
created
2025-11-12T00:00:00.000Z
updated
2025-11-12T00:00:00.000Z
status
stable
tier
specialization
description
Handle template comparison and optimization workflows including backup detection, smart merging, and update completion reporting. Enhanced with Context7 MCP for up-to-date documentation.
Primary Agent: alfred Secondary Agents: none Version: 4.0.0 Keywords: project, template, optimizer, test
📖 Progressive Disclosure
Level 1: Quick Reference (Core Concepts)
Purpose: Handle template comparison and optimization workflows including backup detection, smart merging, and update completion reporting. Enhanced with Context7 MCP for up-to-date documentation.
Template Default Detection: Identify original template content
User Customization Extraction: Isolate user modifications
Version Compatibility Check: Ensure merge compatibility
Conflict Identification: Flag unresolvable differences
Phase 3: Smart Merge Algorithm
Purpose: Preserve user customizations while updating template structure
Strategy: Three-way merge with intelligence
Merge Process:
Extraction Phase
# Extract user customizations from backup
user_customizations = extract_user_content(backup_files)
# Get latest template defaults
template_defaults = get_current_templates()
# Analyze current project state
current_state = analyze_current_project()
Merge Strategy
Template defaults: Always use latest template version
User configurations: Preserve from backup with compatibility updates
Custom content: Extract and merge with new structure
Deprecated features: Flag and offer migration options
Conflict Resolution
Template conflicts: Prefer latest template
User config conflicts: Preserve user choice with warnings
Structural conflicts: Create merge report with resolution options
Phase 4: Template Default Detection
Purpose: Identify and preserve only non-template content during updates
Method: Pattern recognition and content analysis
Detection Patterns:
Template Indicators | User Content Indicators
---------------------------- | -------------------------
"{{PROJECT_NAME}}" | Specific project names
"{{CONVERSATION_LANGUAGE}}" | Actual language codes
"src/moai_adk/templates/" | Custom file paths
Template placeholders | Real configuration values
Default examples | Custom implementations
Content Classification:
Template Content: Default placeholders, examples, standard structure
User Content: Custom configurations, specific implementations, personal settings
Mixed Content: Template files with user modifications (requires careful extraction)
Phase 5: Version Management & History
Purpose: Maintain version tracking and update history sections
Output: Comprehensive update reports and history tracking
This skill consolidates complex template optimization workflows into a focused, intelligent system that:
Reduces complexity: From 700+ lines to optimized skill implementation
Improves reliability: Automated backup and merge procedures
Enhances user experience: Smart customization preservation
Maintains traceability: Comprehensive version tracking and reporting
Provides flexibility: Multiple operation modes and rollback options
The skill serves as the foundation for template lifecycle management and can be extended with additional optimization patterns as template structures evolve.