Skip to main content
skill CX Codex

bid-analysis-comparator — Claude Code skill: bid scoring

bid-analysis-comparator scores contractor bids against weighted criteria, ranks them by total and writes the comparison to an Excel file.

MIT 143 installs ★ 434 updated 2026-10-19

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill bid-analysis-comparator -a claude-code
Open on GitHub

What bid-analysis-comparator does

Bids live in a small Python class: bidder name, base price, alternates, status. Six criteria ship preset — price at 0.35, experience 0.20, schedule 0.15, with safety record, references and capacity splitting the rest. Scores run from 0 to 10 and each one is multiplied by its weight before it counts.

get_recommendation puts the top scorer next to the cheapest bid, so you can tell whether the best proposal also has the lowest price. export_analysis writes an .xlsx workbook: a Comparison sheet ordered by total score and a Details sheet carrying each bidder's exclusions and qualifications.

The skill declares python3 as its binary, though the code also imports pandas and the Excel write runs through openpyxl — leave that one out and the export stops. Criteria and weights are set when the comparator starts, so a tender with different priorities needs the criteria list edited first or the totals answer the wrong question.

What it helps with

  • rank five electrical bids on one scale
  • catch scope gaps hidden in a bidder's exclusions
  • get a weighted total without retyping scores into a sheet
  • show the client where cheap stops being good value
  • hand over one workbook with the ranking and per-bidder detail

Example prompts for the agent

  • Score both electrical bids on the six criteria and tell me which bidder comes out on top.
  • Re-score the second bidder with 9 for experience and 9 for references, then show me the new ranking.
  • Export the comparison to bids.xlsx and keep exclusions and qualifications on the Details sheet.

How to install bid-analysis-comparator

1Skills CLI (Vercel)

npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill bid-analysis-comparator -a claude-code

2Manually: put the files in place

~/.claude/skills/bid-analysis-comparator/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/bid-analysis-comparator/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about bid-analysis-comparator

How do I install bid-analysis-comparator in Claude Code?

Run npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill bid-analysis-comparator -a claude-code; the skill file then sits at ~/.claude/skills/bid-analysis-comparator/SKILL.md.

What does bid-analysis-comparator do?

It scores bids on six weighted criteria, reports the highest total alongside the lowest price, and exports the comparison to Excel.

What do I need to run it?

python3, plus pandas for the score table and openpyxl for writing the .xlsx file.

Source text

SKILL.md · MIT
---
name: "bid-analysis-comparator"
description: "Compare and analyze contractor bids. Score proposals, identify scope gaps, and recommend selections."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw": {"emoji": "🛒", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}
---
# Bid Analysis Comparator

## Business Case

Bid evaluation requires systematic comparison across multiple criteria. This skill provides structured bid analysis and scoring.

## Technical Implementation

