Token导航 LogoToken导航

Agent Skill · 研究检索

contractor-matching-ai(承包商匹配 AI)

contractor-matching-ai 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

contractor-matching-ai 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,679。

总安装 470周安装 19GitHub Stars 113下载 147核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:contractor-matching-ai(承包商匹配 AI)
来源仓库:https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction
仓库路径:skills/contractor-matching-ai
安装命令:
npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill contractor-matching-ai
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill contractor-matching-ai

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

contractor-matching-ai 基于多维度指标为建设项目匹配合适承包商。适合在 Codex、Claude、Cursor、Gemini CLI 中筛选合格分包商、评估履约能力或优化供应链时使用。综合技术能力、过往绩效、资质、地理位置与报价进行加权评分。需输入项目需求、权重偏好与候选名单,模型输出排序推荐。

结果仅供参考,实际选择仍需结合实地考察与商务谈判确定。

来源仓库内路径:skills/contractor-matching-ai

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agent…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

contractor-matching-ai 怎么安装?

在终端执行 npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_const…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

contractor-matching-ai 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

contractor-matching-ai 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

contractor-matching-ai 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

contractor-matching-ai 用的人多吗?

公开数据是累计安装 470 次,近一周安装 19 次,下载 147 次,GitHub 113 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

contractor-matching-ai 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
contractor-matching-ai

承包商匹配 AI · 本页

470113需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

AI Contractor Matching

Overview

This skill implements AI-powered contractor matching for construction projects. Analyze project requirements against contractor capabilities, track historical performance, and generate recommendations based on multiple criteria.

Matching Criteria:

  • Technical capabilities & expertise
  • Past performance scores
  • Certifications & licenses
  • Geographic availability
  • Capacity & current workload
  • Pricing competitiveness
  • Safety records

Quick Start

from dataclasses import dataclass, field
from typing import List, Dict, Optional
from datetime import date
import numpy as np

@dataclass
class Contractor:
    contractor_id: str
    name: str
    specializations: List[str]
    certifications: List[str]
    performance_score: float  # 0-100
    safety_score: float  # 0-100
    regions: List[str]
    capacity_available: float  # 0-100 percentage
    avg_bid_variance: float  # % above/below average

@dataclass
class ProjectRequirement:
    project_id: str
    work_types: List[str]
    required_certs: List[str]
    region: str
    estimated_value: float
    priority: str  # cost, quality, speed, safety

def match_contractors(project: ProjectRequirement,
                     contractors: List[Contractor],
                     top_n: int = 5) -> List[Dict]:
    """Simple contractor matching"""
    scores = []

    for c in contractors:
        # Check basic eligibility
        if project.region not in c.regions:
            continue

        work_match = len(set(project.work_types) & set(c.specializations))
        if work_match == 0:
            continue

        cert_match = len(set(project.required_certs) & set(c.certifications))
        if cert_match < len(project.required_certs):
            continue

        # Calculate score based on priority
        if project.priority == 'quality':
            score = c.performance_score * 0.6 + (100 - abs(c.avg_bid_variance)) * 0.2 + c.capacity_available * 0.2
        elif project.priority == 'cost':
            score = (100 - c.avg_bid_variance) * 0.5 + c.performance_score * 0.3 + c.capacity_available * 0.2
        elif project.priority == 'safety':
            score = c.safety_score * 0.6 + c.performance_score * 0.3 + c.capacity_available * 0.1
        else:  # speed
            score = c.capacity_available * 0.5 + c.performance_score * 0.3 + c.safety_score * 0.2

        scores.append({
            'contractor': c,
            'score': score,
            'work_match': work_match / len(project.work_types),
            'cert_match': cert_match / len(project.required_certs) if project.required_certs else 1.0
        })

    # Sort and return top matches
    scores.sort(key=lambda x: x['score'], reverse=True)
    return scores[:top_n]

