cwicr-resource-analyzer

cwicr-resource-analyzer is a skill for Claude Code, Codex from jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction. It costs 36 tokens per session (3,762 once invoked), scanned A, a copy of cwicr-resource-analyzer, MIT.

A construction resource analyzer that uses the DDC CWICR database to examine labour, materials, equipment, and subcontracting needs.

In plain words
What is it for?
Use it to estimate labour hours, crew needs, material lists, equipment usage, productivity, and possible resource inefficiencies.
Why use it?
It replaces rough experience-based planning with calculations based on resource norms. This helps reduce the risk of ordering too much or assigning too few workers or machines.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to estimate labour hours, crew needs, material lists, equipment usage, productivity, and possible resource inefficiencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-resource-analyzer
Clone the repo
git clone --depth 1 https://github.com/jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cwicr-resource-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer/github.svg)](https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer)
Your own site
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cwicr-resource-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer"><img src="https://agentmods.dev/badge/skills/jdmorag97-rgb/ddc_skills_for_ai_agents_in_construction/cwicr-resource-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.03762
Opus 5 $0.00018 $0.01881
Sonnet 5 $0.00007 $0.00752
Haiku 4.5 $0.00004 $0.00376

Measured 12d ago against content hash 421c45439e17, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cwicr-resource-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to cwicr-resource-analyzer — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

1_DDC_Toolkit/CWICR-Database/cwicr-resource-analyzer/SKILL.md · 473 lines

How it starts

The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CWICR Resource Analyzer

Business Case

Problem Statement

Construction projects require precise resource planning:

  • How many labor hours are needed?
  • What materials need to be procured?
  • What equipment is required and for how long?

Traditional methods rely on experience-based estimates, leading to over/under allocation.

Solution

Data-driven resource analysis using CWICR's 27,672 resources with detailed breakdowns of labor norms, material requirements, and equipment usage.

Business Value

  • Accurate planning - Based on validated resource norms
  • Cost optimization - Identify resource inefficiencies
  • Procurement support - Generate material lists
  • Labor planning - Calculate crew requirements

Technical Implementation

Python Implementation

import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass, field
from enum import Enum
from collections import defaultdict


class ResourceType(Enum):
    """Types of construction resources."""
    LABOR = "labor"
    MATERIAL = "material"
    EQUIPMENT = "equipment"
    SUBCONTRACT = "subcontract"


class LaborCategory(Enum):
    """Labor skill categories."""
    UNSKILLED = "unskilled"
    SEMI_SKILLED = "semi_skilled"
    SKILLED = "skilled"
    FOREMAN = "foreman"
    SUPERVISOR = "supervisor"
    SPECIALIST = "specialist"


class EquipmentCategory(Enum):
    """Equipment categories."""
    EARTHMOVING = "earthmoving"
    LIFTING = "lifting"
    CONCRETE = "concrete"
    TRANSPORT = "transport"
    COMPACTION = "compaction"
    PUMPING = "pumping"
    POWER_TOOLS = "power_tools"
    SCAFFOLDING = "scaffolding"


@dataclass
class LaborResource:
    """Represents a labor resource."""
    resource_code: str
    description: str
    category: LaborCategory
    hourly_rate: float
    skill_level: int
    productivity_factor: float = 1.0


@dataclass
class MaterialResource:
    """Represents a material resource."""
    resource_code: str
    description: str
    unit: str
    unit_price: float
    category: str
    waste_factor: float = 0.05  # 5% default waste


@dataclass
class EquipmentResource:
    """Represents an equipment resource."""
    resource_code: str
    description: str
    category: EquipmentCategory
    hourly_rate: float
    daily_rate: float
    monthly_rate: float
    fuel_consumption: float = 0.0  # liters per hour
    operator_required: bool = True


@dataclass
class ResourceRequirement:
    """Calculated resource requirement."""
    resource_code: str
    description: str
    resource_type: ResourceType
    quantity: float
    unit: str
    unit_cost: float
    total_cost: float
    duration_hours: float = 0.0


@dataclass
class ResourceSummary:
    """Summary of all resource requirements."""
    labor_hours: float
    labor_cost: float
    material_cost: float
    equipment_cost: float
    total_cost: float

    labor_by_category: Dict[str, float] = field(default_factory=dict)
    materials_list: List[Dict[str, Any]] = field(default_factory=list)
    equipment_list: List[Dict[str, Any]] = field(default_factory=list)


