Home/Data & AI/doc-pipeline
D

doc-pipeline

by @claude-office-skillsv
4.3(20)

Build document processing pipelines, chaining extraction, transformation, and other operations into reusable workflows for automatic data flow between stages.

data-extractionautomationinformation-retrievalworkflowdata-analysisGitHub
Installation
npx skills add claude-office-skills/skills --skill doc-pipeline
compare_arrows

Before / After Comparison

1
Before

Processing a batch of documents requires manually executing multiple steps: download, format conversion, data extraction, cleaning, and storage. Each step is operated independently, prone to errors, and not reusable. Processing 100 documents takes a full day.

After

Define a document processing pipeline once, then automatically execute the entire process in batches. Data flows seamlessly between extraction, transformation, and loading stages, supporting parallel processing and error retries. 100 documents can be completed in 10 minutes with controllable quality.

SKILL.md

doc-pipeline

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

  • Describe what you want to accomplish

  • Provide any required input data or files

  • 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)

# 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

from typing import Callable, Any
from dataclasses import dataclass

@dataclass
class Stage:
    name: str
    operation: Callable
    
class Pipeline:
    def __init__(self, name: str):
        self.name = name
        self.stages: list[Stage] = []
    
    def add_stage(self, name: str, operation: Callable):
        self.stages.append(Stage(name, operation))
        return self  # Fluent API
    
    def run(self, input_data: Any) -> Any:
        data = input_data
        for stage in self.stages:
            print(f"Running stage: {stage.name}")
            data = stage.operation(data)
        return data

# Example usage
pipeline = Pipeline("contract-review")
pipeline.add_stage("extract", extract_pdf_text)
pipeline.add_stage("analyze", analyze_with_ai)
pipeline.add_stage("generate", create_docx_report)

result = pipeline.run("/path/to/contract.pdf")

Advanced: Conditional Pipelines

class ConditionalPipeline(Pipeline):
    def add_conditional_stage(self, name: str, condition: Callable, 
                               if_true: Callable, if_false: Callable):
        def conditional_op(data):
            if condition(data):
                return if_true(data)
            return if_false(data)
        return self.add_stage(name, conditional_op)

# Usage
pipeline.add_conditional_stage(
    "ocr_if_needed",
    condition=lambda d: d.get("has_images"),
    if_true=run_ocr,
    if_false=lambda d: d
)

Best Practices

  • Keep stages focused (single responsibility)

  • Use intermediate outputs for debugging

  • Implement stage-level error handling

  • Make pipelines configurable via YAML/JSON

Installation

# Install required dependencies
pip install python-docx openpyxl python-pptx reportlab jinja2

Resources

Weekly Installs303Repositoryclaude-office-s…s/skillsGitHub Stars35First SeenMar 5, 2026Security AuditsGen Agent Trust HubPassSocketPassSnykPassInstalled onclaude-code256opencode120github-copilot119kimi-cli117amp117cline117

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs1.8K
Rating4.3 / 5.0
Version
Updated2026年5月22日
Comparisons1

User Rating

4.3(20)
5
40%
4
50%
3
10%
2
0%
1
0%

Rate this Skill

0.0

Compatible Platforms

🔧Claude Code

Timeline

Created2026年3月30日
Last Updated2026年5月22日