Skip to content
Back to skills

Office Documents

ASecurity

Word, Excel, PowerPoint and PDF files and the charts in them — reports, coursework, theses, spreadsheets with formulas, decks. Tested helpers (GOST preset), rendering pages to look at, checks. Use for отчёт, курсовая, реферат, диплом, документ Word, таблица Excel, презентация, PDF, график.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentspythongo

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add anchor-inference/daedalus --skill office-documents --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Office Documents?

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

Security grade badge for Office Documents
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anchor-inference-office-documents/badge)](https://www.skillsdirectory.com/skills/anchor-inference-office-documents)

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: office-documents
description: Word, Excel, PowerPoint and PDF files and the charts in them — reports, coursework, theses, spreadsheets with formulas, decks. Tested helpers (GOST preset), rendering pages to look at, checks. Use for отчёт, курсовая, реферат, диплом, документ Word, таблица Excel, презентация, PDF, график.
---
# Office documents

A document is built by a Python script you keep, from text kept in data files, with the helpers in
`scripts/`, and it is not finished until its pages have been rendered and looked at and the file
you attach is the one you checked. This page is the method; the format pages hold the detail:

| making | read |
|---|---|
| a Word document, a report, a coursework | `references/docx.md`; for Russian university work also `references/academic-ru.md` |
| a spreadsheet, calculations, Excel charts | `references/xlsx.md` |
| a presentation | `references/pptx.md` |
| a PDF, or reading one | `references/pdf.md` |
| a chart to put in any of them | `references/charts.md` |

## When to use

Whenever the deliverable is a `.docx`, `.xlsx`, `.pptx` or `.pdf`, or a chart that goes into one;
also to read text out of such a file (`pdftotext -layout file.pdf -`, `office_check.py docx file`)
— `Read` does not open them.

## Procedure

1. **Know the machine, once.** `python3 <skill>/scripts/office_check.py env` names what is installed:
   the libraries, LibreOffice, poppler, fonts with Cyrillic. Run scripts with that same `python3`.
   Do not `uv init` a project or `uv add` libraries in the workspace (a project's own environment
   does not see the installed ones), and never install `pymupdf` to read a PDF: `pdftotext` or
   `pypdf` do it in a second. If the report says a library is missing, it prints the one `uv run
   --no-project --with ...` command that runs your script with it; LibreOffice missing means no PDF
   conversion, no recalculation and no page pictures — say so to the operator, do not assemble it
   from packages.
2. **Make a folder and copy the helpers into it** — the deliverable must rebuild after this session:
   `mkdir -p work && cp <skill>/scripts/*.py work/` (the `Skill` tool printed `<skill>`).
3. **Budget before writing.** When the assignment limits pages (or slides), write the budget down
   first: pages per section, summing to two pages under the limit (LibreOffice and Word break pages a
   little differently). At 14 pt with 1.5 spacing a full A4 page is about 1 800 characters with spaces
   (~250 words); a table of 10 rows or a chart with its caption is about half a page. Writing past the
   budget and cutting afterwards cost a session six rebuilds.
4. **Write the generator in small files, never one giant write.** One output is capped; a build script
   holding a whole coursework is lost entirely when it hits the cap. Put the text in data files of
   ~15 KB at most each (`text/01-intro.md`, `text/02-theory.md`, or Python modules `part1.py`...),
   numbers in `data.py` or a CSV, and keep `build.py` short: it reads them and calls the helpers.
   Change a document by editing its sources and rebuilding, never by patching the `.docx`.
5. **Build, then look at where things landed.** `docx_builder.Report.save(..., pdf=True)` prints a
   page map (which page each heading is on) and fills the contents' page numbers. For any file,
   `python3 work/render_pages.py out/report.docx` writes a picture per page, contact sheets and a page
   map of lines per page. Compare the page map with the budget and cut the section that is over.
6. **Check** with the section below until it is clean.
7. **Hand over** the checked files with `AttachMedia` (a card in the answer whether or not a chat is
   bound), and say in the answer what each file is, how many pages, and anything you could not do here
   (no LibreOffice: no PDF and no stored formula results; pagination measured in LibreOffice).

Dates you write are today's: the date of access in a bibliography entry, the year on a title page.

## Checks

Run every one that applies; each exits 0 when clean and 1 with `PROBLEM:` lines.

- `python3 work/office_check.py docx out/report.docx` — heading counts by level (the contents and
  the navigation pane come from them), tables, pictures, a contents field, leftover `{fig:...}`,
  `TODO` or `Lorem ipsum`.
- `python3 work/office_check.py xlsx out/book.xlsx` — recomputes a copy in LibreOffice and lists
  every formula's result and every error (`#REF!`, `#DIV/0!`, `#NAME?`...) by cell. Then, last,
  `python3 work/office_check.py recalc out/book.xlsx` stores the results in the file itself: the
  attached workbook must be that file, or it shows empty cells on a phone and in previews.
- `python3 work/office_check.py pptx out/deck.pptx` — 16:9, a title per slide, word count per slide,
  shapes off the slide, empty placeholders, notes.
- `python3 work/office_check.py pdf out/report.pdf` — pages, size, fonts embedded, text present.
- **Look at the pages.** `render_pages.py` writes `page-NN.png` (110 dpi) and `sheet-N.png`. Use the
  sheets only for layout — blank or half-empty pages, a table or figure pushed away from its text,
  a page count against the limit. To check what a page says, read the page map or `DocView` on the
  PDF (its text layer, by pages); to check how it looks, look at the page YOURSELF: `ImageView` on one
  `page-NN.png` (it shows you the picture), or `DocView out/report.pdf pages='5-7' mode='native'` (one
  picture a page, a few pages a call). Ask yourself concrete questions ("is the table's header repeated
  and are its borders complete?", "is the chart's text legible and Cyrillic?"). Never look at a strip
  of thumbnails, and do not hand the look to a helper or to `ImageView mode='describe'` when you can see:
  a describing model given a strip invented a title page's text. Look at least at the title page, the
  contents, one page of each kind (text, table, figure, formula) and the last page.
- Against the assignment: every required section, table and figure present; the page limit kept with
  a margin; every source cited and every citation in the list (the builder warns); the operator's
  name, group and supervisor only where the operator gave them — never guessed.

Files in this skill

  • SKILL.md6.1 KB
  • references/academic-ru.md4.2 KB
  • references/charts.md1.9 KB
  • references/docx.md5.3 KB
  • references/pdf.md3.6 KB
  • references/pptx.md2.2 KB
  • references/xlsx.md4.9 KB
  • scripts/charts.py4.7 KB
  • scripts/docx_builder.py43.6 KB
  • scripts/office_check.py13.7 KB
  • scripts/office_common.py5.5 KB
  • scripts/pptx_builder.py8.6 KB
  • scripts/render_pages.py5.8 KB

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.