Skip to content

bestdeejay-design/agent-skills / skills/pdf-report-builder

pdf-report-builder

Verified

Сборка PDF-отчётов из Markdown без обязательных зависимостей. Скрипт pdf_report_builder.py конвертирует markdown (файл или stdin) в HTML (pandoc или встроенный конвертер) и далее в PDF первым доступным движком: Chromium/Chrome headless --print-to-pdf, weasyprint или pandoc с PDF-движком (pdflatex/tectonic/typst). Поддержка заголовков, списков, таблиц, кода, цитат, ссылок, кастомный заголовок документа, встраивание графиков (Chart.js). Триггеры: 'отчёт в pdf', 'markdown в pdf', 'собери отчёт', 'pdf report', 'markdown to pdf', 'отчёт для клиента', 'document to pdf'.

PDF Report Builder

Сборка PDF-отчёта из Markdown-файла: заголовки, таблицы, код, цитаты — в аккуратный одностраничный PDF.

Загружай этот скилл когда нужно сделать PDF-документ из Markdown: отчёт по проекту, README в PDF, спецификацию, чек-лист для клиента, экспорт документации вне GitHub.

🎯 When to use

Use this skill when:

  • Есть .md-файл и нужен PDF (отчёт, README, спецификация, сопроводительное письмо)
  • Нужно отправить документ клиенту/коллеге в печатном формате
  • Просят «сделай отчёт в pdf», «markdown в pdf», «собери документ»
  • Нужен PDF с графиками (встраивает Chart.js в HTML перед конвертацией)

Do NOT use when:

  • Достаточно HTML — проще отдать .md или github-rendered страницу
  • Нужна презентация — это presentation-maker
  • Нужна интерактивная диаграмма — это diagram-maker / data-analysis

📦 Files

  • SKILL.md — этот файл
  • scripts/pdf_report_builder.py — конвертер markdown → PDF (Python 3 stdlib)

🧰 Usage

# Из файла:
python3 skills/pdf-report-builder/scripts/pdf_report_builder.py -i report.md -o report.pdf --title "Project Report"

# Из stdin (пайплайн):
cat notes.md | python3 pdf_report_builder.py --stdin -o notes.pdf --title "Notes"

# Markdown с графиками → PDF:
# 1. Сгенерируй HTML с графиками через data-analysis --output html
# 2. Конвертируй HTML в PDF через pdf-report-builder
python3 skills/pdf-report-builder/scripts/pdf_report_builder.py -i report.html -o report.pdf --title "Отчёт с графиками"

🧭 Движки (по приоритету)

  1. Chrome/Chromium/Edge headless — --headless --print-to-pdf (обычно стоит на macOS)
  2. weasyprint — python3 -m pip install weasyprint
  3. pandoc + PDF-движок — pdflatex/tectonic/typst/context

Если ни одного нет — скрипт печатает подсказку по установке и завершается с кодом 1. Разметка отрисовывается через pandoc (если установлен) или встроенный конвертер (заголовки, списки, таблицы, код, цитаты, ссылки).

📊 Встраивание графиков

Для PDF с графиками используй пайплайн:

  1. data-analysis --output html — генерирует HTML с Chart.js графиками
  2. pdf-report-builder -i report.html -o report.pdf — конвертирует в PDF

HTML-отчёт автоматически включает:

  • Гистограммы для числовых полей
  • Bar charts для категорий
  • Scatter plots для корреляций
  • Монохромную палитру (или porcelain/palm через --preset)

🔬 Проверка результата

  • file out.pdf → «PDF document, version 1.4»
  • Открыть в просмотрщике и проверить: заголовки, таблицы, код-блоки, графики не обрезаны.
  • Для кириллицы: шрифт по умолчанию без проблем (системный), размер страницы A4 по умолчанию.

Boundaries

  • Do not use for slide decks or presentation design; use presentation-maker.

Evidence and completion gate

Run the documented command against the user’s actual input. Report the command, exit status, files changed or produced, and relevant stdout/stderr. Separate blocked or pre-existing failures from failures introduced by the current work. Do not call the result complete when the script was only described or when an artifact was not reopened and checked.

canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 197kUpdated Claude CodeCodexVerifiedInstall