```python
import pandas as pd
from datetime import date
from typing import Dict, Any, List
from dataclasses import dataclass, field
from enum import Enum


class BidStatus(Enum):
    RECEIVED = "received"
    UNDER_REVIEW = "under_review"
    SHORTLISTED = "shortlisted"
    AWARDED = "awarded"
    REJECTED = "rejected"


@dataclass
class EvaluationCriteria:
    name: str
    weight: float  # 0-1
    max_score: int = 10


@dataclass
class BidScore:
    criteria: str
    score: int
    notes: str = ""


@dataclass
class Bid:
    bid_id: str
    bidder_name: str
    bid_package: str
    submitted_date: date
    base_bid: float
    alternates: Dict[str, float]
    status: BidStatus
    scores: List[BidScore] = field(default_factory=list)
    qualifications: List[str] = field(default_factory=list)
    exclusions: List[str] = field(default_factory=list)

    @property
    def total_weighted_score(self) -> float:
        return sum(s.score for s in self.scores)


class BidAnalysisComparator:
    def __init__(self, project_name: str, bid_package: str):
        self.project_name = project_name
        self.bid_package = bid_package
        self.bids: Dict[str, Bid] = {}
        self.criteria: List[EvaluationCriteria] = []
        self._setup_default_criteria()
        self._counter = 0

    def _setup_default_criteria(self):
        self.criteria = [
            EvaluationCriteria("Price", 0.35),
            EvaluationCriteria("Experience", 0.20),
            EvaluationCriteria("Schedule", 0.15),
            EvaluationCriteria("Safety Record", 0.10),
            EvaluationCriteria("References", 0.10),
            EvaluationCriteria("Capacity", 0.10)
        ]

    def add_bid(self, bidder_name: str, base_bid: float,
               submitted_date: date = None,
               alternates: Dict[str, float] = None) -> Bid:
        self._counter += 1
        bid_id = f"BID-{self._counter:03d}"

        bid = Bid(
            bid_id=bid_id,
            bidder_name=bidder_name,
            bid_package=self.bid_package,
            submitted_date=submitted_date or date.today(),
            base_bid=base_bid,
            alternates=alternates or {},
            status=BidStatus.RECEIVED
        )
        self.bids[bid_id] = bid
        return bid

    def score_bid(self, bid_id: str, scores: Dict[str, int]):
        """Score bid on criteria. scores = {'Price': 8, 'Experience': 7, ...}"""
        if bid_id not in self.bids:
            return
        bid = self.bids[bid_id]
        bid.scores = []
        for criteria, score in scores.items():
            bid.scores.append(BidScore(criteria, score))
        bid.status = BidStatus.UNDER_REVIEW

    def calculate_weighted_scores(self) -> pd.DataFrame:
        """Calculate weighted scores for all bids."""
        results = []
        criteria_weights = {c.name: c.weight for c in self.criteria}

        for bid in self.bids.values():
            row = {
                'Bidder': bid.bidder_name,
                'Base Bid': bid.base_bid,
                'Status': bid.status.value
            }
            total = 0
            for score in bid.scores:
                weight = criteria_weights.get(score.criteria, 0)
                weighted = score.score * weight * 10
                row[score.criteria] = score.score
                row[f'{score.criteria} (W)'] = round(weighted, 1)
                total += weighted
            row['Total Score'] = round(total, 1)
            results.append(row)

        return pd.DataFrame(results).sort_values('Total Score', ascending=False)

    def get_recommendation(self) -> Dict[str, Any]:
        """Get bid recommendation."""
        df = self.calculate_weighted_scores()
        if df.empty:
            return {'recommendation': 'No bids to evaluate'}

        top = df.iloc[0]
        lowest = df.sort_values('Base Bid').iloc[0]

        return {
            'highest_score': {
                'bidder': top['Bidder'],
                'score': top['Total Score'],
                'bid': top['Base Bid']
            },
            'lowest_price': {
                'bidder': lowest['Bidder'],
                'bid': lowest['Base Bid']
            },
            'total_bids': len(self.bids),
            'recommendation': top['Bidder']
        }

    def export_analysis(self, output_path: str):
        df = self.calculate_weighted_scores()
        with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
            df.to_excel(writer, sheet_name='Comparison', index=False)

            # Bid details
            details = [{
                'Bidder': b.bidder_name,
                'Bid': b.base_bid,
                'Exclusions': '; '.join(b.exclusions),
                'Qualifications': '; '.join(b.qualifications)
            } for b in self.bids.values()]
            pd.DataFrame(details).to_excel(writer, sheet_name='Details', index=False)
```

## Quick Start

```python
comparator = BidAnalysisComparator("Office Tower", "Electrical")

bid1 = comparator.add_bid("ABC Electric", 850000)
bid2 = comparator.add_bid("XYZ Electric", 920000)

comparator.score_bid(bid1.bid_id, {'Price': 9, 'Experience': 7, 'Schedule': 8,
                                   'Safety Record': 8, 'References': 7, 'Capacity': 8})
comparator.score_bid(bid2.bid_id, {'Price': 7, 'Experience': 9, 'Schedule': 7,
                                   'Safety Record': 9, 'References': 9, 'Capacity': 9})

recommendation = comparator.get_recommendation()
print(f"Recommended: {recommendation['recommendation']}")
```

## Resources
- **DDC Book**: Chapter 3.4 - Procurement

© datadrivenconstruction · MIT · datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction

Similar skills

All skills for Office documents →

From the same set156

The whole set →
batch-cad-converter batch-cad-converter is a Claude Code skill that converts CAD/BIM files in batches and tracks progress. It runs on requests to process Revit, IFC, DWG, or DGN files. CX Codex +1 146installs bim-cost-estimation-cwicr bim-cost-estimation-cwicr is a Claude Code skill that estimates construction costs from BIM models using the DDC CWICR database. The agent uses it to price work from Revit or IFC data. CX Codex +1 146installs qto-report qto-report extracts volumes, areas, and element counts from BIM and CAD exports, groups quantities, and calculates cost estimates. Useful for building quantity take-offs. CX Codex +1 143installs bim-validation-pipeline The bim-validation-pipeline skill helps validate IFC models for geometry, property, relationship, and naming issues. Use it to check model data against project requirements. CX Codex +1 143installs rvt-to-ifc rvt-to-ifc converts Revit RVT models into open IFC format without an Autodesk license. Supports IFC2x3, IFC4, and IFC4.3 schemas with batch processing. CX Codex +1 143installs critical-path-analyzer critical-path-analyzer analyzes project schedule networks to calculate the critical path, determine float values, and identify near-critical tasks that risk delaying deadlines. CX Codex +1 141installs drone-site-survey drone-site-survey processes drone survey data for construction sites: generates orthomosaics, calculates stockpile volumes, and links survey data with BIM models. CX Codex +1 141installs budget-variance-analyzer budget-variance-analyzer is a skill for Claude Code that compares budget figures with actual costs, flags overruns, and forecasts a project's final cost. It tracks spending variances by project line item. CX Codex +1 139installs

Project sponsors

Companies that keep this analytics open