chore: import upstream snapshot with attribution
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:38:58 +08:00
commit bb5c75ce05
8824 changed files with 1946442 additions and 0 deletions
@@ -0,0 +1,127 @@
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [analytics-type] | --player-behavior | --performance | --monetization | --retention | --comprehensive
description: Use PROACTIVELY to implement game analytics systems with player behavior tracking, performance monitoring, and business intelligence integration
---
# Game Analytics & Player Intelligence System
Implement comprehensive game analytics and player intelligence: $ARGUMENTS
## Current Analytics Context
- Game platform: @package.json or detect Unity/Unreal/Godot project files
- Existing analytics: !`grep -r "Analytics\|Telemetry\|Tracking" . 2>/dev/null | wc -l` current implementations
- Data storage: @database/ or detect database configurations
- Privacy compliance: @privacy-policy.md or @GDPR/ (if exists)
- Platform SDKs: !`find . -name "*SDK*" -o -name "*Analytics*" | head -5`
## Task
Create a comprehensive analytics system for game development with player behavior tracking, performance monitoring, A/B testing capabilities, and business intelligence integration.
## Analytics Framework Components
### 1. Player Behavior Analytics
- Session tracking and engagement metrics
- User journey mapping and funnel analysis
- Feature usage and interaction heatmaps
- Player progression and achievement tracking
- Social interactions and community engagement metrics
### 2. Performance & Technical Analytics
- Frame rate and performance monitoring across devices
- Crash reporting and error tracking
- Loading times and optimization opportunities
- Memory usage patterns and optimization insights
- Network performance and connectivity analytics
### 3. Business Intelligence Integration
- Revenue tracking and monetization analytics
- User acquisition and retention metrics
- Lifetime value (LTV) and cohort analysis
- A/B testing framework for feature experiments
- Market segmentation and player persona analytics
### 4. Real-time Monitoring & Alerting
- Live player activity monitoring
- Performance anomaly detection and alerting
- Revenue and conversion rate monitoring
- Server health and capacity monitoring
- Automated incident response and escalation
## Analytics Implementation Areas
### Data Collection Strategy
- Event taxonomy design and standardization
- Privacy-compliant data collection practices
- Cross-platform data synchronization
- Offline data storage and batch upload
- Data quality validation and cleansing
### Analytics Dashboard Development
- Real-time analytics visualization
- Custom KPI tracking and monitoring
- Executive and stakeholder reporting
- Team-specific analytics views and permissions
- Mobile and web dashboard accessibility
### Player Insights & Segmentation
- Player behavior pattern analysis
- Churn prediction and retention strategies
- Personalization and recommendation systems
- Dynamic difficulty adjustment based on analytics
- Player support and community management insights
### A/B Testing & Experimentation
- Feature flag management and testing infrastructure
- Statistical significance validation
- Multivariate testing capabilities
- Gradual feature rollout and monitoring
- Experiment result analysis and recommendations
## Privacy & Compliance
### Data Protection Implementation
- GDPR and CCPA compliance frameworks
- User consent management and tracking
- Data anonymization and pseudonymization
- Right to be forgotten implementation
- Data breach detection and response procedures
### Security & Data Governance
- Encrypted data transmission and storage
- Access control and audit logging
- Data retention policy implementation
- Third-party integration security validation
- Regular security assessment and compliance audits
## Deliverables
1. **Analytics Architecture**
- Data collection framework and event taxonomy
- Privacy-compliant implementation guidelines
- Cross-platform synchronization strategy
- Real-time processing and storage architecture
2. **Dashboard & Reporting System**
- Executive and operational dashboards
- Automated reporting and alert systems
- Custom analytics views for different stakeholders
- Mobile and web accessibility implementation
3. **Player Intelligence Platform**
- Behavior analysis and segmentation tools
- Predictive analytics and recommendation systems
- A/B testing and experimentation framework
- Personalization and dynamic content delivery
4. **Compliance & Security Framework**
- Privacy policy and consent management
- Data governance and security protocols
- Regulatory compliance validation
- Incident response and data breach procedures
## Integration Guidelines
Implement analytics with game engine native solutions and establish scalable data pipelines. Ensure compliance with privacy regulations and platform-specific requirements while maintaining player trust and data security.
@@ -0,0 +1,107 @@
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [pipeline-type] | --art | --audio | --models | --textures | --comprehensive
description: Use PROACTIVELY to build automated game asset processing pipelines with optimization, validation, and multi-platform delivery systems
---
# Game Asset Pipeline & Processing System
Build comprehensive game asset processing pipeline: $ARGUMENTS
## Current Asset Environment
- Project assets: !`find . -name "*.png" -o -name "*.fbx" -o -name "*.wav" -o -name "*.mp3" | wc -l` total assets
- Asset sizes: !`du -sh Assets/ 2>/dev/null || du -sh assets/ 2>/dev/null || echo "No assets folder found"`
- Build tools: !`which blender`; !`which ffmpeg`; !`which imagemagick`
- Platform targets: @ProjectSettings/ProjectSettings.asset or detect from build configs
- Version control: !`git lfs ls-files | wc -l` LFS-tracked files
## Task
Create an automated asset processing pipeline with optimization, validation, platform-specific delivery, and real-time monitoring for game development workflows.
## Asset Pipeline Components
### 1. Asset Import & Validation
- Automated asset format validation and standardization
- Quality assurance checks for texture resolution, model complexity
- Asset naming convention enforcement
- Metadata extraction and tagging system
- Source asset backup and version control integration
### 2. Multi-Platform Optimization
- Platform-specific texture compression (ASTC, DXT, etc.)
- Model LOD generation and optimization
- Audio format conversion and compression
- Shader variant compilation for target platforms
- Memory budget validation per platform
### 3. Build Integration
- Automated asset processing during build pipeline
- Incremental processing for modified assets only
- Asset bundle generation and packaging
- Dependency tracking and resolution
- Build-time asset validation and error reporting
### 4. Quality Assurance
- Visual diff comparison for texture changes
- Model geometry validation and optimization
- Audio quality and compression ratio analysis
- Performance impact assessment for new assets
- Automated regression testing for asset changes
## Processing Workflows
### Texture Processing Pipeline
- Import validation and format standardization
- Automatic mipmap generation and optimization
- Platform-specific compression with quality settings
- Memory usage estimation and optimization
- Integration with sprite atlasing and texture streaming
### 3D Model Processing Pipeline
- Import validation and mesh optimization
- Automatic LOD generation with configurable reduction ratios
- Bone and animation optimization
- Texture coordinate validation and optimization
- Collision mesh generation and validation
### Audio Processing Pipeline
- Format standardization and quality validation
- Platform-specific compression with bitrate optimization
- Audio asset tagging and categorization
- Streaming vs. loaded-in-memory recommendations
- Audio occlusion and spatialization preparation
### Animation Processing Pipeline
- Animation clip optimization and compression
- Keyframe reduction and smoothing
- Bone hierarchy validation and optimization
- Animation event validation and documentation
- Runtime performance impact analysis
## Deliverables
1. **Asset Processing Configuration**
- Platform-specific processing rules and settings
- Quality thresholds and validation criteria
- Automated workflow triggers and conditions
2. **Pipeline Implementation**
- Asset processing scripts and automation tools
- Build system integration and deployment
- Version control hooks and asset tracking
3. **Monitoring & Reporting**
- Asset processing performance metrics
- Quality assurance reports and validation results
- Platform compatibility and optimization reports
4. **Documentation & Guidelines**
- Asset creation guidelines for artists and designers
- Pipeline usage documentation and troubleshooting
- Performance impact guidelines and best practices
## Integration Guidelines
Implement pipeline with game engine-specific optimizations and industry standard tools. Ensure scalability for team collaboration and automated deployment workflows.
@@ -0,0 +1,77 @@
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [profile-type] | --fps | --memory | --rendering | --comprehensive
description: Use PROACTIVELY to analyze game performance bottlenecks and generate optimization recommendations across multiple platforms
---
# Game Performance Analysis & Optimization
Analyze game performance and generate optimization recommendations: $ARGUMENTS
## Current Performance Context
- Game engine: @package.json or detect Unity/Unreal/Godot project files
- Platform targets: !`find . -name "*.pbxproj" -o -name "*.gradle" -o -name "*.vcxproj" | head -3`
- Asset pipeline: !`find . -name "*.meta" -o -name "*.asset" | wc -l` game assets
- Build configs: !`grep -r "BuildTarget\|Platform" . 2>/dev/null | wc -l` platform configurations
- Performance logs: !`find . -name "*profile*" -o -name "*perf*" | head -5`
## Task
Create comprehensive performance analysis with automated bottleneck detection, optimization suggestions, and platform-specific recommendations for game development projects.
## Performance Analysis Areas
### 1. Frame Rate & Rendering Performance
- Analyze draw calls and batching efficiency
- Identify overdraw and fillrate bottlenecks
- Review shader complexity and optimization opportunities
- Evaluate mesh and texture optimization potential
- Check lighting and shadow rendering performance
### 2. Memory Usage Analysis
- Memory allocation patterns and potential leaks
- Texture memory usage and compression opportunities
- Audio memory optimization suggestions
- Object pooling and garbage collection analysis
- Platform-specific memory constraints evaluation
### 3. CPU Performance Profiling
- Script execution bottlenecks identification
- Physics simulation optimization opportunities
- AI and pathfinding performance analysis
- Animation system efficiency review
- Threading and parallelization recommendations
### 4. Platform-Specific Optimization
- Mobile performance considerations (battery, thermal throttling)
- Console-specific optimization guidelines
- PC hardware scaling recommendations
- VR performance requirements and optimizations
- Web/WebGL specific performance considerations
## Deliverables
1. **Performance Audit Report**
- Current performance metrics and benchmarks
- Identified bottlenecks with severity ratings
- Platform-specific performance analysis
2. **Optimization Recommendations**
- Prioritized optimization suggestions
- Implementation difficulty and impact assessment
- Code and asset optimization guidelines
3. **Monitoring Setup**
- Performance monitoring implementation
- Key metrics tracking configuration
- Automated performance regression detection
4. **Testing Strategy**
- Performance testing procedures
- Target device testing recommendations
- Continuous performance monitoring setup
## Implementation Guidelines
Follow game engine best practices and target platform requirements. Generate actionable recommendations with clear implementation steps and expected performance improvements.
@@ -0,0 +1,111 @@
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [test-type] | --unit | --integration | --performance | --automation | --comprehensive
description: Use PROACTIVELY to implement comprehensive game testing frameworks with automated validation, performance testing, and multi-platform verification
---
# Game Testing Framework & Automation
Implement comprehensive game testing framework: $ARGUMENTS
## Current Testing Context
- Game engine: @package.json or detect Unity/Unreal/Godot project files
- Existing tests: !`find . -name "*test*" -o -name "*Test*" | head -10`
- CI/CD setup: @.github/workflows/ or @.gitlab-ci.yml or @Jenkinsfile (if exists)
- Build configs: !`find . -name "*.sln" -o -name "*.csproj" -o -name "build.gradle" | head -3`
- Platform targets: !`grep -r "BuildTarget\|Platform\|Target" . 2>/dev/null | wc -l` target configurations
## Task
Create a comprehensive testing framework for game development with automated validation, performance benchmarks, cross-platform testing, and continuous integration.
## Testing Framework Components
### 1. Unit Testing Infrastructure
- Core game logic and mechanics testing
- Component-based testing for modular systems
- Mock and stub systems for external dependencies
- Data validation and serialization testing
- Mathematical calculations and algorithm verification
### 2. Integration Testing Suite
- Scene loading and transition testing
- Asset loading and management validation
- Save/load system integrity testing
- Networking and multiplayer functionality
- Platform-specific feature integration testing
### 3. Performance & Benchmarking
- Frame rate stability testing across scenarios
- Memory usage profiling and leak detection
- Loading time benchmarks for different content
- Stress testing with high entity counts
- Platform-specific performance validation
### 4. Automated Gameplay Testing
- AI behavior validation and regression testing
- User input simulation and response verification
- Game state progression and checkpoint validation
- Balance testing for game mechanics
- Procedural content generation validation
## Testing Categories
### Functional Testing
- Core gameplay mechanics validation
- User interface responsiveness and functionality
- Audio system integration and spatial audio
- Physics simulation accuracy and stability
- Animation system timing and blending
### Compatibility Testing
- Multi-platform build verification
- Device-specific feature testing (mobile, console, VR)
- Different screen resolutions and aspect ratios
- Hardware capability scaling and adaptation
- Operating system compatibility validation
### Regression Testing
- Automated testing for code changes impact
- Asset modification impact on game performance
- Save file compatibility across versions
- Feature functionality preservation
- Performance regression detection
### User Experience Testing
- Accessibility features validation
- Control scheme testing across input devices
- Localization and internationalization testing
- Tutorial and onboarding flow validation
- Error handling and recovery testing
## Deliverables
1. **Testing Framework Setup**
- Test runner configuration and automation
- Mock systems and test data generation
- Continuous integration pipeline integration
- Test reporting and metrics collection
2. **Test Suite Implementation**
- Unit tests for core game systems
- Integration tests for complex interactions
- Performance benchmarks and monitoring
- Automated gameplay validation scripts
3. **Platform Testing Strategy**
- Device-specific test configurations
- Cloud testing and device farm integration
- Performance validation across target platforms
- Compatibility testing automation
4. **Monitoring & Reporting**
- Test results dashboard and visualization
- Performance regression tracking
- Code coverage analysis and reporting
- Automated test failure investigation
## Implementation Guidelines
Integrate with game engine testing tools and establish CI/CD pipelines for automated testing. Ensure scalable test architecture that grows with project complexity and team size.
@@ -0,0 +1,189 @@
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: [project-name] | --2d | --3d | --mobile | --vr | --console
description: Use PROACTIVELY to set up professional Unity game development projects with industry-standard structure, essential packages, and platform-optimized configurations
---
# Unity Project Setup & Development Environment
Initialize professional Unity game development project: $ARGUMENTS
## Current Unity Environment
- Unity version: !`unity-editor --version 2>/dev/null || echo "Unity Editor not found"`
- Current directory: !`pwd`
- Available templates: !`find . -name "*.unitypackage" 2>/dev/null | wc -l` Unity packages
- Git status: !`git status --porcelain 2>/dev/null | wc -l` uncommitted changes
- System info: !`system_profiler SPSoftwareDataType | grep "System Version" 2>/dev/null || uname -a`
## Task
Set up a complete Unity project with professional development environment and platform-specific optimizations.
## What it creates:
### Project Structure
```
Assets/
├── _Project/
│ ├── Scripts/
│ │ ├── Managers/
│ │ ├── Player/
│ │ ├── UI/
│ │ ├── Gameplay/
│ │ └── Utilities/
│ ├── Art/
│ │ ├── Textures/
│ │ ├── Materials/
│ │ ├── Models/
│ │ └── Animations/
│ ├── Audio/
│ │ ├── Music/
│ │ ├── SFX/
│ │ └── Voice/
│ ├── Prefabs/
│ │ ├── Characters/
│ │ ├── Environment/
│ │ ├── UI/
│ │ └── Effects/
│ ├── Scenes/
│ │ ├── Development/
│ │ ├── Production/
│ │ └── Testing/
│ ├── Settings/
│ │ ├── Input/
│ │ ├── Rendering/
│ │ └── Audio/
│ └── Resources/
├── Plugins/
├── StreamingAssets/
└── Editor/
├── Scripts/
└── Resources/
```
### Essential Packages
- Universal Render Pipeline (URP)
- Input System
- Cinemachine
- ProBuilder
- Timeline
- Addressables
- Unity Analytics
- Version Control (if available)
### Project Settings
- Optimized quality settings for target platforms
- Input system configuration
- Physics settings
- Time and rendering configurations
- Build settings for multiple platforms
### Development Tools
- Code formatting rules (.editorconfig)
- Git configuration with Unity-optimized .gitignore
- Assembly definition files for better compilation
- Custom editor scripts for workflow improvement
### Version Control Setup
- Git repository initialization
- Unity-specific .gitignore
- LFS configuration for large assets
- Branching strategy documentation
## Usage:
```bash
npx claude-code-templates@latest --command unity-project-setup
```
## Interactive Options:
1. **Project Type Selection**
- 2D Game
- 3D Game
- Mobile Game
- VR/AR Game
- Hybrid (2D/3D)
2. **Target Platforms**
- PC (Windows/Mac/Linux)
- Mobile (iOS/Android)
- Console (PlayStation/Xbox/Nintendo)
- WebGL
- VR (Oculus/SteamVR)
3. **Version Control**
- Git
- Plastic SCM
- Perforce
- None
4. **Additional Packages**
- TextMeshPro
- Post Processing
- Unity Ads
- Unity Analytics
- Unity Cloud Build
- Custom package selection
## Generated Files:
### Core Scripts
- `GameManager.cs` - Main game controller
- `SceneLoader.cs` - Scene management system
- `AudioManager.cs` - Audio system controller
- `InputManager.cs` - Input handling system
- `UIManager.cs` - UI system manager
- `SaveSystem.cs` - Save/load functionality
### Editor Tools
- `ProjectSetupWindow.cs` - Custom editor window
- `SceneQuickStart.cs` - Scene setup automation
- `AssetValidator.cs` - Asset validation tools
- `BuildAutomation.cs` - Build pipeline helpers
### Configuration Files
- `ProjectSettings.asset` - Optimized project settings
- `QualitySettings.asset` - Multi-platform quality tiers
- `InputActions.inputactions` - Input system configuration
- `AssemblyDefinitions` - Modular compilation setup
### Documentation
- `README.md` - Project overview and setup instructions
- `CONTRIBUTING.md` - Development guidelines
- `CHANGELOG.md` - Version history template
- `API_REFERENCE.md` - Code documentation template
## Post-Setup Checklist:
- [ ] Review and adjust quality settings for target platforms
- [ ] Configure input actions for your game controls
- [ ] Set up build configurations for all target platforms
- [ ] Review folder structure and rename as needed
- [ ] Configure version control and make initial commit
- [ ] Set up continuous integration if required
- [ ] Configure analytics and crash reporting
- [ ] Review and customize coding standards
## Platform-Specific Configurations:
### Mobile
- Touch input configuration
- Performance optimization settings
- Battery usage optimization
- App store submission setup
### PC
- Multi-resolution support
- Keyboard/mouse input setup
- Graphics options menu template
- Windows/Mac/Linux build configs
### Console
- Platform-specific input mapping
- Achievement/trophy integration setup
- Online services configuration
- Certification requirement templates
This command creates a production-ready Unity project structure that scales from prototype to shipped game, following industry best practices and Unity's recommended patterns.