Doc Processor logo

Doc Processor

Organization
Rune-kit
doc-processor

Generate and parse office documents — PDF, DOCX, XLSX, PPTX, CSV. Use when creating reports, exporting tabular data, or processing uploaded office files. NOT for project documentation (use docs).

Overview

PublisherRune-kit
Repositoryrune
Skill namedoc-processor
Stars
88
Forks
26
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Rune-kit on GitHub. Read the source before you install it.

Installation

Install the Doc Processor AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Rune-kit/rune/tree/master/skills/doc-processor
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Rune-kit/rune.git /tmp/rune
mkdir -p .claude/skills
cp -r /tmp/rune/skills/doc-processor .claude/skills/doc-processor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Doc Processor in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Doc Processor on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Doc Processor is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

doc-processor

Purpose

Document format utility. Generates and parses office documents (PDF, DOCX, XLSX, PPTX, CSV). Pure utility — no business logic, just format handling. Other skills call doc-processor when they need to produce or consume structured documents.

Triggers

  • Called by docs when export to PDF/DOCX is requested
  • Called by marketing for generating PDF reports, PPTX presentations
  • Called by Rune Pro packs for business document generation
  • /rune doc-processor generate <format> <source> — manual document generation
  • /rune doc-processor parse <file> — manual document parsing

Calls (outbound)

None — pure L3 utility. Receives content, produces formatted output.

Called By (inbound)

  • docs (L2): export documentation to PDF/DOCX
  • marketing (L2): generate PDF reports, PPTX pitch decks
  • Rune Pro packs: business document generation (invoices, proposals, reports)
  • User: /rune doc-processor direct invocation

Format Reference

Supported Formats