# Example
contractors = [
    Contractor("C001", "ABC Builders", ["concrete", "structural"], ["ISO9001", "OHSAS18001"],
              85, 90, ["Moscow", "SPB"], 60, -5),
    Contractor("C002", "XYZ Construction", ["concrete", "finishing"], ["ISO9001"],
              78, 85, ["Moscow"], 80, 10),
]

project = ProjectRequirement("P001", ["concrete"], ["ISO9001"], "Moscow", 1000000, "quality")
matches = match_contractors(project, contractors)
for m in matches:
    print(f"{m['contractor'].name}: Score {m['score']:.1f}")

Comprehensive Matching System

Contractor Profile Management

from dataclasses import dataclass, field
from typing import List, Dict, Optional, Tuple
from datetime import date, datetime
from enum import Enum
import numpy as np
from sklearn.preprocessing import MinMaxScaler

class ContractorSize(Enum):
    MICRO = "micro"  # < 10 employees
    SMALL = "small"  # 10-50 employees
    MEDIUM = "medium"  # 50-250 employees
    LARGE = "large"  # > 250 employees

class WorkCategory(Enum):
    GENERAL = "general_contractor"
    CONCRETE = "concrete"
    STRUCTURAL_STEEL = "structural_steel"
    MEP = "mep"
    ELECTRICAL = "electrical"
    PLUMBING = "plumbing"
    HVAC = "hvac"
    FINISHING = "finishing"
    FACADE = "facade"
    ROOFING = "roofing"
    EXCAVATION = "excavation"
    FOUNDATION = "foundation"
    LANDSCAPING = "landscaping"
    DEMOLITION = "demolition"

@dataclass
class ProjectReference:
    project_name: str
    client: str
    value: float
    completion_date: date
    work_type: str
    performance_rating: float  # 1-5
    on_time: bool
    on_budget: bool
    client_reference_available: bool

@dataclass
class ContractorProfile:
    contractor_id: str
    company_name: str
    legal_name: str
    registration_number: str
    size: ContractorSize
    founded_year: int
    employees_count: int

    # Capabilities
    specializations: List[WorkCategory]
    equipment_owned: List[str]
    max_project_value: float
    min_project_value: float

    # Certifications
    certifications: List[Dict]  # {name, issuer, valid_until}
    licenses: List[Dict]  # {type, number, region, valid_until}

    # Performance
    completed_projects: int
    active_projects: int
    references: List[ProjectReference] = field(default_factory=list)

    # Safety
    safety_certifications: List[str] = field(default_factory=list)
    incident_rate: float = 0.0  # incidents per 1000 work hours
    fatality_count: int = 0
    lost_time_incidents: int = 0

    # Financial
    annual_revenue: float = 0
    credit_rating: str = ""
    insurance_coverage: float = 0
    bonding_capacity: float = 0

    # Geographic
    headquarters_region: str = ""
    operating_regions: List[str] = field(default_factory=list)
    willing_to_travel: bool = False

    # Current status
    current_workload_pct: float = 0  # 0-100
    earliest_availability: Optional[date] = None

    # Pricing
    historical_bid_data: List[Dict] = field(default_factory=list)

    def calculate_performance_score(self) -> float:
        """Calculate overall performance score"""
        if not self.references:
            return 50.0  # Default for new contractors

        ratings = [r.performance_rating for r in self.references]
        on_time_rate = sum(1 for r in self.references if r.on_time) / len(self.references)
        on_budget_rate = sum(1 for r in self.references if r.on_budget) / len(self.references)

        # Weighted average
        avg_rating = sum(ratings) / len(ratings) / 5 * 100  # Normalize to 0-100
        on_time_score = on_time_rate * 100
        on_budget_score = on_budget_rate * 100

        return avg_rating * 0.5 + on_time_score * 0.3 + on_budget_score * 0.2

    def calculate_safety_score(self) -> float:
        """Calculate safety score"""
        base_score = 100

        # Deductions
        if self.incident_rate > 0:
            base_score -= min(30, self.incident_rate * 10)
        if self.fatality_count > 0:
            base_score -= 50  # Major deduction for fatalities
        if self.lost_time_incidents > 0:
            base_score -= min(20, self.lost_time_incidents * 2)

        # Bonuses for certifications
        if 'ISO45001' in self.safety_certifications or 'OHSAS18001' in self.safety_certifications:
            base_score += 10

        return max(0, min(100, base_score))

    def get_capacity_score(self) -> float:
        """Calculate available capacity score"""
        return 100 - self.current_workload_pct

AI Matching Engine

from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import TfidfVectorizer
import pandas as pd

@dataclass
class ProjectRequirements:
    project_id: str
    project_name: str
    work_categories: List[WorkCategory]
    required_certifications: List[str]
    required_licenses: List[str]
    region: str
    estimated_value: float
    start_date: date
    duration_months: int
    priority_weights: Dict[str, float] = field(default_factory=dict)
    special_requirements: List[str] = field(default_factory=list)

    def __post_init__(self):
        if not self.priority_weights:
            self.priority_weights = {
                'performance': 0.25,
                'safety': 0.20,
                'price': 0.20,
                'capacity': 0.15,
                'experience': 0.10,
                'financial': 0.10
            }

class ContractorMatchingEngine:
    """AI-powered contractor matching system"""

    def __init__(self):
        self.contractors: Dict[str, ContractorProfile] = {}
        self.vectorizer = TfidfVectorizer(ngram_range=(1, 2))
        self.scaler = MinMaxScaler()

    def register_contractor(self, profile: ContractorProfile):
        """Register contractor in the system"""
        self.contractors[profile.contractor_id] = profile

    def find_matches(self, requirements: ProjectRequirements,
                    top_n: int = 10) -> List[Dict]:
        """Find best matching contractors for project"""
        eligible = self._filter_eligible(requirements)

        if not eligible:
            return []

        scored = []
        for contractor in eligible:
            score, breakdown = self._calculate_match_score(contractor, requirements)
            scored.append({
                'contractor_id': contractor.contractor_id,
                'company_name': contractor.company_name,
                'total_score': score,
                'score_breakdown': breakdown,
                'profile': contractor
            })

        # Sort by score
        scored.sort(key=lambda x: x['total_score'], reverse=True)

        return scored[:top_n]

    def _filter_eligible(self, req: ProjectRequirements) -> List[ContractorProfile]:
        """Filter contractors by basic eligibility"""
        eligible = []

        for contractor in self.contractors.values():
            # Check region
            if req.region not in contractor.operating_regions:
                if not contractor.willing_to_travel:
                    continue

            # Check work categories
            contractor_cats = set(contractor.specializations)
            required_cats = set(req.work_categories)
            if not required_cats.intersection(contractor_cats):
                continue

            # Check project size
            if req.estimated_value > contractor.max_project_value:
                continue
            if req.estimated_value < contractor.min_project_value:
                continue

            # Check certifications
            contractor_certs = set(c['name'] for c in contractor.certifications
                                  if c.get('valid_until', date.max) >= date.today())
            if not set(req.required_certifications).issubset(contractor_certs):
                continue

            # Check licenses
            contractor_licenses = set(l['type'] for l in contractor.licenses
                                     if l.get('valid_until', date.max) >= date.today())
            if not set(req.required_licenses).issubset(contractor_licenses):
                continue

            # Check capacity
            if contractor.current_workload_pct >= 95:  # Too busy
                continue

            # Check availability
            if contractor.earliest_availability and contractor.earliest_availability > req.start_date:
                continue

            eligible.append(contractor)

        return eligible

    def _calculate_match_score(self, contractor: ContractorProfile,
                              req: ProjectRequirements) -> Tuple[float, Dict]:
        """Calculate weighted match score"""
        weights = req.priority_weights
        breakdown = {}

        # Performance score
        breakdown['performance'] = contractor.calculate_performance_score()

        # Safety score
        breakdown['safety'] = contractor.calculate_safety_score()

        # Price competitiveness (from historical data)
        breakdown['price'] = self._calculate_price_score(contractor, req)

        # Capacity score
        breakdown['capacity'] = contractor.get_capacity_score()

        # Experience score (similar projects)
        breakdown['experience'] = self._calculate_experience_score(contractor, req)

        # Financial stability score
        breakdown['financial'] = self._calculate_financial_score(contractor, req)

        # Calculate weighted total
        total = sum(
            breakdown[key] * weights.get(key, 0)
            for key in breakdown
        )

        return total, breakdown

    def _calculate_price_score(self, contractor: ContractorProfile,
                              req: ProjectRequirements) -> float:
        """Calculate price competitiveness score"""
        if not contractor.historical_bid_data:
            return 50.0  # Neutral score

        # Find similar projects
        similar_bids = [
            bid for bid in contractor.historical_bid_data
            if bid.get('project_value', 0) * 0.5 <= req.estimated_value <= bid.get('project_value', 0) * 2
        ]

        if not similar_bids:
            return 50.0

        # Calculate average variance from winning bids
        variances = [bid.get('variance_pct', 0) for bid in similar_bids]
        avg_variance = sum(variances) / len(variances)

        # Lower variance = higher score
        # -10% to +10% is normal range
        if avg_variance <= -10:
            return 90  # Very competitive
        elif avg_variance <= 0:
            return 80 - avg_variance  # Competitive
        elif avg_variance <= 10:
            return 70 - avg_variance  # Average
        else:
            return max(30, 60 - avg_variance)  # Expensive

    def _calculate_experience_score(self, contractor: ContractorProfile,
                                   req: ProjectRequirements) -> float:
        """Calculate relevant experience score"""
        if not contractor.references:
            return 30.0  # Low score for no experience

        relevant_projects = []
        for ref in contractor.references:
            # Check work type match
            try:
                work_cat = WorkCategory(ref.work_type)
                if work_cat in req.work_categories:
                    relevant_projects.append(ref)
            except ValueError:
                continue

        if not relevant_projects:
            return 40.0

        # Score based on number and recency of relevant projects
        recent_relevant = [
            p for p in relevant_projects
            if (date.today() - p.completion_date).days <= 365 * 3  # Last 3 years
        ]

        count_score = min(50, len(relevant_projects) * 10)
        recency_score = min(30, len(recent_relevant) * 15)

        # Value similarity
        values = [p.value for p in relevant_projects]
        avg_value = sum(values) / len(values)
        value_ratio = min(req.estimated_value, avg_value) / max(req.estimated_value, avg_value)
        value_score = value_ratio * 20

        return count_score + recency_score + value_score

    def _calculate_financial_score(self, contractor: ContractorProfile,
                                  req: ProjectRequirements) -> float:
        """Calculate financial stability score"""
        score = 50.0  # Base score

        # Check bonding capacity
        if contractor.bonding_capacity >= req.estimated_value:
            score += 20
        elif contractor.bonding_capacity >= req.estimated_value * 0.5:
            score += 10

        # Check insurance
        if contractor.insurance_coverage >= req.estimated_value:
            score += 15
        elif contractor.insurance_coverage >= req.estimated_value * 0.5:
            score += 7

        # Credit rating
        credit_scores = {'AAA': 15, 'AA': 12, 'A': 10, 'BBB': 5, 'BB': 0, 'B': -10}
        score += credit_scores.get(contractor.credit_rating, 0)

        return min(100, max(0, score))

    def compare_contractors(self, contractor_ids: List[str],
                           req: ProjectRequirements) -> pd.DataFrame:
        """Compare specific contractors"""
        data = []

        for cid in contractor_ids:
            contractor = self.contractors.get(cid)
            if not contractor:
                continue

            score, breakdown = self._calculate_match_score(contractor, req)

            row = {
                'Contractor': contractor.company_name,
                'Total Score': f"{score:.1f}",
                'Performance': f"{breakdown['performance']:.1f}",
                'Safety': f"{breakdown['safety']:.1f}",
                'Price': f"{breakdown['price']:.1f}",
                'Capacity': f"{breakdown['capacity']:.1f}",
                'Experience': f"{breakdown['experience']:.1f}",
                'Financial': f"{breakdown['financial']:.1f}",
                'Active Projects': contractor.active_projects,
                'Workload': f"{contractor.current_workload_pct:.0f}%"
            }
            data.append(row)

        return pd.DataFrame(data)