class CWICRResourceAnalyzer:
    """Analyze resources from CWICR database."""

    def __init__(self, cwicr_data: pd.DataFrame,
                 resources_data: Optional[pd.DataFrame] = None):
        self.work_items = cwicr_data
        self.resources = resources_data

        # Create indexes
        self._index_work_items()
        if resources_data is not None:
            self._index_resources()

    def _index_work_items(self):
        """Index work items for fast lookup."""
        if 'work_item_code' in self.work_items.columns:
            self._work_index = self.work_items.set_index('work_item_code')
        else:
            self._work_index = None

    def _index_resources(self):
        """Index resources for fast lookup."""
        if self.resources is not None and 'resource_code' in self.resources.columns:
            self._resource_index = self.resources.set_index('resource_code')
        else:
            self._resource_index = None

    def analyze_labor_requirements(self, items: List[Dict[str, Any]]) -> Dict[str, Any]:
        """Analyze labor requirements for work items."""

        total_hours = 0.0
        labor_by_category = defaultdict(float)
        labor_by_skill = defaultdict(float)
        labor_details = []

        for item in items:
            code = item.get('work_item_code', item.get('code'))
            qty = item.get('quantity', 0)

            if self._work_index is not None and code in self._work_index.index:
                work_item = self._work_index.loc[code]
                labor_norm = float(work_item.get('labor_norm', 0) or 0)
                hours = labor_norm * qty

                total_hours += hours

                # Get category if available
                category = str(work_item.get('category', 'General'))
                labor_by_category[category] += hours

                labor_details.append({
                    'work_item_code': code,
                    'description': work_item.get('description', ''),
                    'quantity': qty,
                    'labor_norm': labor_norm,
                    'total_hours': hours
                })

        return {
            'total_labor_hours': round(total_hours, 2),
            'labor_by_category': dict(labor_by_category),
            'crew_days_8hr': round(total_hours / 8, 1),
            'crew_weeks_40hr': round(total_hours / 40, 1),
            'details': labor_details
        }

    def analyze_material_requirements(self, items: List[Dict[str, Any]],
                                       include_waste: bool = True) -> Dict[str, Any]:
        """Analyze material requirements."""

        materials = defaultdict(lambda: {'quantity': 0, 'unit': '', 'cost': 0})
        total_cost = 0.0

        for item in items:
            code = item.get('work_item_code', item.get('code'))
            qty = item.get('quantity', 0)

            if self._work_index is not None and code in self._work_index.index:
                work_item = self._work_index.loc[code]
                material_cost = float(work_item.get('material_cost', 0) or 0) * qty

                if include_waste:
                    material_cost *= 1.05  # 5% waste factor

                total_cost += material_cost

                # Aggregate by category
                category = str(work_item.get('category', 'General'))
                materials[category]['cost'] += material_cost

        return {
            'total_material_cost': round(total_cost, 2),
            'by_category': dict(materials),
            'waste_included': include_waste,
            'waste_factor': 0.05 if include_waste else 0
        }

    def analyze_equipment_requirements(self, items: List[Dict[str, Any]]) -> Dict[str, Any]:
        """Analyze equipment requirements."""

        equipment_hours = defaultdict(float)
        total_cost = 0.0

        for item in items:
            code = item.get('work_item_code', item.get('code'))
            qty = item.get('quantity', 0)

            if self._work_index is not None and code in self._work_index.index:
                work_item = self._work_index.loc[code]
                equipment_cost = float(work_item.get('equipment_cost', 0) or 0) * qty
                equipment_norm = float(work_item.get('equipment_norm', 0) or 0) * qty

                total_cost += equipment_cost

                category = str(work_item.get('category', 'General'))
                equipment_hours[category] += equipment_norm

        return {
            'total_equipment_cost': round(total_cost, 2),
            'equipment_hours_by_category': dict(equipment_hours),
            'total_equipment_hours': sum(equipment_hours.values())
        }

    def generate_resource_summary(self, items: List[Dict[str, Any]]) -> ResourceSummary:
        """Generate complete resource summary."""

        labor = self.analyze_labor_requirements(items)
        materials = self.analyze_material_requirements(items)
        equipment = self.analyze_equipment_requirements(items)

        # Calculate labor cost
        avg_labor_rate = 35.0  # Default hourly rate
        labor_cost = labor['total_labor_hours'] * avg_labor_rate

        return ResourceSummary(
            labor_hours=labor['total_labor_hours'],
            labor_cost=labor_cost,
            material_cost=materials['total_material_cost'],
            equipment_cost=equipment['total_equipment_cost'],
            total_cost=labor_cost + materials['total_material_cost'] + equipment['total_equipment_cost'],
            labor_by_category=labor['labor_by_category']
        )

    def calculate_crew_requirements(self, labor_hours: float,
                                     project_duration_days: int,
                                     hours_per_day: int = 8) -> Dict[str, Any]:
        """Calculate crew size requirements."""

        available_hours = project_duration_days * hours_per_day
        min_crew_size = labor_hours / available_hours if available_hours > 0 else 0

        return {
            'total_labor_hours': labor_hours,
            'project_duration_days': project_duration_days,
            'hours_per_day': hours_per_day,
            'minimum_crew_size': round(min_crew_size, 1),
            'recommended_crew_size': int(np.ceil(min_crew_size * 1.15)),  # 15% buffer
            'utilization_at_recommended': round(min_crew_size / np.ceil(min_crew_size * 1.15) * 100, 1)
        }

    def identify_critical_resources(self, items: List[Dict[str, Any]],
                                     top_n: int = 10) -> Dict[str, List[Dict]]:
        """Identify critical resources by cost impact."""

        breakdowns = []
        for item in items:
            code = item.get('work_item_code', item.get('code'))
            qty = item.get('quantity', 0)

            if self._work_index is not None and code in self._work_index.index:
                work_item = self._work_index.loc[code]

                breakdowns.append({
                    'work_item_code': code,
                    'description': work_item.get('description', ''),
                    'quantity': qty,
                    'labor_cost': float(work_item.get('labor_cost', 0) or 0) * qty,
                    'material_cost': float(work_item.get('material_cost', 0) or 0) * qty,
                    'equipment_cost': float(work_item.get('equipment_cost', 0) or 0) * qty,
                    'total_cost': (
                        float(work_item.get('labor_cost', 0) or 0) +
                        float(work_item.get('material_cost', 0) or 0) +
                        float(work_item.get('equipment_cost', 0) or 0)
                    ) * qty
                })

        df = pd.DataFrame(breakdowns)
        if df.empty:
            return {'labor': [], 'material': [], 'equipment': [], 'total': []}

        return {
            'labor': df.nlargest(top_n, 'labor_cost')[['work_item_code', 'description', 'labor_cost']].to_dict('records'),
            'material': df.nlargest(top_n, 'material_cost')[['work_item_code', 'description', 'material_cost']].to_dict('records'),
            'equipment': df.nlargest(top_n, 'equipment_cost')[['work_item_code', 'description', 'equipment_cost']].to_dict('records'),
            'total': df.nlargest(top_n, 'total_cost')[['work_item_code', 'description', 'total_cost']].to_dict('records')
        }

    def analyze_productivity(self, items: List[Dict[str, Any]],
                             actual_hours: Optional[Dict[str, float]] = None) -> Dict[str, Any]:
        """Analyze productivity vs planned norms."""

        if actual_hours is None:
            return {'error': 'Actual hours required for productivity analysis'}

        analysis = []
        for item in items:
            code = item.get('work_item_code', item.get('code'))
            qty = item.get('quantity', 0)

            if code in actual_hours and self._work_index is not None:
                if code in self._work_index.index:
                    work_item = self._work_index.loc[code]
                    planned_hours = float(work_item.get('labor_norm', 0) or 0) * qty
                    actual = actual_hours[code]

                    productivity = planned_hours / actual * 100 if actual > 0 else 0

                    analysis.append({
                        'work_item_code': code,
                        'planned_hours': planned_hours,
                        'actual_hours': actual,
                        'productivity_percent': round(productivity, 1),
                        'variance_hours': planned_hours - actual
                    })

        df = pd.DataFrame(analysis)
        if df.empty:
            return {'items': [], 'average_productivity': 0}

        return {
            'items': analysis,
            'average_productivity': round(df['productivity_percent'].mean(), 1),
            'total_variance': round(df['variance_hours'].sum(), 1),
            'underperforming_items': len(df[df['productivity_percent'] < 90])
        }


