craft-doc-publish
БесплатноБез исполняемых скриптовНе проверенPublish Markdown with frontmatter as a templated DOCX and PDF with ArtCraft apps - fill the company template, inline images and Mermaid, WordCraft body and…
от BlackBeltTechnology★ 357 звёзд на GitHubОб этом скилле
craft-doc-publish — Markdown + template → DOCX + PDF (→ packaged PDF)
The default Markdown → templated DOCX/PDF path. pi-craft doc prepare fills the template's placeholders (frontmatter,
--var, template defaults, system variables) and prepares the body; WordCraft then only appends the body, builds the TOC and
exports; PdfCraft packages the result. No Docker, no pandoc. Read wordcraft (and pdfcraft for step 3) first. Resumable-job
rules are in the craft-studio router, section Craft jobs. Ingest/OCR of existing documents, round-trip editing
(extract → edit → merge back), PlantUML and table-width profiles stay with document-converter.
Step table
| # | Step | Tool | Input → Output | Gate |
|---|---|---|---|---|
| 0 | Preflight + job | agent | request → job.json |
check: job |
| 1 | Prepare | pi-craft doc prepare |
report.md + template → 01-prepare/ (template.filled.docx, body.md, prepare.json) |
check: prepare (+ user confirms defaults) |
| 2 | Render | WordCraft | filled template + body → 02-render/out.docx, out.pdf |
pi-craft verify --pages --text-contains |
| 3 | Package (optional) | PdfCraft | pdf (+ extra pdfs) → 03-package/final.pdf |
pi-craft verify (before protecting) |
Hand-off formats: filled docx + Markdown body between 1 and 2, pdf out (the docx is verified through its pdf). The
template is a doc-engine template directory <templates-dir>/<name>/template.docx (+ variables.xml, manifest.xml).
Passwords and API keys are never written to job.json, gate reports or step files.
Step 0 — Preflight and job
Output: craft-jobs/<slug>/job.json (created or loaded).
Gate: check: job.
| Sibling | Package | Check | If missing |
|---|---|---|---|
document-converter |
@blackbelt-technology/pi-dashboard-document-converter |
skill in the loaded skill list | not needed here: only for ingest/OCR, round-trip editing and PlantUML — route those requests to it, continue otherwise |
mmdc |
@mermaid-js/mermaid-cli |
command -v mmdc (it needs a Chromium; if it cannot find one set PUPPETEER_EXECUTABLE_PATH) |
diagrams stay code blocks; step 1's gate asks you to install it or accept code-block diagrams |
pi-nano-banana |
already a dependency of craft-apps | usable credentials, only when the frontmatter sets nano_banana.enabled: true |
no credentials: diagrams render with mmdc (the fallback runs anyway) |
"Loaded skill list" is the available-skills list in your own system prompt. nano_banana.enabled is a paid API call per
new diagram: state that to the user before step 1; results are cached in .mermaid-cache/ next to the Markdown.
Resolve the template first and echo its path to the user (it is in prepare.json after step 1): ./templates is searched
before ~/Documents/templates, so a repo-local template can win without being asked for.
Set up the job (Craft jobs in craft-studio: slug rule, job-helper) and run Resume.
# run from the directory that contains craft-jobs/ (SLUG set as in step 0)
jq -e '.name and .workflow and (.steps | type == "object")' "craft-jobs/$SLUG/job.json"
Step 1 — Prepare
Output: 01-prepare/template.filled.docx, 01-prepare/body.md, 01-prepare/prepare.json.
Gate: check: prepare — the report has no unresolved placeholder, unrendered diagram, skipped or remote image, and
every template-defaulted variable was confirmed by the user.
pi-craft doc prepare report.md --out "$JOB/01-prepare" [--template default] [--templates-dir <dir>] [--var client_name="ACME Kft."]… [--allow-path <dir>]…
Frontmatter uses the doc-engine keys: template, templates_dir, language, document_title, document_name,
enable_toc, toc_heading, nano_banana; every other scalar key is a template variable (--var wins over frontmatter,
which wins over the template's own variables.xml default). Read prepare.json:
defaulted— variables that still carry the template's default (a real template ships another customer's name, offer number…). Show each default value and ask the user to confirm or supply a value (--var name=value, rerun). Only then run the gate withDEFAULTS_CONFIRMED=1.unresolved— placeholders with no value (also a token split across paragraphs): supply the variable or, with the user's consent,--allow-missing.mermaid.unrendered— diagrams left as code (nommdc, no browser, render error): ask the user to installmmdcor accept code-block diagrams before rendering.images.skipped/images.remote— images outside the Markdown's directory (pass--allow-path), missing, or remote (WordCraft does not fetch them): fix the path or accept the omission with the user.warnings— PlantUML blocks stay code (usedocument-converter); a variable value that contained image/diagram syntax stays literal.pictures— present when the template owns images (WordCraft 0.7.0 would
Установить craft-doc-publish в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл craft-doc-publish?
Publish Markdown with frontmatter as a templated DOCX and PDF with ArtCraft apps - fill the company template, inline images and Mermaid, WordCraft body and TOC, optional PdfCraft package/protect; verified and resumable. Use for "make a DOCX from this markdown with our template", "publish this report as a PDF", "markdown to Word with a table of contents".
Как установить скилл craft-doc-publish?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл craft-doc-publish запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse 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…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use 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…
от Anthropic