Finishes a Word document: table of contents, numbered headings, page numbers, cover page, footnotes.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Finish an existing Word document in ONE command, the way a publishing-ready report looks: a table of contents from the headings, numbered headings (1, 1.1, 1.2 …), page numbers ('Page 3 of 12') in the footer, a cover page with title, subtitle and author, footnotes anchored to a phrase, all fields updated, and a PDF to check it. Also lists the heading outline of a document and whether it already has a contents table, page numbers and footnotes. Use for: add a table of contents, number the headings, put page numbers on, add a cover page, make this report look finished, indholdsfortegnelse, sidetal, forside. Triggers: table of contents, TOC, contents page, heading numbering, page numbers, cover page, title page, footnote, finish the document, format the report, indholdsfortegnelse, sidetal, forside, fodnote.
python3 /skills/word-finish/scripts/finish.py <verb> … wraps wordcraft-cli, a native engine
that edits real .docx without Word. Inputs are in /work/in, results in /work/out. Every verb
prints one OK … line or one ERROR … line.
| Need | Command |
|---|---|
| What headings does it have, and what is missing | finish.py outline /work/in/report.docx |
| Contents + numbered headings + page numbers, with PDF | finish.py finish /work/in/report.docx /work/out/report-finished.docx --all --pdf /work/out/report-finished.pdf |
| Only a table of contents (2 levels, own title) | finish.py finish /work/in/report.docx /work/out/report.docx --toc --levels 2 --toc-title "Indhold" |
| Only page numbers | finish.py finish /work/in/report.docx /work/out/report.docx --page-numbers |
| Number the headings (1, 1.1, 1.2 …) | finish.py finish /work/in/report.docx /work/out/report.docx --numbering |
| Cover page | finish.py finish /work/in/report.docx /work/out/report.docx --cover --title "Nordic Market Review 2026" --subtitle "Prepared for the board" --author "Percerno" |
| Footnote on a phrase (repeatable) | finish.py finish /work/in/report.docx /work/out/report.docx --footnote "8 % per annum::Cf. the Danish Interest Act, section 5." |
Options combine: --all is --toc --numbering --page-numbers; add --cover --title … and
--footnote … as needed. The contents table is built from Heading 1–3 styles, so a document
whose headings are plain bold text gets an empty table: run outline first and say so.
Numbering writes the numbers into the heading text (so it survives any Word version); headings
that already start with their number are left alone. Page numbers go in the footer as
"Page x of y". Render the PDF (--pdf) and give the person both links.
SKILL.mdgate.jsonscripts/__pycache__/finish.cpython-311.pycscripts/__pycache__/finish.cpython-313.pycscripts/finish.pyWritten by Percerno, MIT licence.