Agent skill
Generate a PDF from a markdown note file via pandoc + xelatex with mermaid diagram support.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pdf-mjvolk3-swanki
SKILL.md
When the user asks to generate a PDF from a markdown note file, follow this workflow:
-
Determine the input file: The user will provide a path or dendron note name. Resolve it to a filename relative to
notes/(e.g.,swanki.processing.pdf_processor.md). -
Determine the output filename: Strip the
.mdextension from the input filename to use as the output name (e.g.,swanki.processing.pdf_processor). -
Run the PDF generation script:
bashbash notes/assets/publish/scripts/bib_tex_pdf.sh <input_filename> . <output_filename>- First arg: markdown filename (relative to
notes/) - Second arg: always
.(output dir, relative tonotes/after the script's internalcd ./notes) - Third arg: output PDF name without extension
- First arg: markdown filename (relative to
-
Verify the output: Check that
notes/assets/pdf-output/<output_filename>.pdfexists. -
Report the result: Tell the user the path to the generated PDF and note any warnings (e.g., missing citations).
Important Notes
- The script uses
SCRIPT_DIRto deriveNOTES_DIR, so all paths are resolved automatically - The script uses
mermaid-filterfor diagram rendering -- if mermaid diagrams produce empty PNGs, the env varsMERMAID_FILTER_LOC,MERMAID_FILTER_SCALE,MERMAID_FILTER_WIDTHmay need to be set (the script handles this) - Unicode emojis will cause xelatex to fail -- if the PDF build fails, check for emojis and replace with plain text alternatives before retrying
- Use a 120s timeout for the bash command since PDF generation can be slow
Example Invocations
- "/pdf notes/swanki.processing.pdf_processor.md"
- "/pdf swanki.processing.pdf_processor.md"
- "generate pdf for the processing module note"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?