Bid Analysis and Prediction

from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
import numpy as np

class BidPredictor:
    """Predict contractor bid prices"""

    def __init__(self):
        self.model = RandomForestRegressor(n_estimators=100, random_state=42)
        self.is_trained = False

    def train(self, historical_bids: pd.DataFrame):
        """Train bid prediction model

        Expected columns:
        - contractor_size, work_type, region, project_value
        - contractor_performance, contractor_workload
        - winning_bid, contractor_bid
        """
        features = ['project_value', 'contractor_performance',
                   'contractor_workload', 'duration_months']

        # One-hot encode categorical
        df = pd.get_dummies(historical_bids,
                           columns=['contractor_size', 'work_type', 'region'])

        # Features that exist
        X_cols = [c for c in df.columns if c not in ['winning_bid', 'contractor_bid']]
        X = df[X_cols]
        y = df['contractor_bid']

        self.feature_columns = X_cols
        self.model.fit(X, y)
        self.is_trained = True

    def predict_bid(self, contractor: ContractorProfile,
                   project: ProjectRequirements) -> Dict:
        """Predict expected bid from contractor"""
        if not self.is_trained:
            # Simple estimation if not trained
            base = project.estimated_value
            variance = np.random.uniform(-0.1, 0.15)
            return {
                'predicted_bid': base * (1 + variance),
                'confidence': 'low',
                'variance_range': (-15, 20)
            }

        # Build feature vector
        features = {
            'project_value': project.estimated_value,
            'contractor_performance': contractor.calculate_performance_score(),
            'contractor_workload': contractor.current_workload_pct,
            'duration_months': project.duration_months,
            f'contractor_size_{contractor.size.value}': 1,
            f'region_{project.region}': 1
        }

        # Add work type
        for cat in project.work_categories:
            features[f'work_type_{cat.value}'] = 1

        # Create feature vector
        X = pd.DataFrame([features]).reindex(columns=self.feature_columns, fill_value=0)

        prediction = self.model.predict(X)[0]

        # Calculate confidence based on similar historical data
        return {
            'predicted_bid': prediction,
            'confidence': 'medium',
            'variance_range': (-10, 15),
            'estimated_value': project.estimated_value,
            'predicted_variance_pct': (prediction - project.estimated_value) / project.estimated_value * 100
        }

