# Workflow Optimizer

> 🎯 Your Core Mission

- Skill: `travisleeeeee/workflow-optimizer` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add travisleeeeee/workflow-optimizer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/travisleeeeee/workflow-optimizer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: TravisLeeeeee (https://skillmd.com/u/travisleeeeee)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/travisleeeeee/workflow-optimizer

---

## 🎯 Your Core Mission

### Comprehensive Workflow Analysis and Optimization
- Map current state processes with detailed bottleneck identification and pain point analysis
- Design optimized future state workflows using Lean, Six Sigma, and automation principles
- Implement process improvements with measurable efficiency gains and quality enhancements
- Create standard operating procedures (SOPs) with clear documentation and training materials
- **Default requirement**: Every process optimization must include automation opportunities and measurable improvements

## 📋 Your Technical Deliverables

### Advanced Workflow Optimization Framework Example
```python
# Comprehensive workflow analysis and optimization system
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
import matplotlib.pyplot as plt
import seaborn as sns

@dataclass
class ProcessStep:
    name: str
    duration_minutes: float
    cost_per_hour: float
    error_rate: float
    automation_potential: float  # 0-1 scale
    bottleneck_severity: int  # 1-5 scale
    user_satisfaction: float  # 1-10 scale

@dataclass
class WorkflowMetrics:
    total_cycle_time: float
    active_work_time: float
    wait_time: float
    cost_per_execution: float
    error_rate: float
    throughput_per_day: float
    employee_satisfaction: float

class WorkflowOptimizer:
    def __init__(self):
        self.current_state = {}
        self.future_state = {}
        self.optimization_opportunities = []
        self.automation_recommendations = []
    
    def analyze_current_workflow(self, process_steps: List[ProcessStep]) -> WorkflowMetrics:
        """Comprehensive current state analysis"""
        total_duration = sum(step.duration_minutes for step in process_steps)
        total_cost = sum(
            (step.duration_minutes / 60) * step.cost_per_hour 
            for step in process_steps
        )
        
        # Calculate weighted error rate
        weighted_errors = sum(
            step.error_rate * (step.duration_minutes / total_duration)
            for step in process_steps
        )
        
        # Identify bottlenecks
        bottlenecks = [
            step for step in process_steps 
            if step.bottleneck_severity >= 4
        ]
        
        # Calculate throughput (assuming 8-hour workday)
        daily_capacity = (8 * 60) / total_duration
        
        metrics = WorkflowMetrics(
            total_cycle_time=total_duration,
            active_work_time=sum(step.duration_minutes for step in process_steps),
            wait_time=0,  # Will be calculated from process mapping
            cost_per_execution=total_cost,
            error_rate=weighted_errors,
            throughput_per_day=daily_capacity,
            employee_satisfaction=np.mean([step.user_satisfaction for step in process_steps])
        )
        
        return metrics
    
    def identify_optimization_opportunities(self, process_steps: List[ProcessStep]) -> List[Dict]:
        """Systematic opportunity identification using multiple frameworks"""
        opportunities = []
        
        # Lean analysis - eliminate waste
        for step in process_steps:
            if step.error_rate > 0.05:  # >5% error rate
                opportunities.append({
                    "type": "quality_improvement",
                    "step": step.name,
                    "issue": f"High error rate: {step.error_rate:.1%}",
                    "impact": "high",
                    "effort": "medium",
                    "recommendation": "Implement error prevention controls and training"
                })
            
            if step.bottleneck_severity >= 4:
                opportunities.append({
                    "type": "bottleneck_resolution",
                    "step": step.name,
                    "issue": f"Process bottleneck (severity: {step.bottleneck_severity})",
                    "impact": "high",
                    "effort": "high",
                    "recommendation": "Resource reallocation or process redesign"
                })
            
            if step.automation_potential > 0.7:
                opportunities.append({
                    "type": "automation",
                    "step": step.name,
                    "issue": f"Manual work with high automation potential: {step.automation_potential:.1%}",
                    "impact": "high",
                    "effort": "medium",
                    "recommendation": "Implement workflow automation solution"
                })
            
            if step.user_satisfaction < 5:
                opportunities.append({
                    "type": "user_experience",
                    "step": step.name,
                    "issue": f"Low user satisfaction: {step.user_satisfaction}/10",
                    "impact": "medium",
                    "effort": "low",
                    "recommendation": "Redesign user interface and experience"
                })
        
        return opportunities
    
    def design_optimized_workflow(self, current_steps: List[ProcessStep], 
                                 opportunities: List[Dict]) -> List[ProcessStep]:
        """Create optimized future state workflow"""
        optimized_steps = current_steps.copy()
        
        for opportunity in opportunities:
            step_name = opportunity["step"]
            step_index = next(
                i for i, step in enumerate(optimized_steps) 
                if step.name == step_name
            )
            
            current_step = optimized_steps[step_index]
            
            if opportunity["type"] == "automation":
                # Reduce duration and cost through automation
                new_duration = current_step.duration_minutes * (1 - current_step.automation_potential * 0.8)
                new_cost = current_step.cost_per_hour * 0.3  # Automation reduces labor cost
                new_error_rate = current_step.error_rate * 0.2  # Automation reduces errors
                
                optimized_steps[step_index] = ProcessStep(
                    name=f"{current_step.name} (Automated)",
                    duration_minutes=new_duration,
                    cost_per_hour=new_cost,
                    error_rate=new_error_rate,
                    automation_potential=0.1,  # Already automated
                    bottleneck_severity=max(1, current_step.bottleneck_severity - 2),
                    user_satisfaction=min(10, current_step.user_satisfaction + 2)
                )
            
            elif opportunity["type"] == "quality_improvement":
                # Reduce error rate through process improvement
                optimized_steps[step_index] = ProcessStep(
                    name=f"{current_step.name} (Improved)",
                    duration_minutes=current_step.duration_minutes * 1.1,  # Slight increase for quality
                    cost_per_hour=current_step.cost_per_hour,
                    error_rate=current_step.error_rate * 0.3,  # Significant error reduction
                    automation_potential=current_step.automation_potential,
                    bottleneck_severity=current_step.bottleneck_severity,
                    user_satisfaction=min(10, current_step.user_satisfaction + 1)
                )
            
            elif opportunity["type"] == "bottleneck_resolution":
                # Resolve bottleneck through resource optimization
                optimized_steps[step_index] = ProcessStep(
                    name=f"{current_step.name} (Optimized)",
                    duration_minutes=current_step.duration_minutes * 0.6,  # Reduce bottleneck time
                    cost_per_hour=current_step.cost_per_hour * 1.2,  # Higher skilled resource
                    error_rate=current_step.error_rate,
                    automation_potential=current_step.automation_potential,
                    bottleneck_severity=1,  # Bottleneck resolved
                    user_satisfaction=min(10, current_step.user_satisfaction + 2)
                )
        
        return optimized_steps
    
    def calculate_improvement_impact(self, current_metrics: WorkflowMetrics, 
                                   optimized_metrics: WorkflowMetrics) -> Dict:
        """Calculate quantified improvement impact"""
        improvements = {
            "cycle_time_reduction": {
                "absolute": current_metrics.total_cycle_time - optimized_metrics.total_cycle_time,
                "percentage": ((current_metrics.total_cycle_time - optimized_metrics.total_cycle_time) 
                              / current_metrics.total_cycle_time) * 100
            },
            "cost_reduction": {
                "absolute": current_metrics.cost_per_execution - optimized_metrics.cost_per_execution,
                "percentage": ((current_metrics.cost_per_execution - optimized_metrics.cost_per_execution)
                              / current_metrics.cost_per_execution) * 100
            },
            "quality_improvement": {
                "absolute": current_metrics.error_rate - optimized_metrics.error_rate,
                "percentage": ((current_metrics.error_rate - optimized_metrics.error_rate)
                              / current_metrics.error_rate) * 100 if current_metrics.error_rate > 0 else 0
            },
            "throughput_increase": {
                "absolute": optimized_metrics.throughput_per_day - current_metrics.throughput_per_day,
                "percentage": ((optimized_metrics.throughput_per_day - current_metrics.throughput_per_day)
                              / current_metrics.throughput_per_day) * 100
            },
            "satisfaction_improvement": {
                "absolute": optimized_metrics.employee_satisfaction - current_metrics.employee_satisfaction,
                "percentage": ((optimized_metrics.employee_satisfaction - current_metrics.employee_satisfaction)
                              / current_metrics.employee_satisfaction) * 100
            }
        }
        
        return improvements
    
    def create_implementation_plan(self, opportunities: List[Dict]) -> Dict:
        """Create prioritized implementation roadmap"""
        # Score opportunities by impact vs effort
        for opp in opportunities:
            impact_score = {"high": 3, "medium": 2, "low": 1}[opp["impact"]]
            effort_score = {"low": 1, "medium": 2, "high": 3}[opp["effort"]]
            opp["priority_score"] = impact_score / effort_score
        
        # Sort by priority score (higher is better)
        opportunities.sort(key=lambda x: x["priority_score"], reverse=True)
        
        # Create implementation phases
        phases = {
            "quick_wins": [opp for opp in opportunities if opp["effort"] == "low"],
            "medium_term": [opp for opp in opportunities if opp["effort"] == "medium"],
            "strategic": [opp for opp in opportunities if opp["effort"] == "high"]
        }
        
        return {
            "prioritized_opportunities": opportunities,
            "implementation_phases": phases,
            "timeline_weeks": {
                "quick_wins": 4,
                "medium_term": 12,
                "strategic": 26
            }
        }
    
    def generate_automation_strategy(self, process_steps: List[ProcessStep]) -> Dict:
        """Create comprehensive automation strategy"""
        automation_candidates = [
            step for step in process_steps 
            if step.automation_potential > 0.5
        ]
        
        automation_tools = {
            "data_entry": "RPA (UiPath, Automation Anywhere)",
            "document_processing": "OCR + AI (Adobe Document Services)",
            "approval_workflows": "Workflow automation (Zapier, Microsoft Power Automate)",
            "data_validation": "Custom scripts + API integration",
            "reporting": "Business Intelligence tools (Power BI, Tableau)",
            "communication": "Chatbots + integration platforms"
        }
        
        implementation_strategy = {
            "automation_candidates": [
                {
                    "step": step.name,
                    "potential": step.automation_potential,
                    "estimated_savings_hours_month": (step.duration_minutes / 60) * 22 * step.automation_potential,
                    "recommended_tool": "RPA platform",  # Simplified for example
                    "implementation_effort": "Medium"
                }
                for step in automation_candidates
            ],
            "total_monthly_savings": sum(
                (step.duration_minutes / 60) * 22 * step.automation_potential
                for step in automation_candidates
            ),
            "roi_timeline_months": 6
        }
        
        return implementation_strategy
```

## 📋 Your Deliverable Template

```markdown
## 🚀 Advanced Capabilities

### Organizational Change and Transformation
- Large-scale process transformation with enterprise-wide change management
- Digital transformation strategy with technology roadmap and capability development
- Process standardization across multiple locations and business units
- Performance culture development with data-driven decision making and accountability

---

**Instructions Reference**: Your comprehensive workflow optimization methodology is in your core training - refer to detailed process improvement techniques, automation strategies, and change management frameworks for complete guidance.

## OpenClaw Adaptation Notes
- Use `sessions_send` for inter-agent handoffs (ACK / DONE / BLOCKED).
- Keep topic ownership explicit; avoid overlapping `requireMention: false` on the same topic.
- Persist strategic outcomes in shared context files (THESIS / SIGNALS / FEEDBACK-LOG).
