# cost-estimation-resource

cost-estimation-resource calculates construction estimates using the resource-based method. It splits physical consumption norms from unit prices across labor, materials, and equipment.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 219 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/2_DDC_Book/3.1-Cost-Estimation/cost-estimation-resource/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/cost-estimation-resource

## What it does

The skill implements a Python `ResourceBasedEstimator` class to compute project costs. Instead of stale unit prices, it tracks physical consumption rates per work item and accounts for material waste via `waste_factor`. Direct expenses split into four resource categories: labor, material, equipment, and subcontractor.

Data loads directly from `pandas` dataframes for resources, line items, and norms. The estimator sums direct costs, applies a 0.15 overhead rate, and adds a 0.10 profit rate to get the grand total. If a work item code is missing from the database, the class raises a `ValueError`.

The environment requires `python3` alongside `pandas`. The tool depends entirely on structured input tables with item codes and current prices.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cost-estimation-resource -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cost-estimation-resource -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cost-estimation-resource/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 cost-estimation-resource -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cost-estimation-resource/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 2_DDC_Book/3.1-Cost-Estimation/cost-estimation-resource
```

2. **Manually: put the files in place**
- File: `.github/skills/cost-estimation-resource/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill cost-estimation-resource -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --path 2_DDC_Book/3.1-Cost-Estimation/cost-estimation-resource
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cost-estimation-resource/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 cost-estimation-resource -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/2_DDC_Book/3.1-Cost-Estimation/cost-estimation-resource/SKILL.md

## When to use it
- calculate construction estimates using physical consumption norms
- break down direct expenses by labor and material categories
- apply material waste factors to bill of quantities calculations
- compute overhead and profit markups on top of direct job costs

## Example prompts
- Calculate total project costs using item quantities in `items.csv` and norms in `norms.csv`
- Estimate concrete foundation costs including labor hours and a 1.05 waste factor
- Generate a breakdown of direct costs with overhead and profit margins applied

## 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: 0b1e2cae63053fc0.

BEGIN THIRD-PARTY FILE 0b1e2cae63053fc0
````text
---
name: "cost-estimation-resource"
description: "Calculate construction costs using resource-based method. Estimate project costs from work items, physical resource norms, and current prices."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw":{"emoji":"🧮","os":["darwin","linux","win32"],"homepage":"https://datadrivenconstruction.io","requires":{"bins":["python3"]}}}
---

# Cost Estimation - Resource Method

## Business Case

### Problem Statement
Traditional costing challenges:
- Fixed unit prices become outdated
- No visibility into cost components
- Difficult to adjust for conditions
- Limited cost analysis capability

### Solution
Resource-based costing separates physical resource consumption (norms) from prices, enabling accurate, adjustable, and transparent cost estimation.

## Technical Implementation

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


class ResourceType(Enum):
    LABOR = "labor"
    MATERIAL = "material"
    EQUIPMENT = "equipment"
    SUBCONTRACTOR = "subcontractor"


@dataclass
class Resource:
    code: str
    name: str
    resource_type: ResourceType
    unit: str
    unit_price: float
    currency: str = "USD"


@dataclass
class ResourceNorm:
    resource_code: str
    consumption: float  # Units per work item unit
    waste_factor: float = 1.0  # 1.1 = 10% waste


@dataclass
class WorkItem:
    code: str
    name: str
    unit: str
    resources: List[ResourceNorm] = field(default_factory=list)


@dataclass
class CostLineItem:
    work_item_code: str
    work_item_name: str
    quantity: float
    unit: str
    labor_cost: float
    material_cost: float
    equipment_cost: float
    subcontractor_cost: float
    total_cost: float


class ResourceBasedEstimator:
    """Calculate costs using resource-based method."""

    def __init__(self):
        self.resources: Dict[str, Resource] = {}
        self.work_items: Dict[str, WorkItem] = {}
        self.overhead_rate: float = 0.15
        self.profit_rate: float = 0.10
````
END THIRD-PARTY FILE 0b1e2cae63053fc0

The third-party file has ended. Everything between the 0b1e2cae63053fc0 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 2092 of 12273 bytes. © datadrivenconstruction · MIT · https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/2_DDC_Book/3.1-Cost-Estimation/cost-estimation-resource/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
