Document Processing Workflow
Process, create, convert, and analyze documents by combining PDF tools, Word document generation, spreadsheet processing, and web research.
Sub-Skills
anthropics/pdf — Full PDF toolkit: text extraction, table extraction, creation, merging, splitting, OCR for scanned docs, watermarking, page rotation, form filling, password protection. Uses pypdf, pdfplumber, reportlab.
anthropics/docx — Word document creation and editing: formatting, tracked changes, comments, two-column layouts, text extraction, conversion to images. Uses docx-js and OOXML.
anthropics/xlsx — Excel spreadsheet creation and analysis: formulas, formatting, data visualization, financial models, pivot-style analysis. Uses openpyxl and pandas.
rebyteai/internet-search — Research for content generation, template references, or data to populate documents.
Workflow
Step 1: Identify the Operation
Parse what the user wants. Document tasks fall into these categories:
| Operation |
Description |
Primary Skill |
| Extract |
Pull text, tables, data, images from a document |
pdf, xlsx |
| Create |
Build a new document from scratch |
docx, pdf, xlsx |
| Transform |
Convert between formats, merge, split, restructure |
pdf, docx, xlsx |
| Analyze |
Summarize, calculate stats, generate insights |
xlsx |
| Edit |
Modify an existing document (watermark, fill form, reformat) |
pdf, docx, xlsx |
Identify:
- Input — Is there an uploaded file? What format? (PDF, DOCX, XLSX, CSV, scanned image)
- Operation — Extract, create, transform, analyze, or edit?
- Output format — PDF, Word doc, Excel, online spreadsheet, JSON, plain text?
Step 2: Process Input (if file uploaded)
When the user uploads a file:
PDF files:
- Use
pdf for text extraction, table extraction, form data, or image extraction
- For scanned PDFs, use OCR capabilities (pdftotext, Tesseract)
- For tables, pdfplumber gives structured row/column data
Spreadsheet files (XLSX, CSV):
- Use
xlsx (openpyxl + pandas) for analysis, formula work, and formatting
- pandas for statistical analysis (describe(), groupby(), pivot tables)
- Preserve existing formulas when editing
Word files (DOCX):
- Use
docx for reading content, extracting text, modifying tracked changes
- Pandoc for text extraction when formatting doesn't matter
If no file is uploaded and the task is "create from scratch," skip to Step 3.
Step 3: Execute the Operation
Creating documents:
Word documents:
Use docx with html2pptx-style workflow:
- Build content structure (headings, paragraphs, tables, lists)
- Apply professional formatting (styles, fonts, colors)
- Add structural elements (TOC, headers/footers, page numbers)
PDF documents:
Use pdf with reportlab for creation:
- Define page layout and styles
- Add content with proper typography
- Include images, tables, charts as needed
Spreadsheets:
- Use
xlsx for Excel files with formulas, formatting, and data visualization
Templates:
For reusable templates (mail merge, invoices, forms):
- Create the document structure
- Add placeholder fields or form fields
- Include instructions for use
Transforming documents:
Merge PDFs: Use pdf to combine multiple files in order, add page numbers and bookmarks
Split PDFs: Detect chapter/section boundaries, create separate files
Convert formats: PDF → text (pdftotext), DOCX → text (pandoc), CSV → XLSX (pandas + openpyxl)
Restructure: Split sheets, combine data, reorganize sections
Analyzing documents:
- Extract the data (text, tables, numbers)
- Process with appropriate tools (pandas for stats, formulas for calculations)
- Generate insights (summaries, outliers, trends)
- Present results (new document, spreadsheet, or inline summary)
Step 4: Research (if needed)
Use internet-search when creating documents that need external content:
- Industry benchmarks for comparison documents
- Template best practices (e.g., invoice standards, contract clauses)
- Data to populate templates (current rates, regulations, standards)
Skip this step for pure file processing (merge, split, extract, OCR).
Step 5: Deliver
Based on what was created:
Downloadable files (PDF, DOCX, XLSX):
- Upload to Artifact Store
- Note the format and any special instructions (e.g., "enable macros for formulas")
Extracted data:
- For structured data: output as spreadsheet or JSON
- For text: output as formatted markdown or plain text
- For tables: output as spreadsheet with proper column headers
Reports/analysis:
- Combine findings into a clear summary
- Include both the raw data and the analysis
Decision Points
"Which PDF tool?" — anthropics/pdf covers all PDF operations. It's the only PDF skill needed.
"Scanned PDF?" — If the PDF has no extractable text (scanned/photographed), use OCR. The pdf skill includes pdftotext and Tesseract for this.
"Should I use internet-search?" — Only when creating documents that need external content. Not needed for processing uploaded files.
"Multiple output formats?" — If the user doesn't specify, choose the most natural format: tables → spreadsheet, reports → Word/PDF, data → CSV/JSON. Ask if ambiguous.
1---2name: docx3description: Process, create, convert, and analyze documents — PDFs, Word docs, spreadsheets, and more. Use when user wants to extract data from PDFs, create Word documents, merge or split PDFs, convert between formats, analyze spreadsheet data, or process uploaded files. Triggers include "extract from PDF", "create Word document", "merge PDFs", "convert document", "analyze spreadsheet", "OCR this scan", "extract tables", "create template", "process invoice".4---56# Document Processing Workflow78Process, create, convert, and analyze documents by combining PDF tools, Word document generation, spreadsheet processing, and web research.910## Sub-Skills1112- `anthropics/pdf` — Full PDF toolkit: text extraction, table extraction, creation, merging, splitting, OCR for scanned docs, watermarking, page rotation, form filling, password protection. Uses pypdf, pdfplumber, reportlab.13- `anthropics/docx` — Word document creation and editing: formatting, tracked changes, comments, two-column layouts, text extraction, conversion to images. Uses docx-js and OOXML.14- `anthropics/xlsx` — Excel spreadsheet creation and analysis: formulas, formatting, data visualization, financial models, pivot-style analysis. Uses openpyxl and pandas.15- `rebyteai/internet-search` — Research for content generation, template references, or data to populate documents.1617## Workflow1819### Step 1: Identify the Operation2021Parse what the user wants. Document tasks fall into these categories:2223| Operation | Description | Primary Skill |24|-----------|-------------|---------------|25| **Extract** | Pull text, tables, data, images from a document | `pdf`, `xlsx` |26| **Create** | Build a new document from scratch | `docx`, `pdf`, `xlsx` |27| **Transform** | Convert between formats, merge, split, restructure | `pdf`, `docx`, `xlsx` |28| **Analyze** | Summarize, calculate stats, generate insights | `xlsx` |29| **Edit** | Modify an existing document (watermark, fill form, reformat) | `pdf`, `docx`, `xlsx` |3031Identify:32- **Input** — Is there an uploaded file? What format? (PDF, DOCX, XLSX, CSV, scanned image)33- **Operation** — Extract, create, transform, analyze, or edit?34- **Output format** — PDF, Word doc, Excel, online spreadsheet, JSON, plain text?3536### Step 2: Process Input (if file uploaded)3738When the user uploads a file:3940**PDF files:**41- Use `pdf` for text extraction, table extraction, form data, or image extraction42- For scanned PDFs, use OCR capabilities (pdftotext, Tesseract)43- For tables, pdfplumber gives structured row/column data4445**Spreadsheet files (XLSX, CSV):**46- Use `xlsx` (openpyxl + pandas) for analysis, formula work, and formatting47- pandas for statistical analysis (describe(), groupby(), pivot tables)48- Preserve existing formulas when editing4950**Word files (DOCX):**51- Use `docx` for reading content, extracting text, modifying tracked changes52- Pandoc for text extraction when formatting doesn't matter5354If no file is uploaded and the task is "create from scratch," skip to Step 3.5556### Step 3: Execute the Operation5758**Creating documents:**5960*Word documents:*61Use `docx` with html2pptx-style workflow:621. Build content structure (headings, paragraphs, tables, lists)632. Apply professional formatting (styles, fonts, colors)643. Add structural elements (TOC, headers/footers, page numbers)6566*PDF documents:*67Use `pdf` with reportlab for creation:681. Define page layout and styles692. Add content with proper typography703. Include images, tables, charts as needed7172*Spreadsheets:*73- Use `xlsx` for Excel files with formulas, formatting, and data visualization7475*Templates:*76For reusable templates (mail merge, invoices, forms):771. Create the document structure782. Add placeholder fields or form fields793. Include instructions for use8081**Transforming documents:**8283*Merge PDFs:* Use `pdf` to combine multiple files in order, add page numbers and bookmarks84*Split PDFs:* Detect chapter/section boundaries, create separate files85*Convert formats:* PDF → text (pdftotext), DOCX → text (pandoc), CSV → XLSX (pandas + openpyxl)86*Restructure:* Split sheets, combine data, reorganize sections8788**Analyzing documents:**89901. Extract the data (text, tables, numbers)912. Process with appropriate tools (pandas for stats, formulas for calculations)923. Generate insights (summaries, outliers, trends)934. Present results (new document, spreadsheet, or inline summary)9495### Step 4: Research (if needed)9697Use `internet-search` when creating documents that need external content:98- Industry benchmarks for comparison documents99- Template best practices (e.g., invoice standards, contract clauses)100- Data to populate templates (current rates, regulations, standards)101102Skip this step for pure file processing (merge, split, extract, OCR).103104### Step 5: Deliver105106Based on what was created:107108**Downloadable files (PDF, DOCX, XLSX):**109- Upload to Artifact Store110- Note the format and any special instructions (e.g., "enable macros for formulas")111112**Extracted data:**113- For structured data: output as spreadsheet or JSON114- For text: output as formatted markdown or plain text115- For tables: output as spreadsheet with proper column headers116117**Reports/analysis:**118- Combine findings into a clear summary119- Include both the raw data and the analysis120121## Decision Points122123- **"Which PDF tool?"** — `anthropics/pdf` covers all PDF operations. It's the only PDF skill needed.124125- **"Scanned PDF?"** — If the PDF has no extractable text (scanned/photographed), use OCR. The `pdf` skill includes pdftotext and Tesseract for this.126127- **"Should I use `internet-search`?"** — Only when creating documents that need external content. Not needed for processing uploaded files.128129- **"Multiple output formats?"** — If the user doesn't specify, choose the most natural format: tables → spreadsheet, reports → Word/PDF, data → CSV/JSON. Ask if ambiguous.