safety-inspection
Digital safety inspection system for construction sites. Checklists, hazard tracking, incident reporting, and compliance documentation.
git clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction /tmp/safety-inspection && cp -r /tmp/safety-inspection/1_DDC_Toolkit/Field-Operations/safety-inspection ~/.claude/skills/safety-inspectionSKILL.md
# Safety Inspection System for Construction
Comprehensive digital safety management system for construction sites with inspection checklists, hazard tracking, and incident reporting.
## Business Case
**Problem**: Paper-based safety management leads to:
- Incomplete inspections (20-30% of items skipped)
- Lost documentation
- Delayed incident reporting
- Difficulty tracking corrective actions
- Compliance audit failures
**Solution**: Digital system that:
- Enforces complete checklist completion
- Photos attached to each finding
- Instant notifications for hazards
- Tracks corrective actions to closure
- Generates compliance reports
**ROI**: 40% reduction in recordable incidents, 100% audit compliance
## Safety Inspection Types
```
┌──────────────────────────────────────────────────────────────────────┐
│ SAFETY INSPECTION TYPES │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ DAILY WEEKLY SPECIAL │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Pre-Work │ │ Area Walk │ │ Pre-Pour │ │
│ │ • Housekeeping│ │ • Fire ext. │ │ • Formwork │ │
│ │ • PPE │ │ • First aid │ │ • Shoring │ │
│ │ • Equipment │ │ • Scaffolds │ │ └─────────────┘ │
│ └─────────────┘ │ • Trenches │ ┌─────────────┐ │
│ ┌─────────────┐ └─────────────┘ │ Crane Setup │ │
│ │ Toolbox Talk│ ┌─────────────┐ │ • Ground │ │
│ │ • Topic │ │ Equipment │ │ • Load chart│ │
│ │ • Attendees │ │ • Cranes │ │ • Rigging │ │
│ │ • Sign-off │ │ • Lifts │ └─────────────┘ │
│ └─────────────┘ │ • Vehicles │ ┌─────────────┐ │
│ ┌─────────────┐ └─────────────┘ │ Hot Work │ │
│ │ End of Day │ │ • Permit │ │
│ │ • Secured │ │ • Fire watch│ │
│ │ • Barricades│ └─────────────┘ │
│ └─────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘
```
## Data Structure
```python
from dataclasses import dataclass, field
from datetime import datetime, date
from enum import Enum
from typing import List, Optional
import uuid
class HazardSeverity(Enum):
CRITICAL = "Critical" # Immediate danger to life
HIGH = "High" # Serious injury potential
MEDIUM = "Medium" # Injury potential
LOW = "Low" # Minor hazard
OBSERVATION = "Observation" # Best practice
class HazardStatus(Enum):
OPEN = "Open"
IN_PROGRESS = "In Progress"
CORRECTED = "Corrected"
VERIFIED = "Verified Closed"
class InspectionType(Enum):
DAILY_PREWORK = "Daily Pre-Work"
TOOLBOX_TALK = "Toolbox Talk"
AREA_INSPECTION = "Area Inspection"
EQUIPMENT_INSPECTION = "Equipment Inspection"
HOT_WORK_PERMIT = "Hot Work Permit"
CONFINED_SPACE = "Confined Space Entry"
CRANE_LIFT = "Crane/Lift Inspection"
SCAFFOLD = "Scaffold Inspection"
EXCAVATION = "Excavation Inspection"
INCIDENT = "Incident Report"
@dataclass
class Hazard:
hazard_id: str
inspection_id: str
description: str
severity: HazardSeverity
location: str
photo_urls: List[str] = field(default_factory=list)
assigned_to: str = ""
due_date: date = None
status: HazardStatus = HazardStatus.OPEN
corrective_action: str = ""
corrected_date: date = None
corrected_by: str = ""
verification_date: date = None
verified_by: str = ""
@dataclass
class Inspection:
inspection_id: str
inspection_type: InspectionType
project_id: str
date: date
inspector: str
location: str
checklist_items: List[dict] = field(default_factory=list)
hazards_found: List[Hazard] = field(default_factory=list)
overall_rating: str = "" # Pass/Fail/Conditional
notes: str = ""
photos: List[str] = field(default_factory=list)
signatures: List[dict] = field(default_factory=list)
weather: str = ""
created_at: datetime = field(default_factory=datetime.now)
@dataclass
class Incident:
incident_id: str
project_id: str
date: datetime
type: str # Near Miss, First Aid, Recordable, Lost Time
description: str
location: str
injured_party: str = ""
witness_names: List[str] = field(default_factory=list)
immediate_actions: str = ""
root_cause: str = ""
corrective_actions: str = ""
reported_by: str = ""
photos: List[str] = field(default_factory=list)
osha_recordable: bool = False
days_away: int = 0
days_restricted: int = 0
```
## Python Implementation
```python
import pandas as pd
from datetime import datetime, date, timedelta
from typing import List, Dict, Optional
import json
import os
class SafetyManager:
"""Construction site safety management system"""
def __init__(self, project_id: str, storage_path: str = None):
self.project_id = project_id
self.storage_path = storage_path or f"safety_{project_id}"
self.inspections: Dict[str, Inspection] = {}
self.hazards: Dict[str, Hazard] = {}
self.incidents: Dict[str, Incident] = {}
# Load checklists
self.checklists = self._load_checklists()
def _load_checklists(self) -> Dict[str, List[dict]]:
"""Load inspection checklists"""
return {
InspectionType.DAILY_PREWORK.value: [
{"id": "DP01", "item": "Work area clean and organized", "category": "Housekeeping"},
{"id": "DP02", "item": "WalkingGenerate automated daily progress reports from site data. Track work completed, labor hours, equipment usage, and weather conditions.
Analyze labor productivity from site data. Compare planned vs actual, identify trends, benchmark against industry standards.
Create interactive KPI dashboards for construction projects. Track schedule, cost, quality, and safety metrics in real-time.
Detect and analyze geometric clashes in BIM models. Identify MEP, structural, and architectural conflicts before construction.
Classify BIM elements using AI and standard classification systems. Map elements to UniFormat, MasterFormat, OmniClass, and CWICR codes.
Generate comprehensive BIM model validation reports. Check data quality, completeness, and compliance with standards.
Calculate CO2 emissions and carbon footprint from BIM model data. Analyze embodied carbon by material, element, and building system.
Extract quantities from IFC/Revit models for quantity takeoff. Uses DDC converters to get element counts, areas, volumes, lengths with grouping and reporting.