cwicr-comparison-tool
FreeNo executable scriptsNot checkedCompare cost estimates across projects, versions, and scenarios. Identify variances, benchmark against standards, and generate comparison reports.
by datadrivenconstruction★ 461 GitHub starsAbout this skill
CWICR Comparison Tool
Business Case
Problem Statement
Project stakeholders need to compare:
- Alternative design options
- Estimate versions over time
- Projects against benchmarks
- Actual vs estimated costs
Solution
Structured comparison of CWICR-based estimates with variance analysis, benchmarking, and visual reporting.
Business Value
- Decision support - Compare alternatives objectively
- Version control - Track estimate evolution
- Benchmarking - Compare against standards
- Audit - Document estimate changes
Technical Implementation
import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
class ComparisonType(Enum):
"""Types of comparisons."""
VERSION = "version" # Same project, different versions
ALTERNATIVE = "alternative" # Same project, design alternatives
BENCHMARK = "benchmark" # Project vs standard/benchmark
ACTUAL = "actual" # Estimate vs actual costs
PROJECT = "project" # Different projects
class VarianceSignificance(Enum):
"""Significance level of variance."""
CRITICAL = "critical" # >20% variance
HIGH = "high" # 10-20%
MEDIUM = "medium" # 5-10%
LOW = "low" # <5%
NONE = "none" # No variance
@dataclass
class ComparisonItem:
"""Single item comparison."""
work_item_code: str
description: str
base_quantity: float
base_cost: float
compare_quantity: float
compare_cost: float
quantity_variance: float
quantity_variance_pct: float
cost_variance: float
cost_variance_pct: float
significance: VarianceSignificance
@dataclass
class ComparisonResult:
"""Complete comparison result."""
comparison_type: ComparisonType
base_name: str
compare_name: str
base_total: float
compare_total: float
total_variance: float
total_variance_pct: float
items: List[ComparisonItem]
summary_by_category: Dict[str, Dict[str, float]]
created_at: datetime
class CWICRComparisonTool:
"""Compare CWICR-based estimates."""
SIGNIFICANCE_THRESHOLDS = {
VarianceSignificance.CRITICAL: 0.20,
VarianceSignificance.HIGH: 0.10,
VarianceSignificance.MEDIUM: 0.05,
VarianceSignificance.LOW: 0.01
}
def __init__(self):
pass
def _get_significance(self, variance_pct: float) -> VarianceSignificance:
"""Determine variance significance."""
abs_var = abs(variance_pct) / 100
if abs_var >= self.SIGNIFICANCE_THRESHOLDS[VarianceSignificance.CRITICAL]:
return VarianceSignificance.CRITICAL
elif abs_var >= self.SIGNIFICANCE_THRESHOLDS[VarianceSignificance.HIGH]:
return VarianceSignificance.HIGH
elif abs_var >= self.SIGNIFICANCE_THRESHOLDS[VarianceSignificance.MEDIUM]:
return VarianceSignificance.MEDIUM
elif abs_var >= self.SIGNIFICANCE_THRESHOLDS[VarianceSignificance.LOW]:
return VarianceSignificance.LOW
else:
return VarianceSignificance.NONE
def compare_estimates(self,
base_df: pd.DataFrame,
compare_df: pd.DataFrame,
base_name: str = "Base",
compare_name: str = "Compare",
comparison_type: ComparisonType = ComparisonType.VERSION,
code_column: str = 'work_item_code',
quantity_column: str = 'quantity',
cost_column: str = 'total_cost') -> ComparisonResult:
"""Compare two estimates."""
# Merge on code
merged = base_df.merge(
compare_df,
on=code_column,
how='outer',
suffixes=('_base', '_compare')
)
items = []
for _, row in merged.iterrows():
base_qty = float(row.get(f'{quantity_column}_base', 0) or 0)
base_cost = float(row.get(f'{cost_column}_base', 0) or 0)
compare_qty = float(row.get(f'{quantity_column}_compare', 0) or 0)
compare_cost = float(row.get(f'{cost_column}_compare', 0) or 0)
qty_variance = compare_qty - base_qty
qty_variance_pct = (qty_variance / base_qty * 100) if base_qty > 0 else (100 if compare_qty > 0 else 0)
cost_variance = compare_cost - base_cost
cost_variance_pct = (cost_variance / base_cost * 100) if base_cost > 0 else (100 if compare_cost > 0 else 0)
items.append(ComparisonItem(
work_item_code=str(row.get(code_column, '')),
description=str(row.get('description_base', row.get('description_compare', ''))),
base_quantity=base_qty,
base_cost=base_cost,
compare_quantity=compare_qty,
Install cwicr-comparison-tool in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the cwicr-comparison-tool skill do?
Compare cost estimates across projects, versions, and scenarios. Identify variances, benchmark against standards, and generate comparison reports.
How do I install the cwicr-comparison-tool skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the cwicr-comparison-tool skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
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…
by 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…
by 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…
by 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…
by Anthropic