docaohieu2808

Pdfx — AI skill for Claude Code

AI community

Self-contained Claude Code skill for any PDF task — generate publication-quality PDFs/ebooks from Markdown (WeasyPrint, AI cover, TOC, code highlighting) AND process existing PDFs (OCR, extract, merge.

How to install Pdfx

This entry records only its repository, not the path inside it, so there is no exact command to give. Open docaohieu2808/pdfx and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Pdfx does

Self-contained Claude Code skill for any PDF task — generate publication-quality PDFs/ebooks from Markdown (WeasyPrint, AI cover, TOC, code highlighting) AND process existing PDFs (OCR, extract, merge/split, forms, watermark, encrypt/decrypt).

Alternatives in AI

  • Xerj — Local-first search engine and MCP server for AI agents 12.5k ★
  • AGENTS.md - Skill Seekers — Concise reference for AI coding agents 11.1k ★
  • Ante — Ghost in your shell 1.9k ★

README

pdfx — complete PDF toolkit (Claude Code skill)

A self-contained [Claude Code](https://claude.ai/code) / agent **skill** for *anything* PDF. Unlike typical `pdf` skills that only read or transform PDFs, **pdfx does both directions** — it also *produces* publication-quality PDFs from Markdown.

**One skill, two pillars.** Copy the `pdfx/` folder into any skills directory and it just works — bundled fonts, modular CLI scripts, reference guides. Depends on **no other skill**. Optional heavy engines auto-install on first use (or run `install.sh`).

![Four pages of a sample book built by pdfx from examples/: cover, contents, a chapter with a table and code, a chapter with SVG and Mermaid diagrams](docs/sample-pages.webp)

A. Generate beautiful PDFs / ebooks (Markdown → PDF)

`Markdown → HTML (python-markdown + Pygments) → WeasyPrint → PDF` with published-grade print CSS:

  • Designed cover — optional AI art via Gemini (free-tier key), a pre-made image, or a gradient.
  • Auto-numbered TOC with dot leaders + real page numbers; optional depth-2 sub-entries.
  • Part dividers (--parts), a back-of-book A-Z index (--index), clickable PDF bookmarks.
  • Diagrams that actually render: inline (shielded from md_in_html) and ```mermaid fences auto-rendered to SVG (Vietnamese-safe labels).
  • Syntax-highlighted code, [B]/[I]/[A]/[!] badges, bundled Playfair Display + EB Garamond, A4/6×9, light/dark, --preview to auto-render page PNGs.
PDFX=/path/to/pdfx ; PY=python
$PY "$PDFX/scripts/build_ebook_from_markdown.py" \
    --title "DevOps Handbook" --subtitle "Complete Reference" \
    --gen-cover "a server scaling into a distributed cloud, glowing data-flow lines" \
    --parts "1=Foundations,7=Build & Ship" --toc-depth 2 --index --preview \
    --page a4 --theme light --accent "#2563eb" --output handbook.pdf  ch01.md ch02.md ...

B. Process existing PDFs — `scripts/pdf_process.py` (35 subcommands)

| Group | Com