Skip to content
Development
Command

/team-workload-balancer

Balance team workload distribution

From plugin
claude-command-suite
1.4k199 skills89 agents199 commands
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-code

Command definition

team-workload-balancer.md

team-workload-balancer

Balance team workload distribution

Purpose

This command analyzes team members' current workloads, skills, past performance, and availability to suggest optimal task assignments. It helps prevent burnout, ensures balanced distribution, and matches tasks to team members' strengths.

Usage

# Show current team workload
claude "Show workload balance for the engineering team"

# Suggest optimal assignment for new tasks
claude "Who should work on the new payment integration task?"

# Rebalance current sprint
claude "Rebalance tasks in the current sprint for optimal distribution"

# Capacity planning for next sprint
claude "Plan task assignments for next sprint based on team capacity"

Instructions

1. Gather Team Data

Collect information about team members:

class TeamAnalyzer {
  async gatherTeamData() {
    const team = {};
    
    // Get team members from Linear
    const teamMembers = await linear.getTeamMembers();
    
    for (const member of teamMembers) {
      team[member.id] = {
        name: member.name,
        email: member.email,
        currentTasks: [],
        completedTasks: [],
        skills: new Set(),
        velocity: 0,
        availability: 100, // percentage
        preferences: {},
        strengths: [],
        timeZone: member.timeZone
      };
      
      // Get current assignments
      const activeTasks = await linear.getUserTasks(member.id, {
        filter: { state: ['in_progress', 'todo'] }
      });
      team[member.id].currentTasks = activeTasks;
      
      // Get historical data
      const completedTasks = await linear.getUserTasks(member.id, {
        filter: { state: 'done' },
        since: '3 months ago'
      });
      team[member.id].completedTasks = completedTasks;
      
      // Analyze git contributions
      const gitStats = await this.analyzeGitContributions(member.email);
      team[member.id].skills = gitStats.technologies;
      team[member.id].codeContributions = gitStats.contributions;
    }
    
    return team;
  }
  
  async analyzeGitContributions(email) {
    // Get commit history
    const commits = await exec(`git log --author="${email}" --since="6 months ago" --pretty=format:"%H"`);
    const commitHashes = commits.split('\n').filter(Boolean);
    
    const stats = {
      technologies: new Set(),
      contributions: {
        frontend: 0,
        backend: 0,
        database: 0,
        devops: 0,
        testing: 0,
        documentation: 0
      },
      filesChanged: new Map()
    };
    
    // Analyze each commit
    for (const hash of commitHashes.slice(0, 100)) { // Limit to recent 100 commits
      const files = await exec(`git show --name-only --pretty=format: ${hash}`);
      const fileList = files.split('\n').filter(Boolean);
      
      for (const file of fileList) {
        // Track technologies
        if (file.match(/\.(js|jsx|ts|tsx)$/)) stats.technologies.add('JavaScript');
        if (file.match(/\.(py)$/)) stats.technologies.add('Python');
        if (file.match(/\.(java)$/)) stats.technologies.add('Java');
        if (file.match(/\.(go)$/)) stats.technologies.add('Go');
        
        // Categorize contributions
        if (file.match(/\/(components|views|pages|frontend)\//)) stats.contributions.frontend++;
        if (file.match(/\/(api|server|backend|services)\//)) stats.contributions.backend++;
        if (file.match(/\/(migrations|schemas|models)\//)) stats.contributions.database++;
        if (file.match(/\/(deploy|docker|k8s|.github)\//)) stats.contributions.devops++;
        if (file.match(/\.(test|spec)\./)) stats.contributions.testing++;
        if (file.match(/\.(md|docs)\//)) stats.contributions.documentation++;
        
        // Track file expertise
        stats.filesChanged.set(file, (stats.filesChanged.get(file) || 0) + 1);
      }
    }
    
    return stats;
  }
}

2. Calculate Workload Metrics

Analyze current workload distribution:

class WorkloadCalculator {
  calculateWorkload(teamMember) {
    const metrics = {
      currentPoints: 0,
      currentTasks: teamMember.currentTasks.length,
      inProgressPoints: 0,
      todoPoints: 0,
      blockedTasks: 0,
      overdueTasksk: 0,
      workloadScore: 0, // 0-100
      capacity: 0
    };
    
    // Sum story points
    for (const task of teamMember.currentTasks) {
      const points = task.estimate || 3; // Default to 3 if no estimate
      metrics.currentPoints += points;
      
      if (task.state === 'in_progress') {
        metrics.inProgressPoints += points;
      } else if (task.state === 'todo') {
        metrics.todoPoints += points;
      }
      
      if (task.blockedBy?.length > 0) {
        metrics.blockedTasks++;
      }
      
      if (task.dueDate && new Date(task.dueDate) < new Date()) {
        metrics.overdueTasksk++;
      }
    }
    
    // Calculate velocity from historical data
    const velocity = this.calculateVelocity(teamMember.completedTasks);
    
    // Calculate workload score (0-100)
    // Higher score = more overloaded
    metrics.workloadScore = Math.min(100, (metrics.currentPoints / velocity.average) * 100);
    
    // Calculate remaining capacity
    metrics.capacity = Math.max(0, velocity.average - metrics.currentPoints);
    
    // Adjust for blocked tasks
    if (metrics.blockedTasks > 0) {
      metrics.workloadScore *= 1.2; // Increase workload score for blocked work
    }
    
    return metrics;
  }
  
  calculateVelocity(completedTasks) {
    // Group by sprint/week
    const tasksByWeek = new Map();
    
    for (const task of completedTasks) {
      const weekKey = this.getWeekKey(task.completedAt);
      if (!tasksByWeek.has(weekKey)) {
        tasksByWeek.set(weekKey, []);
      }
      tasksByWeek.get(weekKey).push(task);
    }
    
    // Calculate points per week
    const weeklyPoints = [];
    for (const [week, tasks] of tasksByWeek) {
      const points = tasks.reduce((sum, t) => sum
Read more
@qdhenry
Ships withclaude-command-suite

A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.

1.4k12 skills89 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.4k
Star history of qdhenry/Claude-Command-Suite on GitHub, a chart by star-history.com

Other commands on claude-command-suite.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command