cwicr-escalation
БесплатноБез исполняемых скриптовНе проверенApply price escalation to CWICR estimates over time. Calculate inflation adjustments, material price indices, and labor rate increases.
от datadrivenconstruction★ 461 звезда на GitHubОб этом скилле
CWICR Escalation Calculator
Business Case
Problem Statement
Construction costs change over time:
- Inflation affects all costs
- Material prices fluctuate
- Labor rates increase annually
- Long projects need escalation
Solution
Time-based cost escalation using historical indices, projected rates, and category-specific escalation factors.
Business Value
- Future pricing - Estimate costs at construction time
- Budget planning - Account for inflation
- Contract pricing - Escalation clauses
- Historical analysis - Adjust past costs to current
Technical Implementation
import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass
from datetime import datetime, date
from dateutil.relativedelta import relativedelta
from enum import Enum
class EscalationType(Enum):
"""Types of escalation."""
LABOR = "labor"
MATERIAL = "material"
EQUIPMENT = "equipment"
GENERAL = "general"
@dataclass
class EscalationIndex:
"""Escalation index for a period."""
period: str # YYYY-MM
labor_index: float
material_index: float
equipment_index: float
general_index: float
@dataclass
class EscalationResult:
"""Result of escalation calculation."""
base_cost: float
base_date: date
target_date: date
months: int
escalation_rate: float
escalation_amount: float
escalated_cost: float
by_category: Dict[str, Dict[str, float]]
# Historical escalation rates (annual %)
HISTORICAL_RATES = {
2020: {'labor': 2.5, 'material': 1.8, 'equipment': 1.5, 'general': 2.0},
2021: {'labor': 3.2, 'material': 8.5, 'equipment': 2.0, 'general': 4.5},
2022: {'labor': 4.5, 'material': 12.0, 'equipment': 3.5, 'general': 7.0},
2023: {'labor': 4.0, 'material': 5.0, 'equipment': 3.0, 'general': 4.0},
2024: {'labor': 3.5, 'material': 3.0, 'equipment': 2.5, 'general': 3.0},
2025: {'labor': 3.0, 'material': 2.5, 'equipment': 2.0, 'general': 2.5},
}
# Material-specific escalation factors
MATERIAL_ESCALATION = {
'steel': 1.20, # Higher volatility
'lumber': 1.30, # High volatility
'concrete': 0.90, # Lower volatility
'copper': 1.25, # Commodity driven
'aluminum': 1.15,
'plastic': 1.10,
'glass': 0.95,
'default': 1.00
}
class CWICREscalation:
"""Calculate cost escalation over time."""
def __init__(self,
cwicr_data: pd.DataFrame = None,
custom_rates: Dict[int, Dict[str, float]] = None):
self.cost_data = cwicr_data
self.rates = custom_rates or HISTORICAL_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_rate(self,
year: int,
category: EscalationType = EscalationType.GENERAL) -> float:
"""Get escalation rate for year and category."""
year_rates = self.rates.get(year, self.rates.get(max(self.rates.keys())))
return year_rates.get(category.value, year_rates.get('general', 3.0))
def calculate_compound_factor(self,
base_date: date,
target_date: date,
category: EscalationType = EscalationType.GENERAL) -> float:
"""Calculate compound escalation factor between dates."""
if target_date <= base_date:
return 1.0
factor = 1.0
current = base_date
while current < target_date:
year = current.year
annual_rate = self.get_rate(year, category) / 100
# Calculate months in this year
year_end = date(year + 1, 1, 1)
if target_date < year_end:
months = (target_date.year - current.year) * 12 + target_date.month - current.month
else:
months = (year_end.year - current.year) * 12 + year_end.month - current.month
# Apply monthly compound rate
monthly_rate = (1 + annual_rate) ** (1/12) - 1
factor *= (1 + monthly_rate) ** months
current = year_end
return factor
def escalate_cost(self,
base_cost: float,
base_date: date,
target_date: date,
cost_breakdown: Dict[str, float] = None) -> EscalationResult:
"""Escalate cost from base date to target date."""
if cost_breakdown is None:
cost_breakdown = {
'labor': base_cost * 0.40,
'material': base_cost * 0.45,
'equipment': base_cost * 0.15
}
months = (target_date.year - base_date.year) * 12 + target_date.mont
Установить cwicr-escalation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cwicr-escalation?
Apply price escalation to CWICR estimates over time. Calculate inflation adjustments, material price indices, and labor rate increases.
Как установить скилл cwicr-escalation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cwicr-escalation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic