# semantic-search-cwicr

semantic-search-cwicr finds similar construction work items in DDC CWICR cost databases using natural-language vector search. Covers 8 national bases in 26 languages.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 118 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/semantic-search-cwicr/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/semantic-search-cwicr

## What it does

The skill searches 78,228 work items across construction cost databases from Turkey, China, Brazil, Spain, Italy, Vietnam, Indonesia and Greece. It uses BAAI/bge-m3 embeddings (1024 dimensions) and Qdrant vector storage: each language gets a collection named `cwicr_{LANG}_v3`. Returns work item codes, descriptions, units, unit prices, classification hierarchies and resource component breakdowns.

Inside sits a Python class `CWICRSemanticSearch`: it encodes queries via `SentenceTransformer`, retrieves nearest neighbors from Qdrant, and returns a DataFrame with `rate_code`, `rate_original_name`, `total_cost_per_position` and similarity scores. You can filter by work category or search for BIM elements through the OpenConstructionERP API (`POST /api/v1/costs/suggest-for-element`).

Requires Python3, a `QDRANT_URL` environment variable pointing to your Qdrant instance, and pip packages `qdrant-client`, `pandas`, `sentence-transformers`. Vietnam and Indonesia bases carry coefficients with zero prices — actual pricing comes from market resource sheets in the `markets/*.csv` catalogs shipped with each release.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

2. **Manually: put the files in place**
- File: `.cursor/skills/semantic-search-cwicr/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/semantic-search-cwicr
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill semantic-search-cwicr -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/semantic-search-cwicr
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/semantic-search-cwicr/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 semantic-search-cwicr -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/semantic-search-cwicr/SKILL.md

## When to use it
- find work items for cost estimates using natural-language descriptions
- match positions across different regional cost bases
- retrieve unit prices for BIM model elements
- search cost data in 26 languages without translating technical terms
- filter work items by category and return resource components

## Example prompts
- Search for reinforced concrete foundation work items in the Turkey national base
- Find similar positions to 'brick wall masonry' in `cwicr_tr_v3` collection
- Show resource breakdown and unit price for work item `15.115.1008`

## 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: af861d944394fbfd.

BEGIN THIRD-PARTY FILE af861d944394fbfd
```text
---
name: "semantic-search-cwicr"
description: "Semantic search in the DDC CWICR construction cost database using vector embeddings (BGE-M3, 1024-dim, per-language Qdrant collections). Find similar work items and resources for cost estimation across 8 national bases and 30 markets in 26 languages."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw": {"emoji": "🗄️", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"], "env": ["QDRANT_URL"]}, "primaryEnv": "QDRANT_URL"}}
---

# Semantic Search in DDC CWICR Database

## Business Case

### Problem Statement
Construction cost estimation requires finding relevant work items from large databases. Traditional keyword search fails when:
- Users describe work in natural language
- Terminology varies across regions and languages
- Similar work items have different naming conventions

### Solution
DDC CWICR provides pre-computed embeddings (BAAI/bge-m3, 1024 dimensions) enabling multilingual semantic search across **8 national bases (78,228 positions)** plus the **30-market global base** in **26 languages**, with 48 PPP-repriced market catalogs per national base.

### Business Value
- **90% faster** work item lookup compared to manual search
- **Multi-language**: Arabic, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Hindi, Indonesian, Italian, Japanese, Korean, Mongolian, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Thai, Turkish, Vietnamese
- **Higher accuracy** by finding semantically similar items, not just keyword matches

## Data landscape (2026)

| National base | Region id | Positions |
|---|---|---|
| Turkey (Birim Fiyat) | `TR_NATIONAL` | 22,704 |
```
END THIRD-PARTY FILE af861d944394fbfd

The third-party file has ended. Everything between the af861d944394fbfd 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 1772 of 7079 bytes. © datadrivenconstruction · MIT · https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/1_DDC_Toolkit/CWICR-Database/semantic-search-cwicr/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
