safety-inspection
Digital safety inspection system for construction sites. Checklists, hazard tracking, incident reporting, and compliance documentation.
What this skill does
# 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": "Walking surfaces clear of debris", "category": "Housekeeping"},
{"id": "DP03", "item": "All workers have required PPE", "category": "PPE"},
{"id": "DP04", "item": "Hard hats worn in designated areas", "category": "PPE"},
{"id": "DP05", "item": "Safety glasses worn where required", "category": "PPE"},
{"id": "DP06", "item": "High-visibility vests worn", "category": "PPE"},
{"id": "DP07", "item": "Fall protection in use above 6 feet", "category": "Fall Protection"},
{"id": "DP08", "item": "Guardrails/covers on floor openings", "category": "Fall Protection"},
{"id": "DP09", "item": "Ladders in good condition", "category": "Equipment"},
{"id": "DP10", "item": "Extension cords not damaged", "category": "Electrical"},
{"id": "DP11", "item": "GFCIs in use for power tools", "category": "Electrical"},
{"id": "DP12", "item": "Fire extinguishers accessible", "category": "Fire Safety"},
{"id": "DP13", "item": "Emergency exits clear", "category": "Emergency"},
{"id": "DP14", "item": "First aid kit stocked", "category": "Emergency"},
{"id": "DP15", "item": "SDS sheets available", "category": "Hazcom"},
],
InspectionType.SCAFFOLD.value: [
{"id": "SC01", "item": "Base plates/mudsills in place", "category": "Foundation"},
{"id": "SC02", "item": "All legs plumb and level", "category": "Structure"},
{"id": "SC03", "item": "Cross bracing complete", "category": "Structure"},
{"id": "SC04", "item": "Planking fully decked", "category": "Platform"},
{"id": "SC05", "item": "No gaps >1 inch between planks", "category": "Platform"},
{"id": "SC06", "item": "Guardrails at 42 inches", "category": "Guardrails"},
{"id": "SC07", "item": "Midrails at 21 inches", "categoRelated in Data & Analytics
clawarr-suite
IncludedComprehensive management for self-hosted media stacks (Sonarr, Radarr, Lidarr, Readarr, Prowlarr, Bazarr, Overseerr, Plex, Tautulli, SABnzbd, Recyclarr, Unpackerr, Notifiarr, Maintainerr, Kometa, FlareSolverr). Deep library exploration, analytics, dashboard generation, content management, request handling, subtitle management, indexer control, download monitoring, quality profile sync, library cleanup automation, notification routing, collection/overlay management, and media tracker integration (Trakt, Letterboxd, Simkl).
querying-soql
IncludedSOQL query generation, optimization, and analysis with 100-point scoring. Use this skill when the user needs SOQL/SOSL authoring or optimization: natural-language-to-query generation, relationship queries, aggregates, query-plan analysis, and performance or safety improvements for Salesforce queries. TRIGGER when: user writes, optimizes, or debugs SOQL/SOSL queries, touches .soql files, or asks about relationship queries, aggregates, or query performance. DO NOT TRIGGER when: bulk data operations (use handling-sf-data), Apex DML logic (use generating-apex), or report/dashboard queries.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
habit-flow
IncludedAI-powered atomic habit tracker with natural language logging, streak tracking, smart reminders, and coaching. Use for creating habits, logging completions naturally ("I meditated today"), viewing progress, and getting personalized coaching.
app-store-optimization
IncludedApp Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklists, and tracking ranking changes.
visualizing-data
IncludedBuilds dashboards, reports, and data-driven interfaces requiring charts, graphs, or visual analytics. Provides systematic framework for selecting appropriate visualizations based on data characteristics and analytical purpose. Includes 24+ visualization types organized by purpose (trends, comparisons, distributions, relationships, flows, hierarchies, geospatial), accessibility patterns (WCAG 2.1 AA compliance), colorblind-safe palettes, and performance optimization strategies. Use when creating visualizations, choosing chart types, displaying data graphically, or designing data interfaces.