md-to-pdf
Installation
SKILL.md
MD to PDF
Converts Markdown files to professional PDF using one of two rendering engines.
Prompt contract
Position 1 of $ARGUMENTS is a free-form prompt (RU/EN) — the file path, --engine flag, styles/test
tokens and the quoted LLM-preprocessing prompt are all optional and may follow in any order. Nobody types keys:
resolve mode + file FROM the prompt.
- Strip
--engine <name>. A literal mode token (styles,config,test,help) anywhere wins outright. - Else score modes by distinct whole-word keyword hits (table below). Highest unique score wins.
- Empty arguments ->
help(documented default). Read-only — asks nothing. - Prose resolution (mandatory):
$ARGUMENTSmay be a full sentence, not just tokens. Extractmd_filefrom 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). If the sentence implies CONVERT but no file is resolvable -> ONEAskUserQuestionfor the file path. Never guess a file and never silently fall through to HELP. - Outcome-changing ambiguity (missing engine deps, no saved engine preference) -> ONE
AskUserQuestion.