cwicr-crew-optimizer

cwicr-crew-optimizer is a skill for Claude Code, Codex from datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction. It costs 30 tokens per session (3,537 once invoked), scanned A, original, MIT.

A construction workforce planning tool based on CWICR labor norms, which are productivity guidelines for construction work. It models worker types and trades to help choose a suitable crew.

In plain words
What is it for?
Use it to plan construction crews, compare worker mixes, avoid overstaffing, match trades and skill levels to work, and support schedule planning.
Why use it?
It addresses the difficulty of balancing crew size, labor cost, expected output, required skills, and project deadlines.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to plan construction crews, compare worker mixes, avoid overstaffing, match trades and skill levels to work, and support schedule planning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-crew-optimizer
Clone the repo
git clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cwicr-crew-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer/github.svg)](https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer)
Your own site
<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cwicr-crew-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/cwicr-crew-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.03537
Opus 5 $0.00015 $0.01768
Sonnet 5 $0.00006 $0.00707
Haiku 4.5 $0.00003 $0.00354

Measured 12d ago against content hash 05220feb7827, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cwicr-crew-optimizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

1_DDC_Toolkit/CWICR-Database/cwicr-crew-optimizer/SKILL.md · 443 lines

How it starts

The opening of the file, as written. The whole thing — 443 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CWICR Crew Optimizer

Business Case

Problem Statement

Crew planning challenges:

  • Right mix of workers?
  • Optimal crew size?
  • Balance cost vs productivity?
  • Match skills to work?

Solution

Optimize crew composition using CWICR labor productivity data to balance cost, output, and skill requirements.

Business Value

  • Optimal productivity - Right-sized crews
  • Cost efficiency - No overstaffing
  • Skill matching - Proper worker mix
  • Schedule support - Meet deadlines

Technical Implementation

import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from enum import Enum
from datetime import date, timedelta


class WorkerType(Enum):
    """Types of workers."""
    FOREMAN = "foreman"
    JOURNEYMAN = "journeyman"
    APPRENTICE = "apprentice"
    LABORER = "laborer"
    OPERATOR = "operator"
    HELPER = "helper"


class Trade(Enum):
    """Construction trades."""
    CONCRETE = "concrete"
    CARPENTRY = "carpentry"
    MASONRY = "masonry"
    STEEL = "steel"
    ELECTRICAL = "electrical"
    PLUMBING = "plumbing"
    HVAC = "hvac"
    PAINTING = "painting"
    ROOFING = "roofing"
    GENERAL = "general"


@dataclass
class Worker:
    """Worker definition."""
    worker_type: WorkerType
    trade: Trade
    hourly_rate: float
    productivity_factor: float = 1.0
    overtime_multiplier: float = 1.5


@dataclass
class CrewComposition:
    """Crew composition."""
    name: str
    trade: Trade
    workers: List[Tuple[WorkerType, int]]  # (type, count)
    base_productivity: float  # Output per hour
    hourly_cost: float
    daily_output: float


@dataclass
class CrewOptimizationResult:
    """Result of crew optimization."""
    work_item: str
    quantity: float
    unit: str
    recommended_crew: CrewComposition
    alternative_crews: List[CrewComposition]
    duration_days: float
    total_labor_cost: float
    cost_per_unit: float


# Standard crew compositions
STANDARD_CREWS = {
    'concrete_small': {
        'trade': Trade.CONCRETE,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 2), (WorkerType.LABORER, 2)],
        'productivity': 1.0
    },
    'concrete_large': {
        'trade': Trade.CONCRETE,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 4), (WorkerType.LABORER, 4), (WorkerType.OPERATOR, 1)],
        'productivity': 1.8
    },
    'masonry_standard': {
        'trade': Trade.MASONRY,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 2), (WorkerType.HELPER, 2)],
        'productivity': 1.0
    },
    'carpentry_framing': {
        'trade': Trade.CARPENTRY,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 3), (WorkerType.APPRENTICE, 1)],
        'productivity': 1.0
    },
    'electrical_rough': {
        'trade': Trade.ELECTRICAL,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 2), (WorkerType.APPRENTICE, 1)],
        'productivity': 1.0
    },
    'plumbing_rough': {
        'trade': Trade.PLUMBING,
        'workers': [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 2), (WorkerType.APPRENTICE, 1)],
        'productivity': 1.0
    }
}

# Default hourly rates by worker type
DEFAULT_RATES = {
    WorkerType.FOREMAN: 65,
    WorkerType.JOURNEYMAN: 55,
    WorkerType.APPRENTICE: 35,
    WorkerType.LABORER: 30,
    WorkerType.OPERATOR: 60,
    WorkerType.HELPER: 28
}


class CWICRCrewOptimizer:
    """Optimize crew composition using CWICR data."""

    HOURS_PER_DAY = 8

    def __init__(self,
                 cwicr_data: pd.DataFrame = None,
                 custom_rates: Dict[WorkerType, float] = None):
        self.cost_data = cwicr_data
        self.rates = custom_rates or DEFAULT_RATES
        if cwicr_data is not None:
            self._index_data()

    def _index_data(self):
        """Index cost data."""
        if 'work_item_code' in self.cost_data.columns:
            self._code_index = self.cost_data.set_index('work_item_code')
        else:
            self._code_index = None

    def get_labor_norm(self, code: str) -> Tuple[float, str]:
        """Get labor hours per unit from CWICR."""
        if self._code_index is None or code not in self._code_index.index:
            return (1.0, 'unit')

        item = self._code_index.loc[code]
        norm = float(item.get('labor_norm', item.get('labor_hours', 1)) or 1)
        unit = str(item.get('unit', 'unit'))

        return (norm, unit)

    def calculate_crew_cost(self, workers: List[Tuple[WorkerType, int]]) -> float:
        """Calculate hourly cost of crew."""
        total = 0
        for worker_type, count in workers:
            rate = self.rates.get(worker_type, 40)
            total += rate * count
        return total

    def build_crew(self,
                   name: str,
                   trade: Trade,
                   workers: List[Tuple[WorkerType, int]],
                   base_productivity: float = 1.0) -> CrewComposition:
        """Build crew composition."""

        hourly_cost = self.calculate_crew_cost(workers)
        daily_output = base_productivity * self.HOURS_PER_DAY

        return CrewComposition(
            name=name,
            trade=trade,
            workers=workers,
            base_productivity=base_productivity,
            hourly_cost=hourly_cost,
            daily_output=daily_output
        )

    def optimize_for_work(self,
                           work_item_code: str,
                           quantity: float,
                           target_days: int = None,
                           max_crew_size: int = 10) -> CrewOptimizationResult:
        """Optimize crew for specific work item."""

        labor_norm, unit = self.get_labor_norm(work_item_code)
        total_hours = quantity * labor_norm

        # Detect trade from code
        trade = self._detect_trade(work_item_code)

        # Generate crew options
        crews = []

        # Small crew
        small_workers = [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 2), (WorkerType.LABORER, 1)]
        small_crew = self.build_crew("Small Crew", trade, small_workers, 1.0)
        crews.append(small_crew)

        # Medium crew
        med_workers = [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 3), (WorkerType.LABORER, 2)]
        med_crew = self.build_crew("Medium Crew", trade, med_workers, 1.4)
        crews.append(med_crew)

        # Large crew
        large_workers = [(WorkerType.FOREMAN, 1), (WorkerType.JOURNEYMAN, 5), (WorkerType.LABORER, 3)]
        large_crew = self.build_crew("Large Crew", trade, large_workers, 2.0)
        crews.append(large_crew)

        # Calculate metrics for each crew
        results = []
        for crew in crews:
            # Adjusted productivity considering crew efficiency
            crew_workers = sum(count for _, count in crew.workers)
            efficiency = self._crew_efficiency(crew_workers)

            effective_productivity = crew.base_productivity * efficiency
            hours_needed = total_hours / effective_productivity
            days_needed = hours_needed / self.HOURS_PER_DAY
            labor_cost = hours_needed * crew.hourly_cost
            cost_per_unit = labor_cost / quantity if quantity > 0 else 0

            results.append({
                'crew': crew,
                'days': days_needed,
                'cost': labor_cost,
                'cost_per_unit': cost_per_unit,
                'efficiency': efficiency
            })

        # Select best crew based on target
        if target_days:
            # Find crew that meets target with lowest cost
            valid = [r for r in results if r['days'] <= target_days]
            if valid:
                best = min(valid, key=lambda x: x['cost'])
            else:
                best = min(results, key=lambda x: x['days'])
        else:
            # Optimize for cost
            best = min(results, key=lambda x: x['cost'])

        recommended = best['crew']
        alternatives = [r['crew'] for r in results if r['crew'] != recommended]

        return CrewOptimizationResult(
            work_item=work_item_code,
            quantity=quantity,
            unit=unit,
            recommended_crew=recommended,
            alternative_crews=alternatives,
            duration_days=round(best['days'], 1),
            total_labor_cost=round(best['cost'], 2),
            cost_per_unit=round(best['cost_per_unit'], 2)
        )

    def _detect_trade(self, code: str) -> Trade:
        """Detect trade from work item code."""
        code_lower = code.lower()

        trade_map = {
            'conc': Trade.CONCRETE,
            'carp': Trade.CARPENTRY,
            'mason': Trade.MASONRY,
            'steel': Trade.STEEL,
            'strl': Trade.STEEL,
            'elec': Trade.ELECTRICAL,
            'plumb': Trade.PLUMBING,
            'hvac': Trade.HVAC,
            'paint': Trade.PAINTING,
            'roof': Trade.ROOFING
        }

        for key, trade in trade_map.items():
            if key in code_lower:
                return trade

        return Trade.GENERAL

    def _crew_efficiency(self, crew_size: int) -> float:
        """Calculate crew efficiency based on size (law of diminishing returns)."""
        if crew_size <= 4:
            return 1.0
        elif crew_size <= 6:
            return 0.95
        elif crew_size <= 8:
            return 0.90
        elif crew_size <= 10:
            return 0.85
        else:
            return 0.80

    def analyze_overtime(self,
                          result: CrewOptimizationResult,
                          available_days: int,
                          max_overtime_hours: float = 2) -> Dict[str, Any]:
        """Analyze if overtime can meet schedule."""

        if result.duration_days <= available_days:
            return {
                'overtime_needed': False,
                'regular_days': result.duration_days,
                'overtime_hours': 0,
                'overtime_cost': 0,
                'total_cost': result.total_labor_cost
            }

        # Calculate overtime needed
        regular_hours = available_days * self.HOURS_PER_DAY
        total_hours_available = available_days * (self.HOURS_PER_DAY + max_overtime_hours)

        labor_norm, _ = self.get_labor_norm(result.work_item)
        total_hours_needed = result.quantity * labor_norm / result.recommended_crew.base_productivity

        if total_hours_needed > total_hours_available:
            # Can't meet schedule even with overtime
            overtime_hours = available_days * max_overtime_hours
            shortage = total_hours_needed - total_hours_available
        else:
            overtime_hours = total_hours_needed - regular_hours
            shortage = 0

        overtime_cost = overtime_hours * result.recommended_crew.hourly_cost * 1.5

        return {
            'overtime_needed': True,
            'regular_days': available_days,
            'overtime_hours_per_day': max_overtime_hours,
            'total_overtime_hours': round(overtime_hours, 1),
            'overtime_cost': round(overtime_cost, 2),
            'total_cost': round(result.total_labor_cost + overtime_cost, 2),
            'shortage_hours': round(shortage, 1) if shortage > 0 else 0,
            'can_meet_schedule': shortage == 0
        }

    def export_crew_plan(self,
                          results: List[CrewOptimizationResult],
                          output_path: str) -> str:
        """Export crew plan to Excel."""

        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
            # Summary
            summary_data = []
            for r in results:
                workers_str = ", ".join(f"{count}x {wt.value}" for wt, count in r.recommended_crew.workers)
                summary_data.append({
                    'Work Item': r.work_item,
                    'Quantity': r.quantity,
                    'Unit': r.unit,
                    'Crew': r.recommended_crew.name,
                    'Workers': workers_str,
                    'Duration Days': r.duration_days,
                    'Labor Cost': r.total_labor_cost,
                    'Cost/Unit': r.cost_per_unit
                })

            summary_df = pd.DataFrame(summary_data)
            summary_df.to_excel(writer, sheet_name='Crew Plan', index=False)

            # Totals
            totals_df = pd.DataFrame([{
                'Total Duration': max(r.duration_days for r in results),
                'Total Labor Cost': sum(r.total_labor_cost for r in results)
            }])
            totals_df.to_excel(writer, sheet_name='Totals', index=False)

        return output_path

Read the full file on GitHub · 443 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 443 lines · 30 tokens per session scan A 05220feb7827

Subscribe to this mod's changes

cwicr-crew-optimizer is a skill published in the GitHub repository datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction (308 stars, last pushed 20d ago), licensed MIT. It adds 30 tokens to every session and 3,537 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

catchup

Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.

oliver-kriska/claude-elixir-phoenix · 48 tokens

plan

Plan features spanning multiple domains: billing (Stripe), auth (RBAC), real-time (Presence), webhooks, jobs (Oban). Use when designing interconnected systems or converting review findings into tasks.

oliver-kriska/claude-elixir-phoenix · 42 tokens

work

Execute Elixir/Phoenix plan tasks with progress tracking. Use after /phx:plan to implement features with mix compile and mix test verification after each step, or --continue to resume interrupted work.

oliver-kriska/claude-elixir-phoenix · 43 tokens

phx-deps-update

Bump outdated Hex deps — inventory, snapshot changelogs, update, fix breaks, split reviewable PRs (patches bundled, majors solo). Use to upgrade/bump Elixir dependencies or when versions fall behind. NOT for deps.get failures (phx-investigate).

oliver-kriska/claude-elixir-phoenix · 62 tokens

timeline-creator

Create HTML timelines and project roadmaps with Gantt charts, milestones, phase groupings, and progress indicators. Use when users request timelines, roadmaps, Gantt charts, project schedules, or milestone visualizations.

mhattingpete/claude-skills-marketplace · 47 tokens

project-health

All-in-one project configuration and health management. Sets up new projects (settings.local.json, CLAUDE.md, .gitignore), audits existing projects (permissions, context quality, MCP coverage, leaked secrets, stale docs), tidies accumulated cruft, captures session learnings, and adds permission presets. Uses…

jezweb/claude-skills · 126 tokens