Best for
- Generate: build a report, memo, spreadsheet, or deck from structured
- Edit: modify an existing document's content, layout, or metadata in place.
- Extract: pull text, tables, or structure out of an existing file.
magnus919/agent-skills/documents/SKILL.md
Generate, inspect, validate, and fix PDF, Word (.docx), Excel (.xlsx), and PowerPoint (.pptx) documents: turn structured content into render-ready artifacts, verify structural and output quality before delivery, and repair broken files. Use when a task involves creating, editing, converting, or validating office documents and PDFs. Do not use for ebook packaging (use epub), for images, video, or other media production, for API or code documentation, or for data pipelines (use data-engineering).
Decision brief
One skill for the four most common document formats. All four share a single agent workflow — structured content in, render-ready, validated artifact out — so they live in ONE family skill with per-format references, following the epub precedent. Load the shared workflow below,…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/magnus919/agent-skills --skill "documents"Inspect the Agent Skill "documents" from https://github.com/magnus919/agent-skills/blob/531ff6753784823c878c92b988c6e55266ce09a9/documents/SKILL.md at commit 531ff6753784823c878c92b988c6e55266ce09a9. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Every document task follows the same six steps, regardless of format. Deep format-specific detail is deferred to the per-format reference — read it at the step where it matters.
Load this skill when the task involves any of the four formats:
Ebooks and EPUB — use the epub skill; it owns the EPUB container,
Pin down what the document is for before touching a file:
Represent the document's content as structured data before rendering:
Permission review
The documentation asks the agent to run terminal commands or scripts.
Never deliver unvalidated output. Run the validation script:The documentation asks the agent to run terminal commands or scripts.
python3 scripts/validate-documents.py --render-check --json report.pdf brief.docx data.xlsx deck.pptxEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 61 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
One skill for the four most common document formats. All four share a single
agent workflow — structured content in, render-ready, validated artifact out —
so they live in ONE family skill with per-format references, following the
epub precedent. Load the shared workflow below, then pull the per-format
reference for the format you are actually touching.
| Format | Extension | Reference (load on demand) |
|---|---|---|
.pdf | references/pdf.md | |
| Word | .docx | references/word.md |
| Excel | .xlsx | references/excel.md |
| PowerPoint | .pptx | references/powerpoint.md |
| All formats | — | references/output-quality.md |
Generation templates for each format live in templates/, and the validation script with per-format fixtures lives in scripts/.
Load this skill when the task involves any of the four formats:
epub skill; it owns the EPUB container,
reading order, and package validation.data-engineering; Excel here is a deliverable format, not a data store.anydoc skill; this skill owns generation, editing, and
validation, not document-to-markdown extraction.Every document task follows the same six steps, regardless of format. Deep format-specific detail is deferred to the per-format reference — read it at the step where it matters.
Pin down what the document is for before touching a file:
Represent the document's content as structured data before rendering:
Choose the generation template for the target format from templates/:
Fill the [fill: ...] markers in the template with content from the content
model. Templates are the contract between content and layout — changing the
template is how you change appearance without touching content.
Produce the artifact file:
zipfile + XML for small artifacts) or with the conventional library for the
format (python-docx, openpyxl, python-pptx). See the per-format reference for
the exact package layout to produce.Never deliver unvalidated output. Run the validation script:
python3 scripts/validate-documents.py --render-check --json report.pdf brief.docx data.xlsx deck.pptx
The script performs structural sanity (container signatures, required
parts, XML well-formedness) and, when a renderer is installed, a render
check (actually renders the file). When no renderer is present it reports
unavailable instead of failing — validation never hard-requires a renderer.
See references/output-quality.md for the full
output-quality checklist, and the fixture files in
fixtures/ (one per format) to smoke-test the script itself:
python3 scripts/validate-documents.py --json fixtures/sample.pdf fixtures/sample.docx fixtures/sample.xlsx fixtures/sample.pptx
Hand off the artifact with its provenance:
The task is complete when the artifact exists, passes structural validation (and the render check when a renderer is available), and the content matches the agreed scope. Stop after delivering the validated artifact with its provenance; do not keep iterating on layout without a new scope instruction.
All scripts live in scripts/ relative to this skill's directory and
follow cli-builder conventions: --json for machine output, non-interactive,
errors to stderr. Run with --help for full flag details.
python3 scripts/validate-documents.py report.pdf # human report
python3 scripts/validate-documents.py --json report.pdf # machine report
python3 scripts/validate-documents.py --render-check --json report.pdf data.xlsx deck.pptx
Behavior:
[Content_Types].xml, required parts, XML well-formedness.
Legacy .doc/.xls/.ppt files are recognized via OLE2 magic bytes.--render-check): renders PDF via pdftoppm/mutool/gs
and Office formats via LibreOffice. Reports unavailable — exit 0 — when no
renderer is installed (graceful degradation, never a crash).status (ok / fail / unavailable / error)
with per-file checks and render results.--json, non-interactive, exit codes).Frequently asked questions
One skill for the four most common document formats. All four share a single agent workflow — structured content in, render-ready, validated artifact out — so they live in ONE family skill with per-format references, following the epub precedent. Load the shared workflow below,…
The source record exposes this install command: npx skills add https://github.com/magnus919/agent-skills --skill "documents". Inspect the command and pinned source before running it.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
rojim666/SztuCode
Create, edit, redline, and comment on `.docx`, Word, and Google Docs-targeted document artifacts inside the container, with a strict render-and-verify workflow. Use `render_docx.py` to generate page PNGs (and optional PDF) for visual QA, then iterate until layout is flawless before delivering the final document.
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
dancingteeth/unified-code-review
Risk-first code review for PRs and branch audits: blast-radius triage, agent-authored discipline (tests first, intent evidence), call-graph pincer for integration defects between modules, then structural code-judo bar. Use when reviewing PRs, auditing agent-written diffs, catching rubber-stamp green CI, or wiring bugs single-file review misses. Prefer over structure-only thermo-nuclear review alone. Do not use for unrelated coding tasks or as an always-on rule.
PaulRBerg/agent-skills
Create/scaffold/init a project-local agent skill under `.agents/skills` in an ordinary repository; defer to repository instructions that define a source catalog and lifecycle.