class ResourceOptimizer:
    """Optimize resource allocation."""

    def __init__(self, analyzer: CWICRResourceAnalyzer):
        self.analyzer = analyzer

    def suggest_material_substitutions(self, items: List[Dict[str, Any]],
                                        cost_threshold: float = 0.9) -> List[Dict]:
        """Suggest cheaper material substitutions."""
        # Placeholder for substitution logic
        return []

    def optimize_crew_allocation(self, labor_by_category: Dict[str, float],
                                  available_crew: Dict[str, int]) -> Dict[str, Any]:
        """Optimize crew allocation across categories."""

        allocation = {}
        unmet_demand = {}

        for category, hours_needed in labor_by_category.items():
            available = available_crew.get(category, 0)
            days_needed = hours_needed / 8

            if available > 0:
                days_available = available * 1  # 1 day per person
                if days_available >= days_needed:
                    allocation[category] = {
                        'assigned': int(np.ceil(days_needed)),
                        'remaining': available - int(np.ceil(days_needed))
                    }
                else:
                    allocation[category] = {'assigned': available, 'remaining': 0}
                    unmet_demand[category] = days_needed - days_available
            else:
                unmet_demand[category] = days_needed

        return {
            'allocation': allocation,
            'unmet_demand': unmet_demand,
            'fully_staffed': len(unmet_demand) == 0
        }

Read the full file on GitHub · 473 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 473 lines · 36 tokens per session scan A 421c45439e17

Subscribe to this mod's changes

cwicr-resource-analyzer is a skill published in the GitHub repository jdmorag97-rgb/DDC_Skills_for_AI_Agents_in_Construction (2 stars, last pushed 6mo ago), licensed MIT. It adds 36 tokens to every session and 3,762 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cwicr-resource-analyzer, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens