Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计通过

labor-rate劳动率

Agent Skill

labor-rate 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

396

周安装

16

GitHub Stars

111

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:labor-rate(劳动率)
来源仓库:https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction
仓库路径:skills/labor-rate
安装命令:
npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill labor-rate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill labor-rate

简介

labor-rate 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

  • 适用于代码仓库管理、Issue 跟踪和协作流程梳理等开发场景。
  • 通过 npx skills add 命令从 ddc_skills_for_ai_agents_in_construction 仓库安装并使用该技能。
  • 安装前需确认权限范围和维护状态,注意是否会触发联网或命令执行操作。
  • 建议结合原始 README 文档了解具体功能和使用限制。

SKILL.md

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

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}")

        composition = self.STANDARD_CREWS[work_type]
        total_cost = self.calc.calculate_crew_cost(composition, region)

        workers = []
        for category, count in composition.items():
            rate = self.calc.calculate_rate(category, region)
            workers.append({
                'category': category.value,
                'count': count,
                'hourly_rate': rate.total_rate,
                'subtotal': rate.total_rate * count
            })

        return CrewComposition(
            name=work_type,
            workers=workers,
            total_hourly_cost=total_cost,
            output_per_hour=1.0,  # Placeholder
            unit='hour'
        )

    def custom_crew(self, workers: Dict[LaborCategory, int],
                    region: str = 'US_National') -> CrewComposition:
        """Build custom crew composition."""

        total_cost = self.calc.calculate_crew_cost(workers, region)

        worker_list = []
        for category, count in workers.items():
            rate = self.calc.calculate_rate(category, region)
            worker_list.append({
                'category': category.value,
                'count': count,
                'hourly_rate': rate.total_rate,
                'subtotal': rate.total_rate * count
            })

        return CrewComposition(
            name='custom',
            workers=worker_list,
            total_hourly_cost=total_cost,
            output_per_hour=1.0,
            unit='hour'
        )

Quick Start

calc = LaborRateCalculator()

# Get single rate
rate = calc.calculate_rate(LaborCategory.CARPENTER, region='New_York')
print(f"Carpenter rate NYC: ${rate.total_rate}/hr")

# Rate table
rates = calc.get_rate_table('US_National')
print(rates)

Common Use Cases

1. Crew Cost

builder = CrewBuilder(calc)
concrete_crew = builder.get_crew('concrete_pour', 'Chicago')
print(f"Crew cost: ${concrete_crew.total_hourly_cost}/hr")

2. Productivity Adjustment

productivity = ProductivityFactor()
factor = productivity.calculate_factor(
    WorkType.RENOVATION,
    condition='difficult',
    weather='hot'
)
adjusted_hours = productivity.adjust_labor_hours(100, WorkType.RENOVATION)

Resources

  • DDC Book: Chapter 3.1 - Resource-Based Costing

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.51%
按下载量换算47

Claude

28.04%
按下载量换算35

Cursor

18.58%
按下载量换算23

Gemini CLI

10.46%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills