auto-estimate-generator
Automatically generate estimates from QTO data. Apply pricing rules to BIM quantities for cost estimates.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/datadrivenconstruction/auto-estimate-generatorAuto Estimate Generator
Business Case
Problem Statement
Manual estimate creation challenges:
- Time-consuming quantity mapping
- Inconsistent pricing rules
- Errors in calculations
- Difficulty updating estimates
Solution
Automated estimate generation from BIM/QTO data using configurable pricing rules and assembly mappings.
Technical Implementation
import pandas as pd
from typing import Dict, Any, List, Optional, Callable
from dataclasses import dataclass, field
from enum import Enum
class ElementType(Enum):
WALL = "wall"
FLOOR = "floor"
CEILING = "ceiling"
DOOR = "door"
WINDOW = "window"
COLUMN = "column"
BEAM = "beam"
FOUNDATION = "foundation"
ROOF = "roof"
STAIR = "stair"
MEP = "mep"
@dataclass
class QTOItem:
element_id: str
element_type: ElementType
name: str
quantity: float
unit: str
properties: Dict[str, Any] = field(default_factory=dict)
@dataclass
class PricingRule:
rule_id: str
name: str
element_type: ElementType
conditions: Dict[str, Any] = field(default_factory=dict)
unit_cost: float = 0
assembly_code: str = ""
cost_breakdown: Dict[str, float] = field(default_factory=dict)
@dataclass
class EstimateItem:
qto_element_id: str
description: str
quantity: float
unit: str
unit_cost: float
total_cost: float
rule_applied: str
wbs_code: str = ""
class AutoEstimateGenerator:
"""Generate estimates from QTO data automatically."""
def __init__(self, project_name: str):
self.project_name = project_name
self.pricing_rules: List[PricingRule] = []
self.qto_items: List[QTOItem] = []
self.estimate_items: List[EstimateItem] = []
self.unmapped_items: List[QTOItem] = []
def add_pricing_rule(self, rule: PricingRule):
"""Add pricing rule."""
self.pricing_rules.append(rule)
def load_pricing_rules_from_df(self, df: pd.DataFrame):
"""Load pricing rules from DataFrame."""
for _, row in df.iterrows():
conditions = {}
if 'material' in row:
conditions['material'] = row['material']
if 'thickness_min' in row:
conditions['thickness_min'] = row['thickness_min']
if 'thickness_max' in row:
conditions['thickness_max'] = row['thickness_max']
rule = PricingRule(
rule_id=row['rule_id'],
name=row['name'],
element_type=ElementType(row['element_type'].lower()),
conditions=conditions,
unit_cost=float(row['unit_cost']),
assembly_code=row.get('assembly_code', ''),
cost_breakdown={
'labor': float(row.get('labor_pct', 0.4)),
'material': float(row.get('material_pct', 0.5...
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-datadrivenconstruction-auto-estimate-generator": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
data-lineage-tracker
Track data origin, transformations, and flow through construction systems. Essential for audit trails, compliance, and debugging data issues.
cwicr-cost-calculator
Calculate construction costs using DDC CWICR resource-based methodology. Break down costs into labor, materials, equipment with transparent pricing.
data-anomaly-detector
Detect anomalies and outliers in construction data: unusual costs, schedule variances, productivity spikes. Statistical and ML-based detection methods.
historical-cost-analyzer
Analyze historical construction costs for benchmarking, trend analysis, and estimating calibration. Compare projects, track escalation, identify patterns.
df-merger
Merge pandas DataFrames from multiple construction sources. Handle different schemas, keys, and data quality issues.