Skip to content
Agentmart
Submit a tool

documents

PDF generation and Word document styling, plus reading, merging and filling existing PDFs and redlining existing Word files

Skill by vibetasking

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vibetasking-documents

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

PDF generation and Word document styling, plus reading, merging and filling existing PDFs and redlining existing Word files

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/documents

What's inside

Skill name
documents
Description
PDF generation and Word document styling, plus reading, merging and filling existing PDFs and redlining existing Word files
License
MIT
Instructions
134 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (6)

  • SKILL.md
  • html-pdf.md · reference/
  • _pdf_lib.py · scripts/
  • optimize_pdf.py · scripts/
  • preview_pdf.py · scripts/
  • validate_html.py · scripts/

SKILL.md (first lines)

# Documents (PrettyDocsToolkit, WordOfficeToolkit)

## When to use this skill

- **PDFs** from HTML: reports, proposals, invoices, certificates,
  one-pagers, dashboards, articles. Use **flow layout** when content
  length is unpredictable. Use **page layout** for designed-per-page
  documents. See `reference/html-pdf.md`.
- **Word `.docx`** documents: when the user explicitly asks for a
  Word file. Otherwise prefer PDF.
- For **slide decks** (PDF or PowerPoint), use the `presentations`
  skill instead.

Most requests are custom: design what fits the task. The renderer is
flexible. The only hard rules are tagged `[enforced]` in
`reference/html-pdf.md`.

## Workflow

```bash
# 1. Write the HTML to document.html with your file writing tool so you can iterate.

# 2. (page layout only) Catch overflow before rendering.
python system/skills/documents/scripts/validate_html.py document.html

# 3. Render. Auto-compresses; returns "<path> — N pages, X MB" plus any warnings.
pretty_docs html_to_pdf --json '{"html_file_name": "document.html", "output_file_name": "document.pdf"}'

# 4. Sample pages for visual review (first, middle, last by default).
python system/skills/documents/scripts/preview_pdf.py document.pdf

# 5. Look at the renders: open each .preview/document/page-NN.jpg with your file reading tool, as an image.
```

Iterate steps 1, 3, 4, 5 with your file editing tool until the rendered pages
look right. Pass `"landscape": true` to `html_to_pdf` for wide content
(dashboards, comparison tables, anything 16:9).

Margins: flow layout gets 25mm/20mm automatically (override with your
own `@page { margin: … }`). In page layout `.page` starts marginless —
pad it yourself (documents `25mm 20mm`, slides `12–18mm`) and keep
text ≥10mm off the paper edge unless intentionally full-bleed. In flow
documents, give any colored box that must not split across pages the
class `card` or `block`. The render result warns on violations
(`[edge-margins]`, `[torn-block]`, …) — fix them or ignore them
deliberately, then always preview before delivering.

For short, simple documents (1–2 pages) you can pass HTML inline:

```bash
pretty_docs html_to_pdf --json '{"html": "<html>...</html>", "output_file_name": "output.pdf"}'
```

## Word documents

```bash
word --help                           # list all actions
word add_heading --help               # show parameters for an action
word add_heading --json '{"filename": "doc.docx", "text": "My Title", "level": 1}'
```

`word get_document_outline` names each paragraph's style. For how the
text inside a paragraph is formatted, read `word get_document_xml`, where
run formatting sits under `<w:rPr>`. Keep styling out of
text arguments: use the `style` argument, or `word format_text` for
existing paragraphs. The `color` argument is a hex code without the
"#" prefix.

### Changing a document someone sent

The `word` actions build and style a document. To change one that already
exists while keeping its formatting, or to redline it with tracked changes,
add comments or accept changes, work on its XML with the guide at
`system/skills/documents/rules/docx/docx.md`. Its `scripts/` paths are
relative to `system/skills/documents/rules/docx/`, so a call reads
`python system/skills/documents/rules/docx/scripts/merge_runs.py unpacked/`.
The `docx` npm package it creates documents with is not preinstalled here:
install it in the project folder (`npm install docx`) before a script
requires it. The guide lives only inside a run, so a reader outside one
does not have it.

## Style decisions are yours

Long documents, dense tables, image-heavy designs, minimalist
single-column reports, infographic posters: all valid. The
validator catches structural breaks (overflow, broken page balance,
unreadable fonts), not stylistic choices. Pick the layout, palette,
and density that fits the user's request and the implicit context.

Useful primitives for enrichment:

- `banana generate_image` for custom illustrations and backgrounds.
- `image_search image_search` for stock photos.
- Google Fonts via `<link>` in `<head>`, with a system fallback.

## Reference

For dimensions, margins, page-break semantics, image embedding, and
the full list of what's enforced versus suggested, read
`system/skills/documents/reference/html-pdf.md`. Both this skill and
the `presentations` skill use the same renderer. The reference is the
source of truth.

## External PDFs

To shrink a PDF that came from somewhere else (an upload, a Word
export, a previous run):

```bash
python system/skills/documents/scripts/optimize_pdf.py path/to.pdf
```

Same cascade as `html_to_pdf` uses: pymupdf clean, then ghostscript at
progressively more aggressive presets, capped at 20 MB.

To read, merge, split, rotate or OCR one, or fill its form (fillable or
not), read `system/skills/documents/rules/pdf/pdf.md`, and `forms.md` beside
it for a form. Its `scripts/` paths are relative to
`system/skills/documents/rules/pdf/`. A PDF you create still goes through

From vibetasking/vibetasking-plugin, MIT.

More from vibetasking/vibetasking-plugin

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 20, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from vibetasking

Cite this page

documents skill. Agent Mart. https://agentmart.dev/skills/vibetasking-documents (last updated 2026-10-24)