본문으로 건너뛰기
cccskills
무료GitHub에 공개

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).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Excel
설치 방법 보기

포함된 파일(1)

  • SKILL.md8.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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:

// 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 });
}

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:

{
  "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:

{
  "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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

adversary

무료

Pre-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).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

Creates 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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

audit

무료

Comprehensive 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.).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

autopsy

무료

Full codebase health assessment. Use when diagnosing project health or starting a rescue workflow on legacy code — OR when evaluating an external GitHub repo for dependency / fork / contribution decisions (--external mode). Analyzes complexity, dependencies, dead code, tech debt, and git hotspots. Produces a health score and rescue plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

ba

무료

Business Analyst agent. Use when starting a new feature requiring requirements elicitation BEFORE plan or cook. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document that plan and cook consume.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

Creative ideation and solution exploration. Generates multiple approaches with trade-offs, uses structured frameworks (SCAMPER, First Principles), and hands off to plan for structuring.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Rune-kit/rune862026년 8월 16일 업데이트

Rune-kit의 스킬 모두 보기

이 스킬의 문제 신고