document-export

A tool for turning content into PDF, Excel, or Word files that people can share and edit with standard office software.

In plain words
What is it for?
Use it when asked to make a PDF, spreadsheet, or Word document. It supports visual PDF pages, plain documents, Excel workbooks, and Word files.
Why use it?
It removes the need to manually format and save content into an office document, while placing generated files in a predictable reports folder.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chacosoldier/compabob/document-export
Any agent
npx skills add chacosoldier/compabob --skill document-export
Clone the repo
git clone --depth 1 https://github.com/chacosoldier/compabob

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,275 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.01275
Opus 5 $0.00036 $0.00638
Sonnet 5 $0.00014 $0.00255
Haiku 4.5 $0.00007 $0.00128

Measured 2d ago against content hash 6511e590b9a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-export scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (to_docx.py, to_pdf.py, to_xlsx.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/document-export/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Document Export

Turn content into a real office file: a PDF, an Excel workbook, or a Word document. The skill ships three helper scripts that do the file writing deterministically; your job is to assemble the content and call the right one.

These scripts use the Python standard library only, so there is nothing to install for Excel and Word. PDF needs a browser or a PDF tool on the machine (the script finds it, or tells the user what to install).

Save every output to reports/ as YYYY-MM-DD-<slug>.<ext>, then tell the user the path.

PDF

PDF is produced by rendering an HTML file. Two cases:

  • Rich, visual page (architecture, dashboard, comparison): use the visual-explainer skill to build the HTML, then convert it.
  • Plain document (a letter, a report, a write-up): wrap the content in this minimal template and save it as an .html file:
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>TITLE</title>
<style>
  @page { margin: 2cm; }
  body { font: 11pt/1.55 -apple-system, "Segoe UI", Roboto, sans-serif;
         color: #1a1a1a; max-width: 46em; margin: 0 auto; }
  h1, h2, h3 { line-height: 1.25; }
  h1 { font-size: 1.8em; } h2 { font-size: 1.35em; margin-top: 1.6em; }
  table { border-collapse: collapse; width: 100%; }
  th, td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
  code { background: #f4f4f4; padding: 1px 4px; border-radius: 3px; }
</style></head><body>
  <!-- CONTENT -->
</body></html>

Then convert:

python3 .claude/skills/document-export/to_pdf.py <input.html> reports/<YYYY-MM-DD>-<slug>.pdf

It tries headless Chrome first, then weasyprint, then wkhtmltopdf. If it reports that no engine is found, relay its install hint to the user; do not try to work around it.

Excel (.xlsx)

Build a JSON spec, write it to a temporary file, and run the writer.

Spec shape:

{
  "sheets": [
    {
      "name": "Results",
      "header": true,
      "rows": [["Name", "Score"], ["Alice", 90], ["Bob", 85]],
      "widths": [24, 10]
    }
  ]
}

Read the full file on GitHub · 136 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 136 lines · 72 tokens per session scan A 6511e590b9a1

Subscribe to this mod's changes

document-export is a skill published in the GitHub repository chacosoldier/compabob (32 stars, last pushed 2mo ago), licensed MIT. It adds 72 tokens to every session and 1,275 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.