MarkCraft: 把 Markdown 文档、README、技术笔记转换成高可读性、带科技风视觉的 PDF 报告,团队名称和 slogan 等品牌装点完全可选。Agent Skill + CLI for polished, readable Markdown-to-PDF reports with CJK support, clean tables, code blocks, citations, icons, and real examples.
SaferSkills independently audited MarkCraft (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill when the user wants to:
tech, deep-blue, cyan-violet, slate-minimal, bio-ai, business (gold/charcoal), academic (navy/crimson), warm-earth (terracotta/brown), forest (forest green/teal).Do not use this skill for slide-deck-first outputs unless the user explicitly asks for Marp/PPT-style presentation PDFs. For slide decks, use a PPT/Marp workflow instead.
When invoked, create a production-ready PDF from the provided Markdown while preserving the Markdown's meaning and improving document readability. Readability and clean layout are the core deliverable; team name and slogan are optional decoration, not requirements.
Team name and slogan are optional. Do not ask for them — if the user wants branding they will say so. When the user provides neither and asks for none, the script applies neutral defaults (team name AI Science Team, slogan From Markdown to Knowledge) so the cover and header still look finished. If a user wants a clean, unbranded look, pass empty values to suppress the badge and slogan.
Prefer a clean, restrained technology style over decorative clutter. The document should feel like a professional technical report, not a poster.
Collect or infer these inputs:
input_md: Markdown file path or Markdown text. Required — this is the only input you actually need.output_pdf: desired PDF filename. Default to the input filename with .pdf.team_name (optional): custom team, lab, department, company, or project name. Decorative only.slogan (optional): short slogan, mission line, or document tagline. Decorative only.author (optional): document author written to PDF /Author metadata and the HTML <meta name="author">. Resolved in order: --author, MARKCRAFT_AUTHOR env, the author key in the config file (~/.config/markcraft/config, override path with MARKCRAFT_CONFIG), then the default Perplexity Computer. team_name is decorative and is never used as the author.language: zh, en, or mixed. Default to mixed.style: default tech. Optional variants: deep-blue, cyan-violet, slate-minimal, bio-ai, business, academic, warm-earth, forest.density: default normal. Optional variants: compact for long documents and spacious for executive-facing reports.toc: default true for documents longer than 4 pages.scripts/markcraft.py.Use the bundled script from the skill directory. The only required argument is the input file:
python scripts/markcraft.py input.md --output report.pdfUseful options (team name and slogan are optional decoration):
python scripts/markcraft.py input.md --style cyan-violet --density spacious --no-toc
python scripts/markcraft.py input.md --team-name "Platform Team" --slogan "Build, Measure, Learn"
python scripts/markcraft.py input.md --author "Jane Doe"
MARKCRAFT_AUTHOR="Jane Doe" python scripts/markcraft.py input.md
python scripts/markcraft.py input.md \
--team-name "Deep Potential" \
--slogan "AI for Science" \
--style bio-ai \
--density normal \
--toc
python scripts/markcraft.py input.md --html-onlyDefault style rules:
Read references/style-guide.md when the user asks for customization, brand consistency, or style variants.
The workflow should support:
A successful output should:
weasyprint is missing, install Python dependencies or use --html-only.--density compact or simplify the content.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.