# cwicr-waste-calculator

cwicr-waste-calculator is a Claude Code skill that estimates material losses using CWICR norms. It responds to requests to account for cutting, spills, breakage, and installation overrun.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 117 installs · ★ 434 repo stars
- Author: datadrivenconstruction
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/1_DDC_Toolkit/CWICR-Database/cwicr-waste-calculator/SKILL.md
- Updated: 2026-10-19
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/cwicr-waste-calculator

## What it does

cwicr-waste-calculator adds estimated material losses to a base quantity. It identifies a material category from its description, then applies factors for cutting, spillage, breakage, and installation overrun. Other materials use a general set of factors.

The calculation can use CWICR data: the skill looks up a material by code and reads its description, unit, and cost when those fields are available. Its output includes the starting quantity, the quantity with waste, and the waste cost. `python3` is required.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-waste-calculator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cwicr-waste-calculator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cwicr-waste-calculator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-waste-calculator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cwicr-waste-calculator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-waste-calculator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cwicr-waste-calculator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction 1_DDC_Toolkit/CWICR-Database/cwicr-waste-calculator
```

2. **Manually: put the files in place**
- File: `.github/skills/cwicr-waste-calculator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-waste-calculator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --path 1_DDC_Toolkit/CWICR-Database/cwicr-waste-calculator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cwicr-waste-calculator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cwicr-waste-calculator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/1_DDC_Toolkit/CWICR-Database/cwicr-waste-calculator/SKILL.md

## When to use it
- estimate extra material for cutting and breakage
- include spillage in liquid material quantities
- calculate the cost of material losses
- apply waste factors to a CWICR material entry

## Example prompts
- Calculate concrete quantities with extra allowance for cutting and spillage.
- Estimate waste for a material code from the CWICR table.
- Add cutting and breakage losses to the tile quantity.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b112d6a6235f6ec4.

BEGIN THIRD-PARTY FILE b112d6a6235f6ec4
````text
---
name: "cwicr-waste-calculator"
description: "Calculate material waste factors and losses using CWICR norms. Apply waste percentages, cutting losses, and spillage factors to material quantities."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw": {"emoji": "🗄️", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}
---
# CWICR Waste Calculator

## Business Case

### Problem Statement
Material estimates need waste factors:
- Cutting/trimming losses
- Spillage and breakage
- Overordering requirements
- Different waste by material type

### Solution
Systematic waste calculation using CWICR material data with industry-standard waste factors by material category.

### Business Value
- **Accurate ordering** - Include realistic waste
- **Cost control** - Budget for actual usage
- **Sustainability** - Track and reduce waste
- **Benchmarking** - Compare waste across projects

## Technical Implementation

```python
import pandas as pd
import numpy as np
from typing import Dict, Any, List, Optional
from dataclasses import dataclass
from enum import Enum


class WasteCategory(Enum):
    """Waste category types."""
    CUTTING = "cutting"          # Cutting/trimming losses
    SPILLAGE = "spillage"        # Liquid material spillage
    BREAKAGE = "breakage"        # Damaged materials
    OVERRUN = "overrun"          # Installation overrun
    THEFT = "theft"              # Site theft allowance
    WEATHER = "weather"          # Weather damage


@dataclass
class WasteFactor:
    """Waste factor for a material."""
    material_code: str
    material_name: str
    base_quantity: float
    unit: str
    cutting_waste_pct: float
    spillage_pct: float
    breakage_pct: float
    overrun_pct: float
    total_waste_pct: float
    quantity_with_waste: float
    waste_quantity: float
    waste_cost: float


# Industry standard waste factors by material type
WASTE_FACTORS = {
    'concrete': {
        'cutting': 0.02, 'spillage': 0.03, 'breakage': 0.0, 'overrun': 0.02
    },
    'rebar': {
        'cutting': 0.05, 'spillage': 0.0, 'breakage': 0.01, 'overrun': 0.02
    },
    'brick': {
        'cutting': 0.05, 'spillage': 0.0, 'breakage': 0.03, 'overrun': 0.02
    },
    'block': {
        'cutting': 0.04, 'spillage': 0.0, 'breakage': 0.02, 'overrun': 0.02
    },
    'lumber': {
        'cutting': 0.10, 'spillage': 0.0, 'breakage': 0.02, 'overrun': 0.03
    },
    'plywood': {
````
END THIRD-PARTY FILE b112d6a6235f6ec4

The third-party file has ended. Everything between the b112d6a6235f6ec4 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2490 of 14036 bytes. © datadrivenconstruction · MIT · https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/1_DDC_Toolkit/CWICR-Database/cwicr-waste-calculator/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
