doc-pipeline
Skill433 starsChanged 9 months agoMITView on GitHub
Chain document operations into reusable pipelines
- Installs packages
Files
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 FlowPipeline 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_filePython 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 jinja2Resources
In this repository137 other files it gives its agents.
- .cursor/rules/project-rules.mdcCursor rule
- academic-searchSkill
- ads-copywriterSkill
- ai-agent-builderSkill
- airtable-automationSkill
- ai-slidesSkill
- Amazon SellerSkill
- Apple Shortcuts IntegrationSkill
- Applicant ScreeningSkill
- Asana AutomationSkill
- batch-convertSkill
- batch-processorSkill
- Brand Guidelines GeneratorSkill
- Browser AutomationSkill
- calendar-automationSkill
- Changelog GeneratorSkill
- chart-designerSkill
- Chat with PDFSkill
- ClickUp AutomationSkill
- company-researchSkill
- competitive-analysisSkill
- Content Research WriterSkill
- contract-reviewSkill
- contract-templateSkill
- cover-letterSkill
- crm-automationSkill
- crypto-reportSkill
- customer-successSkill
- cv-builderSkill
- data-analysisSkill
- Database SyncSkill
- data-extractorSkill
- data-pipelineSkill
- dcf-valuationSkill
- deep-researchSkill
- devops-automationSkill
- dev-slidesSkill
- diagram-creatorSkill
- discord-botSkill
- doc-parserSkill
- DocuSign AutomationSkill
- docx-manipulationSkill
- Email ClassifierSkill
- email-drafterSkill
- email-marketingSkill
- ETL PipelineSkill
- excel-automationSkill
- expense-reportSkill
- Expense TrackerSkill
- Facebook/Meta AdsSkill
- File OrganizerSkill
- financial-modelingSkill
- form-builderSkill
- gmail-workflowsSkill
- google-ads-managerSkill
- Home Assistant AutomationSkill
- hr-automationSkill
- html-slidesSkill
- html-to-pptSkill
- image-generationSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

