Skip to content
Back to skills

Doc Finalise

ASecurity

Finalise a Word (.docx) deliverable with embedded visuals, integrity checks, and a paste-ready commit block. Covers status reports, board packs, sprint retrospectives, RFCs, and compliance documents where factual accuracy and style consistency both matter. Triggers: "finalise this doc", "doc-finalise", "wrap the report", "embed the chart", "board pack". Do NOT use this skill for: drafting from scratch (use a writer skill), slide decks (.pptx), or plain markdown where style inheritance and PD...

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 16, 2026
ai-agentspythongoapi

Works with

  • api

Security analysis

A100/100

Scanned November 16, 2026

npx -y skills add ao92265/claude-code-playbook --skill doc-finalise --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc Finalise?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc Finalise
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ao92265-doc-finalise/badge)](https://www.skillsdirectory.com/skills/ao92265-doc-finalise)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doc-finalise
description: >
  Finalise a Word (.docx) deliverable with embedded visuals, integrity checks,
  and a paste-ready commit block. Covers status reports, board packs, sprint
  retrospectives, RFCs, and compliance documents where factual accuracy and
  style consistency both matter.
  Triggers: "finalise this doc", "doc-finalise", "wrap the report", "embed the chart", "board pack".

  Do NOT use this skill for: drafting from scratch (use a writer skill), slide decks (.pptx),
  or plain markdown where style inheritance and PDF rendering are not concerns.
metadata:
  user-invocable: true
  slash-command: /doc-finalise
  proactive: false
title: "Document Finalisation"
parent: Skills & Extensibility
---
# Document Finalisation

Structured workflow for finishing a `.docx` deliverable: programmatic integrity check, embedded visuals, style normalisation, PDF regeneration, and a Closeout Trio summary. Built for the case where a reviewer will spot every wandering em-dash and every rounding drift.

## When to Use

- Executive status reports where rounded numbers must be replaced with exact ones.
- Board packs and compliance documents with claim-level provenance requirements.
- Any second-pass edit where "tighten this up" has historically rephrased a number into an inaccuracy.
- Documents where visuals must survive the `.docx` → PDF conversion unchanged.

## When Not to Use

- Drafting the document from scratch — use a writer skill, then finalise with this one.
- Slide decks (`.pptx`) — different library, different gotchas.
- Plain markdown deliverables — style inheritance and PDF rendering are not in scope.

## Steps

1. **Read the docx toolchain reference before touching the file.** Load the Anthropic bundled docx skill (if available) or your project's `python-docx` reference. Do not skip this even if the model thinks it knows the API — the style-map and image-anchor details are where real documents break.

2. **Inventory the source document programmatically.** Capture a baseline so any later claim of "I only changed X" is verifiable.

   | Check | What to capture |
   |---|---|
   | Structure | Paragraph count, table count, section count, page count |
   | Styles | Full style map, every explicit style override on every run |
   | Typography | Em-dash (`—`) and en-dash (`–`) counts across `document.xml`, `header*.xml`, `footer*.xml` |
   | Assets | Every embedded image (id, size, anchor paragraph text) |
   | Theme | Font references — `majorFont` / `minorFont` — and any theme fallback |

3. **Embed visuals as PNG, not linked images.** Linked images break on email handoff and PDF conversion.
   - Use `doc.add_picture()` inside a centred paragraph, not floating anchors.
   - Insert at **named text anchors** — "before the paragraph starting with `Quarterly summary`" — not "around the end of section 3". Paragraph indices shift; sentence fragments do not.
   - Render charts with `matplotlib` at the target font size, save to PNG at 150 DPI minimum, embed from memory.

4. **Normalise style inheritance once.** Set explicit values so run-level overrides become non-conflicting rather than competing.
   - Explicit font name on `Normal` and every heading style.
   - Explicit line spacing on `docDefaults`.
   - Replace theme font references (`majorFont` / `minorFont`) with concrete names so the doc renders the same on a machine without the source theme installed.

5. **Regenerate the PDF and spot-check it, not the docx.** Visuals and fonts can render correctly in Word and badly in the PDF conversion.
   - `libreoffice --headless --convert-to pdf <file>.docx`
   - Rasterise the pages with embedded visuals (`pdftoppm` or `pdf2image`).
   - Compare each visual in the PDF against the original PNG. Size, crop, DPI loss, font substitution — all show up here, not in the docx.

6. **Produce a Closeout Trio summary.** See [prompt-patterns.md §22](../../docs/prompt-patterns.md#22-the-closeout-trio). Include concrete numbers, not prose.

   ```
   What I did
   - 98 paragraphs → 108 paragraphs (+10: two five-element chart blocks)
   - 3 embedded PNGs, 150 DPI, 412/438/391 KB
   - PDF regenerated, 14 pages, visuals verified against source PNGs
   - Em-dash count unchanged across body, headers, footers (47)

   What I could not do and why
   - No repo access — producing files + paste-ready commit block instead

   What needs your eyes
   - Appendix B table row 4 conflicts with prose on page 7 (see anti-pattern 22 — flagged, not resolved)
   - Cover-page colour matches brand guide sample but sandbox has no Calibri installed (see Gotchas)
   ```

7. **If sandboxed without repo access, emit a paste-ready commit block.** Do not fabricate a commit or a push.

   ```
   # Paste-ready commit
   Branch: docs/q3-board-pack
   Message: finalise(q3): embed charts, normalise styles, regen PDF
   Files:
     - reports/q3-board-pack.docx
     - reports/q3-board-pack.pdf
     - reports/assets/chart-revenue.png
     - reports/assets/chart-runrate.png
   ```

## Gotchas

- **Default stack:** `python-docx` + `matplotlib` for anything chart-heavy. The unpack-and-rewrite-XML route is a last resort — it breaks style inheritance and is easy to get subtly wrong. Stick with the library APIs.
- **Font fallback:** sandboxes without Calibri fall back to Liberation Sans. Visually near-identical at chart scale, but different metrics. Do not claim a chart was "rendered in Calibri" unless you verified the font is installed.
- **Accessibility:** `libreoffice --headless --convert-to pdf` emits **tagged PDFs by default**. Relevant when the audience is accessibility-sensitive (screen readers, WCAG). Do not strip tags during any post-processing step.
- **Em-dash and en-dash audit:** these characters travel poorly through copy-paste and some linters auto-"fix" them. A pre/post count across `document.xml`, headers, and footers catches silent drift.
- **Silent conflict resolution:** if two numbers in the same document disagree, flag the conflict — do not pick one. See [anti-patterns.md §22](../../docs/anti-patterns.md).

## Related

- [prompt-patterns.md §21 — SOURCE FACTS / CHANGE LIST](../../docs/prompt-patterns.md) — use this pattern to structure the rewrite instruction before invoking the skill.
- [prompt-patterns.md §22 — The Closeout Trio](../../docs/prompt-patterns.md) — the summary format step 6 produces.
- [skills/verification-before-completion/](../verification-before-completion/) — the code-side equivalent of the Closeout Trio.
- [skills/handoff/](../handoff/) — session-end summary (different scope: session, not deliverable).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.