# doc-pipeline

Build reusable document-processing pipelines where data moves through extraction, transformation and output stages. Use it for PDF, image or spreadsheet workflows.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4600 installs · ★ 540
- Author: claude-office-skills
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/claude-office-skills/skills/tree/HEAD/doc-pipeline/SKILL.md
- Updated: 2026-01-31
- HTML: https://affpapa.org/en/nevibecode/skills/doc-pipeline

## What it does

This skill turns document work into ordered stages that pass data to the next step. A pipeline can extract PDF text, send it for analysis, then generate a DOCX report. It also covers OCR from images, summaries, reports, spreadsheet analysis and presentation output.

Pipelines can be described in `pipeline.yaml`, with named inputs and outputs for each stage. The example Python implementation includes `Stage` and `Pipeline` classes, a sequential `run()` method, and a conditional stage that runs OCR when images are present. A report stage can use `templates/review_report.docx`.

Installation lists `python-docx`, `openpyxl`, `python-pptx`, `reportlab` and `jinja2` as dependencies. Check the project Python environment before running a pipeline.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-office-skills/skills --skill doc-pipeline -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-office-skills/skills --skill doc-pipeline -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-office-skills/skills --skill doc-pipeline -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install claude-office-skills/skills doc-pipeline
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add claude-office-skills/skills --skill doc-pipeline -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/claude-office-skills/skills --path doc-pipeline
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add claude-office-skills/skills --skill doc-pipeline -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/claude-office-skills/skills/tree/HEAD/doc-pipeline/SKILL.md

## When to use it
- extract PDF text before document analysis
- run OCR on images and create a report
- analyse an Excel file and generate charts for a presentation
- merge several inputs into a formatted output
- add OCR only when an input contains images

## Example prompts
- Build a pipeline that extracts PDF text, analyses it, and creates a DOCX report.
- Process these images with OCR, write a summary, and create a report.
- Create `pipeline.yaml` to merge files, format the result, and produce an output document.

## 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: 2d9debf3187f9357.

BEGIN THIRD-PARTY FILE 2d9debf3187f9357
````text
---
# ═══════════════════════════════════════════════════════════════════════════════
# CLAUDE OFFICE SKILL - Enhanced Metadata v2.0
# ═══════════════════════════════════════════════════════════════════════════════

# Basic Information
name: doc-pipeline
description: "Chain document operations into reusable pipelines"
version: "1.0"
author: claude-office-skills
license: MIT

# Categorization
category: workflow
tags:
  - pipeline
  - workflow
  - document
  - automation
department: All

# AI Model Compatibility
models:
  recommended:
    - claude-sonnet-4
    - claude-opus-4
  compatible:
    - claude-3-5-sonnet
    - gpt-4
    - gpt-4o

# Skill Capabilities
capabilities:
  - document_workflow
  - pipeline_automation

# Language Support
languages:
  - en
  - zh
---

# Doc Pipeline Skill

## Overview

This skill enables building document processing pipelines - chain multiple operations (extract, transform, convert) into reusable workflows with data flowing between stages.

## How to Use

1. Describe what you want to accomplish
2. Provide any required input data or files
3. I'll execute the appropriate operations

**Example prompts:**
- "PDF → Extract Text → Translate → Generate DOCX"
- "Image → OCR → Summarize → Create Report"
- "Excel → Analyze → Generate Charts → Create PPT"
- "Multiple inputs → Merge → Format → Output"

## Domain Knowledge


### Pipeline Architecture

```
Stage 1      Stage 2      Stage 3      Stage 4
┌──────┐    ┌──────┐    ┌──────┐    ┌──────┐
│Extract│ → │Transform│ → │ AI   │ → │Output│
│ PDF  │    │  Data  │    │Analyze│   │ DOCX │
└──────┘    └──────┘    └──────┘    └──────┘
     │           │           │           │
     └───────────┴───────────┴───────────┘
                 Data Flow
```

### Pipeline DSL (Domain Specific Language)

```yaml
# pipeline.yaml
name: contract-review-pipeline
description: Extract, analyze, and report on contracts

stages:
  - name: extract
    operation: pdf-extraction
    input: $input_file
    output: $extracted_text
    
  - name: analyze
    operation: ai-analyze
    input: $extracted_text
    prompt: "Review this contract for risks..."
    output: $analysis
    
  - name: report
    operation: docx-generation
    input: $analysis
    template: templates/review_report.docx
    output: $output_file
```

### Python Implementation

```python
from typing import Callable, Any
````
END THIRD-PARTY FILE 2d9debf3187f9357

The third-party file has ended. Everything between the 2d9debf3187f9357 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 2957 of 4864 bytes. © claude-office-skills · MIT · https://github.com/claude-office-skills/skills/tree/HEAD/doc-pipeline/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