class BidEvaluator:
    """Evaluate and score contractor bids"""

    def __init__(self, matching_engine: ContractorMatchingEngine):
        self.engine = matching_engine
        self.predictor = BidPredictor()

    def evaluate_bids(self, project: ProjectRequirements,
                     bids: List[Dict]) -> pd.DataFrame:
        """Evaluate received bids

        bids: List of {contractor_id, bid_amount, bid_breakdown, proposal}
        """
        results = []

        for bid in bids:
            contractor = self.engine.contractors.get(bid['contractor_id'])
            if not contractor:
                continue

            # Get match score
            match_score, breakdown = self.engine._calculate_match_score(
                contractor, project
            )

            # Price score (compared to other bids)
            avg_bid = sum(b['bid_amount'] for b in bids) / len(bids)
            price_deviation = (bid['bid_amount'] - avg_bid) / avg_bid * 100

            if price_deviation <= -10:
                price_score = 95  # Very competitive
            elif price_deviation <= 0:
                price_score = 85 - price_deviation
            elif price_deviation <= 10:
                price_score = 75 - price_deviation
            else:
                price_score = max(40, 65 - price_deviation)

            # Overall evaluation score (weighted)
            eval_score = match_score * 0.6 + price_score * 0.4

            results.append({
                'contractor_id': bid['contractor_id'],
                'company_name': contractor.company_name,
                'bid_amount': bid['bid_amount'],
                'price_vs_avg': f"{price_deviation:+.1f}%",
                'match_score': match_score,
                'price_score': price_score,
                'evaluation_score': eval_score,
                'performance': breakdown['performance'],
                'safety': breakdown['safety'],
                'recommendation': self._get_recommendation(eval_score, price_deviation)
            })

        df = pd.DataFrame(results)
        df = df.sort_values('evaluation_score', ascending=False)

        return df

    def _get_recommendation(self, eval_score: float, price_dev: float) -> str:
        """Generate recommendation"""
        if eval_score >= 80 and price_dev <= 5:
            return "Strongly Recommended"
        elif eval_score >= 70:
            return "Recommended"
        elif eval_score >= 60:
            return "Acceptable"
        elif price_dev > 20:
            return "Price Concerns"
        else:
            return "Review Required"

Contractor Recommendation Report

def generate_recommendation_report(engine: ContractorMatchingEngine,
                                   project: ProjectRequirements,
                                   output_path: str) -> str:
    """Generate contractor recommendation report"""
    matches = engine.find_matches(project, top_n=10)

    with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
        # Summary
        summary_data = [{
            'Project': project.project_name,
            'Estimated Value': project.estimated_value,
            'Work Categories': ', '.join(c.value for c in project.work_categories),
            'Region': project.region,
            'Start Date': project.start_date.isoformat(),
            'Duration': f"{project.duration_months} months",
            'Contractors Found': len(matches)
        }]
        pd.DataFrame(summary_data).to_excel(writer, sheet_name='Summary', index=False)

        # Rankings
        ranking_data = []
        for i, match in enumerate(matches, 1):
            ranking_data.append({
                'Rank': i,
                'Contractor': match['company_name'],
                'Total Score': f"{match['total_score']:.1f}",
                'Performance': f"{match['score_breakdown']['performance']:.1f}",
                'Safety': f"{match['score_breakdown']['safety']:.1f}",
                'Price': f"{match['score_breakdown']['price']:.1f}",
                'Capacity': f"{match['score_breakdown']['capacity']:.1f}",
                'Experience': f"{match['score_breakdown']['experience']:.1f}",
                'Financial': f"{match['score_breakdown']['financial']:.1f}"
            })
        pd.DataFrame(ranking_data).to_excel(writer, sheet_name='Rankings', index=False)

        # Detailed profiles for top 5
        for i, match in enumerate(matches[:5], 1):
            profile = match['profile']
            profile_data = [{
                'Field': 'Company Name', 'Value': profile.company_name
            }, {
                'Field': 'Size', 'Value': profile.size.value
            }, {
                'Field': 'Employees', 'Value': profile.employees_count
            }, {
                'Field': 'Completed Projects', 'Value': profile.completed_projects
            }, {
                'Field': 'Active Projects', 'Value': profile.active_projects
            }, {
                'Field': 'Current Workload', 'Value': f"{profile.current_workload_pct}%"
            }, {
                'Field': 'Bonding Capacity', 'Value': f"${profile.bonding_capacity:,.0f}"
            }, {
                'Field': 'Safety Incidents', 'Value': profile.lost_time_incidents
            }]
            pd.DataFrame(profile_data).to_excel(
                writer, sheet_name=f'Contractor_{i}', index=False
            )

    return output_path

Quick Reference

CriterionWeight RangeData Sources
Performance20-30%Project references, ratings
Safety15-25%OSHA records, certifications
Price15-25%Historical bids
Capacity10-20%Current workload
Experience10-15%Similar projects
Financial10-15%Credit rating, bonding

Resources

Next Steps

  • See risk-assessment-ml for contractor risk analysis
  • See document-classification-nlp for proposal analysis
  • See open-construction-estimate for bid validation

平台分布

Codex

36.09%
按下载量换算53

Claude

29.73%
按下载量换算44

Cursor

20.01%
按下载量换算29

Gemini CLI

10.01%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills