SkillAgentSearch skills...

site-logistics-optimization

Optimize construction site logistics including material delivery scheduling, crane positioning, storage area allocation, and traffic flow using operations research and simulation.

Install / Use

npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill site-logistics-optimization

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

91/100

Supported Platforms

Universal

Our assessment of site-logistics-optimization

site-logistics-optimization scores 91/100 on our quality scale, 149th of 422 Education & Research skills we index (top 36%).

Its SKILL.md is 24 KB long, well organised into 13 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.

It has 333 GitHub stars, a meaningful sign that others use it.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
11/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 3 months ago, so site-logistics-optimization is actively maintained.
  • Our last check on 2026-11-20 found the source still online.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

site-logistics-optimization compared with similar skills

All 4 of these similar skills score higher than site-logistics-optimization; compare them before choosing.

SkillScoreStarsUpdatedFormat
site-logistics-optimization (this skill)by datadrivenconstruction913333mo agoSKILL.md
Agent-Reachby Panniantong100113.3k12d agoCLAUDE.md
headroomby headroomlabs-ai10080.2ktodayCLAUDE.md
last30days-skillby mvanhorn10070.9ktodayCLAUDE.md
Scraplingby D4Vinci100104.4k2d agoMCP Server

Frequently asked questions

How do I install site-logistics-optimization?
Run npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill site-logistics-optimization. The install tabs above show the steps for each supported agent.
Which AI agents does site-logistics-optimization work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is site-logistics-optimization safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is site-logistics-optimization still maintained?
The repository was last updated about 3 months ago, so site-logistics-optimization is actively maintained.

name: "site-logistics-optimization" description: "Optimize construction site logistics including material delivery scheduling, crane positioning, storage area allocation, and traffic flow using operations research and simulation." homepage: "https://datadrivenconstruction.io" metadata: {"openclaw": {"emoji": "🚀", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}

Site Logistics Optimization

Overview

This skill implements optimization algorithms for construction site logistics. Minimize delays, reduce costs, and improve safety through data-driven planning of deliveries, equipment placement, and material storage.

Optimization Areas:

  • Material delivery scheduling
  • Crane and equipment positioning
  • Storage area allocation
  • Site traffic flow
  • Workforce routing
  • Just-in-time delivery

Quick Start

from dataclasses import dataclass
from typing import List, Dict, Tuple
from datetime import datetime, timedelta
import heapq

@dataclass
class Delivery:
    delivery_id: str
    material_type: str
    quantity: float
    required_date: datetime
    unload_duration_min: int
    storage_area: str
    priority: int = 1  # 1=highest

@dataclass
class TimeSlot:
    start: datetime
    end: datetime
    is_available: bool = True
    delivery_id: str = None

def schedule_deliveries(deliveries: List[Delivery],
                       slots_per_day: int = 8,
                       unload_bays: int = 2) -> Dict[str, TimeSlot]:
    """Simple delivery scheduling"""
    # Sort by priority and required date
    sorted_deliveries = sorted(deliveries, key=lambda d: (d.priority, d.required_date))

    schedule = {}
    bay_schedules = {i: [] for i in range(unload_bays)}

    for delivery in sorted_deliveries:
        # Find available slot
        target_date = delivery.required_date.replace(hour=8, minute=0)

        for bay in range(unload_bays):
            # Check if bay has capacity
            bay_end = max([s.end for s in bay_schedules[bay]], default=target_date)

            if bay_end <= target_date:
                slot_start = target_date
            else:
                slot_start = bay_end

            slot_end = slot_start + timedelta(minutes=delivery.unload_duration_min)

            # Check if within working hours (8:00-18:00)
            if slot_end.hour <= 18:
                slot = TimeSlot(
                    start=slot_start,
                    end=slot_end,
                    is_available=False,
                    delivery_id=delivery.delivery_id
                )
                bay_schedules[bay].append(slot)
                schedule[delivery.delivery_id] = {
                    'bay': bay,
                    'slot': slot
                }
                break

    return schedule

# Example
deliveries = [
    Delivery("D001", "concrete", 50, datetime(2024, 1, 15, 9, 0), 45, "Zone-A", 1),
    Delivery("D002", "rebar", 10, datetime(2024, 1, 15, 10, 0), 30, "Zone-B", 2),
    Delivery("D003", "formwork", 20, datetime(2024, 1, 15, 9, 0), 60, "Zone-A", 1),
]

schedule = schedule_deliveries(deliveries)
for d_id, info in schedule.items():
    print(f"{d_id}: Bay {info['bay']}, {info['slot'].start.strftime('%H:%M')}-{info['slot'].end.strftime('%H:%M')}")

Comprehensive Logistics Optimization

Site Layout Model

from dataclasses import dataclass, field
from typing import List, Dict, Tuple, Optional
from datetime import datetime, date, timedelta
from enum import Enum
import numpy as np
from scipy.optimize import linear_sum_assignment
import heapq

class ZoneType(Enum):
    CONSTRUCTION = "construction"
    STORAGE = "storage"
    UNLOADING = "unloading"
    STAGING = "staging"
    ACCESS = "access"
    EQUIPMENT = "equipment"
    OFFICE = "office"

@dataclass
class SiteZone:
    zone_id: str
    zone_type: ZoneType
    area_sqm: float
    capacity: float  # Depends on type (tons, units, etc.)
    current_usage: float = 0
    position: Tuple[float, float] = (0, 0)  # x, y coordinates
    access_points: List[Tuple[float, float]] = field(default_factory=list)
    restrictions: List[str] = field(default_factory=list)

@dataclass
class Equipment:
    equipment_id: str
    equipment_type: str  # crane, forklift, etc.
    max_reach: float  # meters
    capacity: float  # tons
    position: Tuple[float, float] = (0, 0)
    operating_radius: float = 0

@dataclass
class DeliveryRequest:
    request_id: str
    material_type: str
    quantity: float
    unit: str
    required_date: date
    required_time_window: Tuple[int, int]  # (start_hour, end_hour)
    unload_duration_min: int
    vehicle_type: str
    destination_zone: str
    priority: int = 1
    requires_crane: bool = False

class SiteLogisticsModel:
    """Construction site logistics model"""

    def __init__(self, site_name: str):
        self.site_name = site_name
        self.zones: Dict[str, SiteZone] = {}
        self.equipment: Dict[str, Equipment] = {}
        self.deliveries: List[DeliveryRequest] = []
        self.routes: Dict[str, List[Tuple[float, float]]] = {}

    def add_zone(self, zone: SiteZone):
        """Add zone to site"""
        self.zones[zone.zone_id] = zone

    def add_equipment(self, equipment: Equipment):
        """Add equipment to site"""
        self.equipment[equipment.equipment_id] = equipment

    def add_delivery(self, delivery: DeliveryRequest):
        """Add delivery request"""
        self.deliveries.append(delivery)

    def calculate_distance(self, point1: Tuple[float, float],
                          point2: Tuple[float, float]) -> float:
        """Calculate Euclidean distance"""
        return np.sqrt((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2)

    def get_zone_distances(self) -> Dict[Tuple[str, str], float]:
        """Calculate distances between all zones"""
        distances = {}
        zone_ids = list(self.zones.keys())

        for i, z1 in enumerate(zone_ids):
            for z2 in zone_ids[i+1:]:
                dist = self.calculate_distance(
                    self.zones[z1].position,
                    self.zones[z2].position
                )
                distances[(z1, z2)] = dist
                distances[(z2, z1)] = dist

        return distances

    def check_crane_coverage(self, crane_id: str, zone_id: str) -> bool:
        """Check if crane can reach zone"""
        crane = self.equipment.get(crane_id)
        zone = self.zones.get(zone_id)

        if not crane or not zone:
            return False

        distance = self.calculate_distance(crane.position, zone.position)
        return distance <= crane.max_reach

Delivery Scheduling Optimizer

from datetime import datetime, date, timedelta
from typing import List, Dict, Optional
import numpy as np

@dataclass
class ScheduledDelivery:
    delivery: DeliveryRequest
    scheduled_date: date
    scheduled_time: datetime
    assigned_bay: str
    assigned_crane: Optional[str]
    estimated_completion: datetime

class DeliveryScheduler:
    """Optimize delivery scheduling"""

    def __init__(self, site: SiteLogisticsModel):
        self.site = site
        self.schedule: Dict[date, List[ScheduledDelivery]] = {}
        self.bay_capacity = 2  # Simultaneous unloading bays
        self.working_hours = (7, 18)  # 7 AM to 6 PM

    def schedule_deliveries(self, deliveries: List[DeliveryRequest],
                           planning_horizon_days: int = 14) -> List[ScheduledDelivery]:
        """Schedule all deliveries optimally"""
        # Sort by priority and required date
        sorted_deliveries = sorted(
            deliveries,
            key=lambda d: (d.priority, d.required_date, -d.quantity)
        )

        scheduled = []
        bay_schedules = {f"bay_{i}": [] for i in range(self.bay_capacity)}

        for delivery in sorted_deliveries:
            best_slot = self._find_best_slot(delivery, bay_schedules)

            if best_slot:
                sched = ScheduledDelivery(
                    delivery=delivery,
                    scheduled_date=best_slot['date'],
                    scheduled_time=best_slot['start_time'],
                    assigned_bay=best_slot['bay'],
                    assigned_crane=best_slot.get('crane'),
                    estimated_completion=best_slot['end_time']
                )
                scheduled.append(sched)

                # Update bay schedule
                bay_schedules[best_slot['bay']].append({
                    'delivery_id': delivery.request_id,
                    'start': best_slot['start_time'],
                    'end': best_slot['end_time']
                })

        return scheduled

    def _find_best_slot(self, delivery: DeliveryRequest,
                       bay_schedules: Dict) -> Optional[Dict]:
        """Find optimal delivery slot"""
        target_date = delivery.required_date
        time_window = delivery.required_time_window

        # Try target date first, then surrounding days
        for day_offset in range(0, 7):  # Look up to 7 days ahead
            check_date = target_date + timedelta(days=day_offset)

            for bay_id, bay_schedule in bay_schedules.items():
                slot = self._find_slot_in_bay(
                    delivery, check_date, time_window, bay_id, bay_schedule
                )
                if slot:
                    # Check crane availability if needed
                    if delivery.requires_crane:
                        crane = self._find_available_crane(
                            delivery.destination_zone,
                            slot['start_time'],
                            slot['end_time']
                        )
                        if crane:
                            slot['crane'] = crane
                        else:
                            continue  # No crane available

                    return slot

        return None

    def _find_slot_in_bay(self, delivery: DeliveryRequest,
                          check_date: date,
                          time_window: Tuple[int, int],
                          bay_id: str,
                          bay_schedule: List[Dict]) -> Optional[Dict]:
        """Find available slot in specific bay"""
        start_hour = max(self.working_hours[0], time_window[0])
        end_hour = min(self.working_hours[1], time_window[1])

        # Get existing bookings for this date
        date_bookings = [
            b for b in bay_schedule
            if b['start'].date() == check_date
        ]

        # Sort by start time
        date_bookings.sort(key=lambda x: x['start'])

        # Find gaps
        current_time = datetime.combine(check_date, datetime.min.time().replace(hour=start_hour))
        end_time = datetime.combine(check_date, datetime.min.time().replace(hour=end_hour))

        for booking in date_bookings:
            if booking['start'] > current_time:
                gap_duration = (booking['start'] - current_time).seconds // 60
                if gap_duration >= delivery.unload_duration_min:
                    return {
                        'bay': bay_id,
                        'date': check_date,
                        'start_time': current_time,
                        'end_time': current_time + timedelta(minutes=delivery.unload_duration_min)
                    }
            current_time = max(current_time, booking['end'])

        # Check remaining time at end of day
        if current_time < end_time:
            remaining = (end_time - current_time).seconds // 60
            if remaining >= delivery.unload_duration_min:
                return {
                    'bay': bay_id,
                    'date': check_date,
                    'start_time': current_time,
                    'end_time': current_time + timedelta(minutes=delivery.unload_duration_min)
                }

        return None

    def _find_available_crane(self, zone_id: str,
   

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars333
CategoryEducation
Updated2mo ago
Forks82

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions