# pdf-construction

pdf-construction extracts data from RFI forms, splits drawing sets by sheet, parses CSI specifications, and builds submittal packages from construction PDFs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 126 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/4_DDC_Curated/Document-Generation/pdf-construction/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/pdf-construction

## What it does

The skill adapts PDF manipulation routines to construction paperwork. It provides Python scripts that parse Request for Information documents via regex, pull divisions from CSI MasterFormat specs, and cut large drawing packages into individual single-sheet PDF files named by drawing numbers.

It also handles submittal packaging: it merges cover sheets, product data, and shop drawings into a single deliverable with clickable bookmarks. Extracted metadata can be fed directly into tracking spreadsheets through `pandas`.

You must have `python3` along with `pypdf`, `pdfplumber`, and `reportlab` installed in your environment; without these packages, the scripts cannot run.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

2. **Manually: put the files in place**
- File: `.cursor/skills/pdf-construction/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 4_DDC_Curated/Document-Generation/pdf-construction
```

2. **Manually: put the files in place**
- File: `.github/skills/pdf-construction/SKILL.md`

### Gemini CLI

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

2. **Platform CLI**
```bash
gemini skills install https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --path 4_DDC_Curated/Document-Generation/pdf-construction
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pdf-construction/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 pdf-construction -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/4_DDC_Curated/Document-Generation/pdf-construction/SKILL.md

## When to use it
- extract structured metadata from construction RFI documents
- assemble submittal packages with bookmarks from multiple PDFs
- split full drawing packages into standalone sheet files
- parse CSI MasterFormat specification divisions into text sections

## Example prompts
- Extract all fields from RFI_045.pdf and append the record to RFI_Log.xlsx
- Split drawings_set.pdf into individual files using sheet numbers from the title block
- Build a submittal package by combining cover.pdf with the shop drawing files

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

BEGIN THIRD-PARTY FILE f72fe77f900ec970
````text
---
name: "pdf-construction"
description: "PDF processing for construction documents: RFIs, submittals, specifications, drawing packages. Extract data, merge packages, fill forms."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw": {"emoji": "📄", "os": ["darwin", "linux", "win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}
---
# PDF Processing for Construction

## Overview

Adapted from Anthropic's PDF skill for construction document workflows.

## Construction Use Cases

### 1. RFI Processing
Extract structured data from Request for Information documents.

```python
from pypdf import PdfReader
import re

def extract_rfi_data(pdf_path: str) -> dict:
    """Extract RFI fields from PDF."""
    reader = PdfReader(pdf_path)
    text = ""
    for page in reader.pages:
        text += page.extract_text()

    # Parse common RFI fields
    rfi_data = {
        'rfi_number': re.search(r'RFI\s*#?\s*(\d+)', text),
        'subject': re.search(r'Subject:?\s*(.+?)(?:\n|$)', text),
        'from': re.search(r'From:?\s*(.+?)(?:\n|$)', text),
        'to': re.search(r'To:?\s*(.+?)(?:\n|$)', text),
        'date': re.search(r'Date:?\s*(\d{1,2}[/-]\d{1,2}[/-]\d{2,4})', text),
        'spec_section': re.search(r'Spec(?:ification)?\s*Section:?\s*(.+?)(?:\n|$)', text),
        'drawing_ref': re.search(r'Drawing\s*(?:Ref)?:?\s*(.+?)(?:\n|$)', text),
    }

    return {k: v.group(1) if v else None for k, v in rfi_data.items()}
```

### 2. Submittal Package Creation
Merge multiple PDFs into organized submittal packages.

```python
from pypdf import PdfWriter, PdfReader
from pathlib import Path

def create_submittal_package(
    cover_sheet: str,
    product_data: list,
    shop_drawings: list,
    output_path: str
) -> str:
    """Create organized submittal package."""
    writer = PdfWriter()

    # Add cover sheet
    writer.append(cover_sheet)

    # Add bookmarked sections
    page_num = len(PdfReader(cover_sheet).pages)

    # Product Data section
    writer.add_outline_item("Product Data", page_num)
    for pdf in product_data:
        writer.append(pdf)
        page_num += len(PdfReader(pdf).pages)

    # Shop Drawings section
    writer.add_outline_item("Shop Drawings", page_num)
    for pdf in shop_drawings:
        writer.append(pdf)
        page_num += len(PdfReader(pdf).pages)
````
END THIRD-PARTY FILE f72fe77f900ec970

The third-party file has ended. Everything between the f72fe77f900ec970 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 2371 of 5103 bytes. © datadrivenconstruction · MIT · https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction/tree/HEAD/4_DDC_Curated/Document-Generation/pdf-construction/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