FormatGenerateParseNode.js LibraryPython Library
PDFYesYes (via the runtime's document/PDF reader)jsPDF, Puppeteer (HTML→PDF)reportlab, weasyprint
DOCXYesYesdocx (officegen)python-docx
XLSXYesYesExcelJSopenpyxl
PPTXYesYespptxgenjspython-pptx
CSVYesYesBuilt-in (fs + string ops)Built-in (csv module)
HTMLYesYesBuilt-inBuilt-in

Library Selection

Detect project language from context:

  • If Node.js project → use Node.js libraries
  • If Python project → use Python libraries
  • If unclear → default to Node.js (wider ecosystem)
  • For HTML→PDF → prefer Puppeteer (best fidelity) or weasyprint (Python)

Executable Steps

Generate Mode

Step 1 — Determine Format and Template

Identify:

  • Target format (PDF, DOCX, XLSX, PPTX, CSV)
  • Content source (markdown, data object, template + data)
  • Styling requirements (brand colors, fonts, layout)
  • Output path
Step 2 — Select Generation Strategy
SourceTargetStrategy
Markdown → PDFHTML intermediateRender MD → HTML → Puppeteer → PDF
Markdown → DOCXDirect conversionParse MD → docx library → DOCX
Data → XLSXDirect writeMap data to sheets/cells → ExcelJS
Slides → PPTXTemplate + dataBuild slides from content → pptxgenjs
Data → CSVDirect writeSerialize rows → CSV string → file
Any → HTMLDirect renderTemplate engine → HTML file
Step 3 — Generate Code

Produce the generation script:

PDF from Markdown:

javascript
// Strategy: Markdown → HTML → Puppeteer → PDF
const puppeteer = require('puppeteer');
const { marked } = require('marked');

async function generatePDF(markdownContent, outputPath, options = {}) {
  const html = `
    <!DOCTYPE html>
    <html>
    <head><style>${options.css || defaultCSS}</style></head>
    <body>${marked(markdownContent)}</body>
    </html>
  `;
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.setContent(html, { waitUntil: 'networkidle0' });
  await page.pdf({ path: outputPath, format: 'A4', margin: { top: '1in', bottom: '1in', left: '1in', right: '1in' } });
  await browser.close();
}

XLSX from Data:

javascript
const ExcelJS = require('exceljs');

async function generateXLSX(data, outputPath, options = {}) {
  const workbook = new ExcelJS.Workbook();
  const sheet = workbook.addWorksheet(options.sheetName || 'Sheet1');
  if (data.length > 0) {
    sheet.columns = Object.keys(data[0]).map(key => ({ header: key, key, width: 20 }));
    data.forEach(row => sheet.addRow(row));
    // Style header row
    sheet.getRow(1).font = { bold: true };
    sheet.getRow(1).fill = { type: 'pattern', pattern: 'solid', fgColor: { argb: 'FFE0E0E0' } };
  }
  await workbook.xlsx.writeFile(outputPath);
}

PPTX from Slides:

javascript
const PptxGenJS = require('pptxgenjs');

function generatePPTX(slides, outputPath, options = {}) {
  const pptx = new PptxGenJS();
  pptx.author = options.author || 'Generated by Rune';
  slides.forEach(slide => {
    const s = pptx.addSlide();
    if (slide.title) s.addText(slide.title, { x: 0.5, y: 0.5, fontSize: 28, bold: true });
    if (slide.body) s.addText(slide.body, { x: 0.5, y: 1.5, fontSize: 16 });
    if (slide.bullets) s.addText(slide.bullets.map(b => ({ text: b, options: { bullet: true } })), { x: 0.5, y: 1.5, fontSize: 16 });
  });
  return pptx.writeFile({ fileName: outputPath });
}
Step 4 — Execute and Verify

Run the generation script. Verify:

  • Output file exists and is non-empty
  • File can be opened (basic format validation)
  • Content matches expected structure

Parse Mode

Step 1 — Detect Format

Identify file format from extension and MIME type.

Step 2 — Extract Content
FormatExtraction Strategy
PDFUse the runtime's native document/PDF reader when available; otherwise use a supported PDF parsing library
DOCXdocx library → extract text, tables, images
XLSXExcelJS → extract sheets, rows, formulas
PPTXpptxgenjs → extract slides, text, notes
CSVBuilt-in parser → structured data
Step 3 — Structure Output

Return parsed content as structured data:

json
{
  "format": "xlsx",
  "sheets": [
    {
      "name": "Sheet1",
      "headers": ["Name", "Email", "Role"],
      "rows": [["Alice", "alice@co.com", "Engineer"], ...],
      "rowCount": 100
    }
  ]
}

Output Format

Generate Mode Output

  • Generated document file at specified output path
  • Verification report: file exists, non-empty, format valid
Document Generated:
- Format: [PDF/DOCX/XLSX/PPTX/CSV]
- Path: [output file path]
- Size: [file size]
- Strategy: [e.g., Markdown → HTML → Puppeteer → PDF]
- Status: verified ✓

Parse Mode Output

Structured JSON returned to calling skill:

json
{
  "format": "xlsx",
  "metadata": { "author": "...", "created": "..." },
  "content": {
    "sheets": [
      {
        "name": "Sheet1",
        "headers": ["Col1", "Col2"],
        "rows": [["val1", "val2"]],
        "rowCount": 100
      }
    ]
  }
}

Format-specific fields: sheets (XLSX), pages (PDF/DOCX), slides (PPTX), rows (CSV).

Constraints

  1. MUST verify output file exists and is non-empty after generation
  2. MUST handle missing libraries gracefully — suggest npm install / pip install if not found
  3. MUST NOT embed secrets or sensitive data in generated documents
  4. MUST preserve formatting fidelity — generated docs should look professional
  5. Parse mode MUST handle malformed files gracefully — report errors, don't crash
  6. MUST use appropriate library for each format — don't force one library for all formats

Sharp Edges

Failure ModeSeverityMitigation
Library not installed in projectHIGHCheck package.json/requirements.txt, suggest install command
PDF generation fails without headless browserHIGHPuppeteer needs chromium — suggest alternative (jsPDF) if unavailable
XLSX with formulas not evaluatedMEDIUMUse ExcelJS formula support, warn if complex formulas
Large file generation runs out of memoryMEDIUMStream large datasets instead of loading all at once
Generated file is empty or corruptHIGHStep 4 verification catches this — retry or report

Done When

Generate Mode

  • Target format and source identified
  • Generation strategy selected
  • Code produced and executed
  • Output file verified (exists, non-empty, valid format)

Parse Mode

  • File format detected
  • Content extracted to structured data
  • Output returned in consistent JSON format

Cost Profile

~1000-3000 tokens input, ~500-2000 tokens output. Sonnet — document processing requires understanding format libraries and generating correct code, but not deep reasoning.

Frequently asked questions

What does the Doc Processor AI skill do?

Generate and parse office documents — PDF, DOCX, XLSX, PPTX, CSV. Use when creating reports, exporting tabular data, or processing uploaded office files. NOT for project documentation (use docs).

Why use Doc Processor on TypingMind?

Because you install it once and use it with any model. Doc Processor is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Doc Processor in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Rune-kit/rune/tree/master/skills/doc-processor. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Doc Processor?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Doc Processor?

As many as you like. As long as a model supports skills, you can use Doc Processor with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Doc Processor AI skill free?

Yes. It is published on GitHub by Rune-kit under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