Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

md-to-pdf

БесплатноЗапускает вложенные скриптыНе проверен

Convert Markdown to PDF via reportlab or weasyprint engines. Triggers - pdf, md to pdf, markdown to pdf, generate pdf.

kochetkov-maот kochetkov-ma★ 41 звезда на GitHub

Об этом скилле

Markdown to PDF

Convert a local Markdown file with scripts/md_to_pdf.py. Check dependencies with scripts/check_deps.sh, choose a bundled style from styles/, and write only to the requested output path. Store project preferences in .codex/md-to-pdf.config.json only after confirmation. Render and inspect the result before reporting completion.

Complete native workflow

Follow every phase below. When a phase delegates work, use Codex collaboration with only task_name and message; treat each "Codex delegation brief" block as role and message content, not executable syntax. Required approval: main presents a concrete, reviewable proposal in chat and waits for an actual user reply before dependent action. Existing authorization for the same scope remains valid; do not ask again. Optional clarification: use request_user_input_async only if exposed, or request_user_input only if available in the current runtime/mode, for optional choices and never approval. Otherwise ask in main chat. Delegated agents return unresolved questions to main. Silence, elapsed time and tool errors are not approval. Resolve <skill-directory>, <plugin-root>, <project-root>, and <arguments> before running commands.

MD to PDF

Converts Markdown to PDF with the reportlab or weasyprint engine.

Prompt contract

<arguments> is one free-form RU/EN prompt; the file path, the --engine <name> flag, the styles/test tokens and the quoted LLM-preprocessing prompt may sit anywhere in it.

  1. Mode: a literal mode token (styles, config, test, help) wins outright; else the most distinct whole-word keyword hits (table below). Empty -> help (documented default, read-only, asks nothing).
  2. Scope: the prompt may be a full sentence, not just tokens. Take md_file from any path-shaped token or a filename explicitly named in prose (e.g. "convert my notes.md to pdf" -> md_file = notes.md, resolved against cwd). Never guess a file and never silently fall through to HELP.
  3. Ask: a sentence that implies CONVERT with no resolvable file -> ONE main-chat user gate for the file path; outcome-changing ambiguity (missing engine deps, no saved engine preference) -> ONE main-chat user gate.

Print once, before Step 1 (labels literal, values in the conversation language):

PLAN — brewdoc:md-to-pdf
INPUT:  <arguments verbatim, or "(empty)">
MODE:   <resolved> — <explicit | matched keyword: X | default | prose-resolved file: path>
SCOPE:  <md_file | engine | style question, as applicable>
DO:     <2-5 imperative bullets>
RESULT: <PDF path, or the help/styles/test output>

Step 0: Parse Arguments

Component Required Description
md_file per mode Path to .md file — literal token or extracted from prose (Prompt contract rule 2)
--engine No reportlab or weasyprint, anywhere; overrides saved config; strip before parsing
custom_prompt No Last argument in double quotes = LLM preprocessing instructions
Mode Condition EN keywords RU keywords Mutates?
HELP Empty or help (empty), help помощь no
STYLES styles or config styles, config, configure, page size, color scheme стили, настрой стиль, конфиг yes
TEST test test, sample, demo, bundled test file тест, пример, демо no (private temp dir, removed on exit)
CONVERT+PROMPT Path to .md file + quoted string at end convert with instructions, pdf and rewrite/strip section сконвертируй с изменениями yes
CONVERT Path to .md file (no quoted string) convert, pdf, generate pdf, turn into pdf, .md file named in prose конвертируй, сделай pdf, преврати в pdf yes

HELP and STYLES skip to Step 3.

Step 1: Engine Selection

Config = project .codex/md-to-pdf.config.json, else global ~/.codex/md-to-pdf.config.json. Engine = --engine, else config engine, else TEST takes reportlab and writes nothing, and CONVERT modes ask via main-chat user gate with this table (default reportlab) and save with the block below, NEW_JSON = {"engine": "<choice>"}.

Feature reportlab weasyprint
Install pip only pip + brew
Quality Good Excellent
Speed Fast Moderate
Images Basic Full
CSS Styling No Yes
Code highlight No Yes (Pygments)

Config shape:

{
  "engine": "reportlab",
  "pygments_theme": "github",
  "version": "{PLUGIN_VERSION}",
  "content_version": "{CONTENT_VERSION}",
  "generated_by": "brewdoc:md-to-pdf",
  "last_updated": "{LAST_UPDATED}"
}

The block merges NEW_JSON's top-level keys into the project file, so engine and style saves keep each other, and resolves the four provenance keys on every write, never hardcoded.

EXECUTE usi

Полный SKILL.md на GitHub

Установить md-to-pdf в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSEREADME.mdagents/openai.yamlscripts/check_deps.shscripts/md_to_pdf.pystyles/default.cssstyles/default.json

FAQ

Что делает скилл md-to-pdf?

Convert Markdown to PDF via reportlab or weasyprint engines. Triggers - pdf, md to pdf, markdown to pdf, generate pdf.

Как установить скилл md-to-pdf?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл md-to-pdf запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить md-to-pdf с