/rune:doc-processorfrom rune
Generates and parses office documents (PDF, DOCX, XLSX, PPTX, CSV). Useful for creating reports, exporting tabular data, or processing uploaded office files.
Ships in rune. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
docs when export to PDF/DOCX is requestedmarketing for generating PDF reports, PPTX presentations/rune doc-processor generate <format> <source> — manual document generation/rune doc-processor parse <file> — manual document parsingNone — pure L3 utility. Receives content, produces formatted output.
docs (L2): export documentation to PDF/DOCXmarketing (L2): generate PDF reports, PPTX pitch decks/rune doc-processor direct invocation| Format | Generate | Parse | Node.js Library | Python Library |
|---|---|---|---|---|
| Yes | Yes (via the runtime's document/PDF reader) | jsPDF, Puppeteer (HTML→PDF) | reportlab, weasyprint | |
| DOCX | Yes | Yes | docx (officegen) | python-docx |
| XLSX | Yes | Yes | ExcelJS | openpyxl |
| PPTX | Yes | Yes | pptxgenjs | python-pptx |
| CSV | Yes | Yes | Built-in (fs + string ops) | Built-in (csv module) |
| HTML | Yes | Yes | Built-in | Built-in |
Detect project language from context:
Identify:
| Source | Target | Strategy |
|---|---|---|
| Markdown → PDF | HTML intermediate | Render MD → HTML → Puppeteer → PDF |
| Markdown → DOCX | Direct conversion | Parse MD → docx library → DOCX |
| Data → XLSX | Direct write | Map data to sheets/cells → ExcelJS |
| Slides → PPTX | Template + data | Build slides from content → pptxgenjs |
| Data → CSV | Direct write | Serialize rows → CSV string → file |
| Any → HTML | Direct render | Template engine → HTML file |
Produce the generation script:
PDF from Markdown:
// 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:
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:
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 });
}
Run the generation script. Verify:
Identify file format from extension and MIME type.
| Format | Extraction Strategy |
|---|---|
| Use the runtime's native document/PDF reader when available; otherwise use a supported PDF parsing library | |
| DOCX | docx library → extract text, tables, images |
| XLSX | ExcelJS → extract sheets, rows, formulas |
| PPTX | pptxgenjs → extract slides, text, notes |
| CSV | Built-in parser → structured data |
Return parsed content as structured data:
{
"format": "xlsx",
"sheets": [
{
"name": "Sheet1",
"headers": ["Name", "Email", "Role"],
"rows": [["Alice", "[email protected]", "Engineer"], ...],
"rowCount": 100
}
]
}
Document Generated:
- Format: [PDF/DOCX/XLSX/PPTX/CSV]
- Path: [output file path]
- Size: [file size]
- Strategy: [e.g., Markdown → HTML → Puppeteer → PDF]
- Status: verified ✓
Structured JSON returned to calling skill:
{
"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).
npm install / pip install if not found| Failure Mode | Severity | Mitigation |
|---|---|---|
| Library not installed in project | HIGH | Check package.json/requirements.txt, suggest install command |
| PDF generation fails without headless browser | HIGH | Puppeteer needs chromium — suggest alternative (jsPDF) if unavailable |
| XLSX with formulas not evaluated | MEDIUM | Use ExcelJS formula support, warn if complex formulas |
| Large file generation runs out of memory | MEDIUM | Stream large datasets instead of loading all at once |
| Generated file is empty or corrupt | HIGH | Step 4 verification catches this — retry or report |
~1000-3000 tokens input, ~500-2000 tokens output. Sonnet — document processing requires understanding format libraries and generating correct code, but not deep reasoning.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rune-kit/rune --plugin rune67 skills in this plugin
/adversaryPre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation)./asset-creatorCreates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Use when generating visuals as code (vector/HTML), NOT raster images — for raster generation see @rune-pro/media. Outputs files with usage instructions./auditComprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.).Other plugins' skills for the same job