agentleFS
darellchua2darellchua2/civiltekk-opencode-claude-skills/skills/office-document-router-skill/SKILL.md

office-document-router-skill

Skill7 starsChanged 56 days agoApache-2.0View on GitHub

Office and document router — one entry point for Word (.docx), Excel (.xlsx/.csv), PowerPoint (.pptx), and PDF tasks: creation, editing, extraction, forms, OCR, template pipelines, OOXML surgery, thumbnails, and the markitdown/docling extraction ladder. Routes each document task to the right specialist route.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never fabricate chart numbers to pass validation (slides route): every value traces to a fetched source.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Office Document Router

One entry point for office-document tasks. Identify the deliverable, run only the matched route's file, and follow it. All routes share one scripts/ tree; the former per-skill copies were consolidated here (#680).

Provenance: routes consolidated from the former office-document skill family (2026-10, #680); per-route provenance lines live in the route files.

Routes (load exactly one)

TaskRouteReadSkip-when
Word document (.docx) create/read/editdocxreferences/routes/docx.mdspreadsheet → xlsx, PDF → pdf
Spreadsheet (.xlsx/.xlsm/.csv/.tsv)xlsxreferences/routes/xlsx.mdWord → docx, PDF → pdf
PDF: extract/forms/OCR/createpdfreferences/routes/pdf.mdfast text dump first → markitdown
Fill a PPTX template with JSONslidesreferences/routes/slides.mdextract schema → template
Extract PPTX → template schematemplatereferences/routes/template.mdfill (slides) / extend (modifier)
Extend PPTX layouts (clone/promote)modifierreferences/routes/modifier.mdnormal fill → slides
Fast local docs→Markdown (MCP)markitdownreferences/routes/markitdown.mdlayout mangled → docling
Layout-aware extraction / scanned OCRdoclingreferences/routes/docling.mdmarkitdown sufficed → markitdown
Surgical OOXML edit (unpack/edit/repack)ooxmlreferences/routes/ooxml.mdgeneration → slides/template
Office file → thumbnail grids / imagesthumbnailsreferences/routes/thumbnails.mdtext extraction → markitdown
Render docs to the shared HTML/DOCX standardrenderingreferences/routes/rendering.mdspreadsheets (xlsx) / decks (pptx-specialist-subagent)

Route files open with their own Load when / Skip when lines. Route detail files (references/routes/<id>/) load when the route names them — never preload.

Extraction ladder (spine)

  1. Plain text (.md/.txt/.json/code) → built-in Read. Nothing else needed.
  2. Born-digital office doc or text-selectable PDF → Route markitdown (fast, local, ~1s/50 pages).
  3. markitdown empty/garbage, complex tables, multi-column, or scanned → Route docling (layout-aware; CLI-on-demand with consent, or the persistent MCP pack).
  4. Scanned/image-only and no docling → pdftoppm → image-analyzer-subagent.
  5. Structured PDF data (forms, fillable fields, OCR-as-purpose) → Route pdf.
  6. Visual understanding (charts, layout, "what does this look like") → image-analyzer-subagent (not a route — a subagent).

Shared spine (all routes)

  • Scripts run from this skill's directory: scripts/<tool> as each route documents; the LibreOffice wrapper lives at scripts/soffice.py (handles sandboxed-VM AF_UNIX socket restrictions; auto-configures on first run).
  • Documents and spreadsheets must look designed, never generated: typographic or visual hierarchy, intentional color, styled headers — each route's aesthetics section has the specifics.
  • Validate the artifact before handing it back (each route defines its validation pass); report assumptions and skipped checks.
  • MCP packs (markitdown, docling) ship disabled by default — enable via ./deploy/setup.sh --enable-pack <name> with user consent; docling's CLI-on-demand path asks before installing (~3–4 GB). Never auto-install.

Hard rules

  • Never fabricate chart numbers to pass validation (slides route): every value traces to a fetched source; the agent never touches real URLs (placeholders only).
  • Template fill pipelines use user-supplied templates or the bundled default; the base template is never written (modifier clones to template_new.pptx).
  • Form filling follows the pdf route's ordered steps — never fill with unvalidated coordinates.
  • Existing template conventions override house aesthetics when updating user files (xlsx route).
  • Each route file owns its deep detail; this router never restates it.

Gates

  • Zero-preload: only the matched route file (+ its named detail files) enters context.
  • Report shape complete before declaring done: outputs, checks run/skipped, assumptions, risks.
  • MCP/CLI enablement goes through the consent-gated pack flow above — never auto-install.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.