scenario-planner
БесплатноБез исполняемых скриптовНе проверенWhat-if analysis for construction projects: model different scenarios and their cost/schedule/resource impacts. Compare alternatives and optimize decisions.
от datadrivenconstruction★ 461 звезда на GitHubОб этом скилле
Scenario Planner for Construction
Overview
Model different project scenarios to understand their impacts on cost, schedule, and resources. Compare alternatives, optimize decisions, and prepare for contingencies.
Business Case
Construction decisions require understanding trade-offs:
- Design Alternatives: Which option is most cost-effective?
- Schedule Compression: What's the cost of accelerating?
- Resource Options: In-house vs. subcontractor?
- Risk Scenarios: What if materials increase 20%?
Technical Implementation
from dataclasses import dataclass, field
from typing import List, Dict, Any, Optional, Callable
from datetime import datetime, timedelta
import pandas as pd
import numpy as np
from copy import deepcopy
@dataclass
class ScenarioParameter:
name: str
base_value: float
unit: str
min_value: Optional[float] = None
max_value: Optional[float] = None
description: str = ""
@dataclass
class Scenario:
id: str
name: str
description: str
parameters: Dict[str, float]
created_at: datetime = field(default_factory=datetime.now)
@dataclass
class ScenarioResult:
scenario_id: str
scenario_name: str
total_cost: float
total_duration: int # days
resource_requirements: Dict[str, float]
risk_score: float
key_metrics: Dict[str, float]
warnings: List[str]
comparison_to_base: Dict[str, float]
@dataclass
class SensitivityResult:
parameter: str
values_tested: List[float]
cost_impacts: List[float]
duration_impacts: List[float]
sensitivity_score: float
class ConstructionScenarioPlanner:
"""Scenario planning and what-if analysis for construction."""
def __init__(self, base_project: Dict):
self.base_project = base_project
self.parameters: Dict[str, ScenarioParameter] = {}
self.scenarios: Dict[str, Scenario] = {}
self.results: Dict[str, ScenarioResult] = {}
self.cost_model: Optional[Callable] = None
self.duration_model: Optional[Callable] = None
self._setup_default_parameters()
def _setup_default_parameters(self):
"""Setup common construction scenario parameters."""
default_params = [
ScenarioParameter("labor_rate", 75, "$/hr", 50, 150, "Average labor rate"),
ScenarioParameter("material_escalation", 0, "%", -10, 30, "Material cost change"),
ScenarioParameter("productivity_factor", 1.0, "x", 0.5, 1.5, "Labor productivity multiplier"),
ScenarioParameter("overtime_percentage", 0, "%", 0, 50, "Overtime work percentage"),
ScenarioParameter("crew_size", 10, "workers", 5, 50, "Average crew size"),
ScenarioParameter("work_days_per_week", 5, "days", 5, 7, "Working days per week"),
ScenarioParameter("contingency_percentage", 10, "%", 5, 25, "Cost contingency"),
ScenarioParameter("weather_delay_days", 0, "days", 0, 60, "Expected weather delays"),
ScenarioParameter("permit_delay_days", 0, "days", 0, 90, "Expected permit delays"),
ScenarioParameter("subcontractor_markup", 15, "%", 10, 30, "Subcontractor markup"),
]
for param in default_params:
self.parameters[param.name] = param
def add_parameter(self, param: ScenarioParameter):
"""Add custom parameter."""
self.parameters[param.name] = param
def set_cost_model(self, model: Callable):
"""Set custom cost calculation model."""
self.cost_model = model
def set_duration_model(self, model: Callable):
"""Set custom duration calculation model."""
self.duration_model = model
def create_scenario(self, name: str, description: str,
parameter_changes: Dict[str, float]) -> Scenario:
"""Create a new scenario with parameter modifications."""
# Start with base values
params = {p.name: p.base_value for p in self.parameters.values()}
# Apply changes
for param_name, value in parameter_changes.items():
if param_name in params:
params[param_name] = value
else:
raise ValueError(f"Unknown parameter: {param_name}")
scenario = Scenario(
id=f"SCN-{len(self.scenarios) + 1:03d}",
name=name,
description=description,
parameters=params
)
self.scenarios[scenario.id] = scenario
return scenario
def calculate_cost(self, params: Dict[str, float]) -> float:
"""Calculate total project cost based on parameters."""
if self.cost_model:
return self.cost_model(self.base_project, params)
# Default cost model
base_cost = self.base_project.get('base_cost', 1000000)
# Labor adjustments
labor_factor = params['labor_rate'] / 75 # Normalized to base rate
productivity_impact = 1 / params['productivity_factor']
overtime_p
Установить scenario-planner в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл scenario-planner?
What-if analysis for construction projects: model different scenarios and their cost/schedule/resource impacts. Compare alternatives and optimize decisions.
Как установить скилл scenario-planner?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл scenario-planner запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic