labor-rate
Calculate construction labor rates with overhead, benefits, and productivity factors. Regional rate databases and crew composition.
What this skill does
# Labor Rate Calculator
## Overview
Labor costs account for 30-50% of construction costs. This skill calculates all-in labor rates including wages, benefits, overhead, and regional adjustments.
## Python Implementation
```python
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from enum import Enum
class LaborCategory(Enum):
"""Labor skill categories."""
LABORER = "laborer"
CARPENTER = "carpenter"
ELECTRICIAN = "electrician"
PLUMBER = "plumber"
IRONWORKER = "ironworker"
MASON = "mason"
OPERATOR = "equipment_operator"
FOREMAN = "foreman"
SUPERINTENDENT = "superintendent"
class WorkType(Enum):
"""Work type for productivity."""
NEW_CONSTRUCTION = "new"
RENOVATION = "renovation"
DEMOLITION = "demolition"
MAINTENANCE = "maintenance"
@dataclass
class LaborRate:
"""Complete labor rate breakdown."""
category: str
base_wage: float
benefits: float
taxes: float
insurance: float
overhead: float
profit: float
total_rate: float
unit: str = "hour"
@dataclass
class CrewComposition:
"""Crew composition for work."""
name: str
workers: List[Dict[str, Any]]
total_hourly_cost: float
output_per_hour: float
unit: str
class LaborRateCalculator:
"""Calculate construction labor rates."""
# Default burden rates (percent of base wage)
DEFAULT_BURDENS = {
'benefits': 0.30, # Health, pension, vacation
'taxes': 0.10, # FICA, unemployment
'insurance': 0.08, # Workers comp, liability
'overhead': 0.15, # General conditions
'profit': 0.10 # Contractor profit
}
# Base wages by category (USD/hour, US average)
BASE_WAGES = {
LaborCategory.LABORER: 22,
LaborCategory.CARPENTER: 32,
LaborCategory.ELECTRICIAN: 38,
LaborCategory.PLUMBER: 36,
LaborCategory.IRONWORKER: 35,
LaborCategory.MASON: 34,
LaborCategory.OPERATOR: 40,
LaborCategory.FOREMAN: 45,
LaborCategory.SUPERINTENDENT: 55
}
# Regional factors
REGIONAL_FACTORS = {
'US_National': 1.00,
'New_York': 1.45,
'San_Francisco': 1.40,
'Chicago': 1.15,
'Houston': 0.95,
'Atlanta': 0.90,
'Germany_Berlin': 1.20,
'UK_London': 1.35
}
def __init__(self, burden_rates: Dict[str, float] = None):
self.burdens = burden_rates or self.DEFAULT_BURDENS
def calculate_rate(self, category: LaborCategory,
region: str = 'US_National',
custom_wage: float = None) -> LaborRate:
"""Calculate all-in labor rate."""
# Get base wage
base = custom_wage or self.BASE_WAGES.get(category, 25)
# Apply regional factor
regional_factor = self.REGIONAL_FACTORS.get(region, 1.0)
base *= regional_factor
# Calculate burden components
benefits = base * self.burdens['benefits']
taxes = base * self.burdens['taxes']
insurance = base * self.burdens['insurance']
# Subtotal before markup
subtotal = base + benefits + taxes + insurance
# Overhead and profit
overhead = subtotal * self.burdens['overhead']
profit = (subtotal + overhead) * self.burdens['profit']
total = subtotal + overhead + profit
return LaborRate(
category=category.value,
base_wage=round(base, 2),
benefits=round(benefits, 2),
taxes=round(taxes, 2),
insurance=round(insurance, 2),
overhead=round(overhead, 2),
profit=round(profit, 2),
total_rate=round(total, 2)
)
def calculate_crew_cost(self, composition: Dict[LaborCategory, int],
region: str = 'US_National') -> float:
"""Calculate hourly cost for crew composition."""
total = 0
for category, count in composition.items():
rate = self.calculate_rate(category, region)
total += rate.total_rate * count
return round(total, 2)
def get_rate_table(self, region: str = 'US_National') -> pd.DataFrame:
"""Generate rate table for all categories."""
rates = []
for category in LaborCategory:
rate = self.calculate_rate(category, region)
rates.append({
'category': rate.category,
'base_wage': rate.base_wage,
'benefits': rate.benefits,
'taxes': rate.taxes,
'insurance': rate.insurance,
'overhead': rate.overhead,
'profit': rate.profit,
'total_rate': rate.total_rate
})
return pd.DataFrame(rates)
class ProductivityFactor:
"""Calculate productivity factors for labor."""
# Base productivity factors
WORK_TYPE_FACTORS = {
WorkType.NEW_CONSTRUCTION: 1.0,
WorkType.RENOVATION: 0.75,
WorkType.DEMOLITION: 0.90,
WorkType.MAINTENANCE: 0.65
}
# Condition factors
CONDITION_FACTORS = {
'ideal': 1.0,
'normal': 0.90,
'difficult': 0.75,
'hazardous': 0.60,
'confined_space': 0.50
}
# Weather factors
WEATHER_FACTORS = {
'clear': 1.0,
'hot': 0.85,
'cold': 0.80,
'rain': 0.60,
'wind': 0.75
}
def calculate_factor(self, work_type: WorkType,
condition: str = 'normal',
weather: str = 'clear',
overtime_hours: int = 0) -> float:
"""Calculate combined productivity factor."""
base = self.WORK_TYPE_FACTORS.get(work_type, 1.0)
cond = self.CONDITION_FACTORS.get(condition, 0.9)
weath = self.WEATHER_FACTORS.get(weather, 1.0)
# Overtime degradation (productivity drops after 8 hours)
overtime_factor = 1.0
if overtime_hours > 0:
# Each OT hour is ~15% less productive
overtime_factor = 1 - (overtime_hours * 0.015)
combined = base * cond * weath * overtime_factor
return round(max(combined, 0.3), 2) # Minimum 30% productivity
def adjust_labor_hours(self, base_hours: float,
work_type: WorkType,
condition: str = 'normal',
weather: str = 'clear') -> float:
"""Adjust labor hours for conditions."""
factor = self.calculate_factor(work_type, condition, weather)
return round(base_hours / factor, 1)
class CrewBuilder:
"""Build and optimize crew compositions."""
# Standard crew compositions
STANDARD_CREWS = {
'concrete_pour': {
LaborCategory.FOREMAN: 1,
LaborCategory.CARPENTER: 2,
LaborCategory.LABORER: 4,
LaborCategory.OPERATOR: 1
},
'framing': {
LaborCategory.FOREMAN: 1,
LaborCategory.CARPENTER: 4,
LaborCategory.LABORER: 2
},
'electrical_rough': {
LaborCategory.FOREMAN: 1,
LaborCategory.ELECTRICIAN: 3,
LaborCategory.LABORER: 1
},
'plumbing_rough': {
LaborCategory.FOREMAN: 1,
LaborCategory.PLUMBER: 2,
LaborCategory.LABORER: 1
},
'masonry': {
LaborCategory.FOREMAN: 1,
LaborCategory.MASON: 4,
LaborCategory.LABORER: 4
}
}
def __init__(self, rate_calculator: LaborRateCalculator):
self.calc = rate_calculator
def get_crew(self, work_type: str,
region: str = 'US_National') -> CrewComposition:
"""Get standard crew composition with costs."""
if work_type not in self.STANDARD_CREWS:
raise ValueError(f"Unknown work type: {work_type}")
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.