{"data":{"slug":"github-claude-office-skills-skills-doc-pipeline-20fbbb2bd240","title":"Doc Pipeline - Document Processing Workflow","summary":"Build and execute document processing pipelines with stages for extraction, transformation, and output generation. The pipeline can process PDFs, images, and Excel files, and generate reports in formats like DOCX and PPT.","url":"https:\/\/skillshunter.net\/skills\/github-claude-office-skills-skills-doc-pipeline-20fbbb2bd240","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-claude-office-skills-skills-doc-pipeline-20fbbb2bd240","markdown_url":"https:\/\/skillshunter.net\/skills\/github-claude-office-skills-skills-doc-pipeline-20fbbb2bd240.md","download_url":"https:\/\/skillshunter.net\/skills\/github-claude-office-skills-skills-doc-pipeline-20fbbb2bd240\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"To use this skill, ensure you have installed the required dependencies: python-docx, openpyxl, python-pptx, reportlab, and jinja2. Provide input data or files as specified in the pipeline configuration.","instructions":"---\n# \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n# CLAUDE OFFICE SKILL - Enhanced Metadata v2.0\n# \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n# Basic Information\nname: doc-pipeline\ndescription: \"Chain document operations into reusable pipelines\"\nversion: \"1.0\"\nauthor: claude-office-skills\nlicense: MIT\n\n# Categorization\ncategory: workflow\ntags:\n  - pipeline\n  - workflow\n  - document\n  - automation\ndepartment: All\n\n# AI Model Compatibility\nmodels:\n  recommended:\n    - claude-sonnet-4\n    - claude-opus-4\n  compatible:\n    - claude-3-5-sonnet\n    - gpt-4\n    - gpt-4o\n\n# Skill Capabilities\ncapabilities:\n  - document_workflow\n  - pipeline_automation\n\n# Language Support\nlanguages:\n  - en\n  - zh\n---\n\n# Doc Pipeline Skill\n\n## Overview\n\nThis skill enables building document processing pipelines - chain multiple operations (extract, transform, convert) into reusable workflows with data flowing between stages.\n\n## How to Use\n\n1. Describe what you want to accomplish\n2. Provide any required input data or files\n3. I'll execute the appropriate operations\n\n**Example prompts:**\n- \"PDF \u2192 Extract Text \u2192 Translate \u2192 Generate DOCX\"\n- \"Image \u2192 OCR \u2192 Summarize \u2192 Create Report\"\n- \"Excel \u2192 Analyze \u2192 Generate Charts \u2192 Create PPT\"\n- \"Multiple inputs \u2192 Merge \u2192 Format \u2192 Output\"\n\n## Domain Knowledge\n\n\n### Pipeline Architecture\n\n```\nStage 1      Stage 2      Stage 3      Stage 4\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502Extract\u2502 \u2192 \u2502Transform\u2502 \u2192 \u2502 AI   \u2502 \u2192 \u2502Output\u2502\n\u2502 PDF  \u2502    \u2502  Data  \u2502    \u2502Analyze\u2502   \u2502 DOCX \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n     \u2502           \u2502           \u2502           \u2502\n     \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                 Data Flow\n```\n\n### Pipeline DSL (Domain Specific Language)\n\n```yaml\n# pipeline.yaml\nname: contract-review-pipeline\ndescription: Extract, analyze, and report on contracts\n\nstages:\n  - name: extract\n    operation: pdf-extraction\n    input: $input_file\n    output: $extracted_text\n    \n  - name: analyze\n    operation: ai-analyze\n    input: $extracted_text\n    prompt: \"Review this contract for risks...\"\n    output: $analysis\n    \n  - name: report\n    operation: docx-generation\n    input: $analysis\n    template: templates\/review_report.docx\n    output: $output_file\n```\n\n### Python Implementation\n\n```python\nfrom typing import Callable, Any\nfrom dataclasses import dataclass\n\n@dataclass\nclass Stage:\n    name: str\n    operation: Callable\n    \nclass Pipeline:\n    def __init__(self, name: str):\n        self.name = name\n        self.stages: list[Stage] = []\n    \n    def add_stage(self, name: str, operation: Callable):\n        self.stages.append(Stage(name, operation))\n        return self  # Fluent API\n    \n    def run(self, input_data: Any) -> Any:\n        data = input_data\n        for stage in self.stages:\n            print(f\"Running stage: {stage.name}\")\n            data = stage.operation(data)\n        return data\n\n# Example usage\npipeline = Pipeline(\"contract-review\")\npipeline.add_stage(\"extract\", extract_pdf_text)\npipeline.add_stage(\"analyze\", analyze_with_ai)\npipeline.add_stage(\"generate\", create_docx_report)\n\nresult = pipeline.run(\"\/path\/to\/contract.pdf\")\n```\n\n### Advanced: Conditional Pipelines\n\n```python\nclass ConditionalPipeline(Pipeline):\n    def add_conditional_stage(self, name: str, condition: Callable, \n                               if_true: Callable, if_false: Callable):\n        def conditional_op(data):\n            if condition(data):\n                return if_true(data)\n            return if_false(data)\n        return self.add_stage(name, conditional_op)\n\n# Usage\npipeline.add_conditional_stage(\n    \"ocr_if_needed\",\n    condition=lambda d: d.get(\"has_images\"),\n    if_true=run_ocr,\n    if_false=lambda d: d\n)\n```\n\n\n## Best Practices\n\n1. **Keep stages focused (single responsibility)**\n2. **Use intermediate outputs for debugging**\n3. **Implement stage-level error handling**\n4. **Make pipelines configurable via YAML\/JSON**\n\n## Installation\n\n```bash\n# Install required dependencies\npip install python-docx openpyxl python-pptx reportlab jinja2\n```\n\n## Resources\n\n- [Custom Repository](https:\/\/github.com\/claude-office-skills\/skills)\n- [Claude Office Skills Hub](https:\/\/github.com\/claude-office-skills\/skills)\n","use_cases":["PDF \u2192 Extract Text \u2192 Translate \u2192 Generate DOCX","Image \u2192 OCR \u2192 Summarize \u2192 Create Report","Excel \u2192 Analyze \u2192 Generate Charts \u2192 Create PPT"],"limitations":[],"compatibility":[],"setup_tip":"```bash\n# Install required dependencies\npip install python-docx openpyxl python-pptx reportlab jinja2\n```","sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/claude-office-skills\/skills\/blob\/9c4c7d5cd2813a8936bf2c9fdb174ea883b85a11\/doc-pipeline\/SKILL.md","source_commit":"9c4c7d5cd2813a8936bf2c9fdb174ea883b85a11","license":"MIT","version":null,"listing_approved_at":"2026-11-22","created_at":"2026-11-21T13:33:28.000000Z","updated_at":"2026-11-22T11:17:55.000000Z","seo_title":"Doc Pipeline Document Processing Workflow","seo_description":"Create and run document processing pipelines with stages for text extraction, AI analysis, and report generation.","seo_keywords":["document processing pipeline","pdf text extraction","ocr image processing","ai document analysis","docx report generation"]}}