Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pdfcraft

БесплатноБез исполняемых скриптовНе проверен

Headless PDF work with PdfCraft, provisioned on demand by pi-craft - combine, split, extract, rotate, delete and reorder pages, read text, render a page to…

BlackBeltTechnologyот BlackBeltTechnology★ 357 звёзд на GitHub

Об этом скилле

PdfCraft — headless PDF editing

PdfCraft is ArtCraft's PDF app. pi-craft provisions the headless pdfcraft-cli on first use (no desktop app). Choosing between apps, the discover → execute → save → verify loop, hand-off formats and the MCP policy live in craft-studio. Note: pi-craft verify --pages/--text-contains itself uses pdfcraft-cli, so any PDF you make is checked by the same engine that wrote it.

What it is for / formats

PDF in, PDF / png (.png .jpg .tif .pam) / text out. Page-level operations (combine, split, extract, rotate, delete, move, blank pages), metadata, text extraction, page rendering, forms, bookmarks, stamps, redaction, OCR/optimise batches. There is no project file: a PDF is the document. For laying out a new multi-page document use DesignCraft or WordCraft (then convert … pdf); PdfCraft edits PDFs that already exist.

CLI dialect

pi-craft pdfcraft exec <args…> passes the arguments to pdfcraft-cli. PdfCraft has no commands / describe / --cmd: it has direct subcommands plus a JSON tool registry.

pdfcraft-cli tools                                    # JSON list of the 163 automation tools + input schemas
pdfcraft-cli info <f.pdf>                             # JSON summary (pages, page_labels, bookmarks, encrypted, …)
pdfcraft-cli text <f.pdf> [--page N]                  # extracted text, pages separated by form feeds
pdfcraft-cli render <f.pdf> --page N [--dpi 96] --out x.png
pdfcraft-cli edit <in.pdf> --out <out.pdf> [--rotate 1,3:90] [--delete 2,4] [--move 5:1] [--insert-blank 1] [--title T] [--author A]
pdfcraft-cli combine a.pdf b.pdf … --out c.pdf
pdfcraft-cli extract <in.pdf> --pages 1,3,5 --out o.pdf
pdfcraft-cli split <in.pdf> (--every N | --before 3,7) [--out-dir DIR]
pdfcraft-cli audit <f.pdf>                            # faux-redaction finder (JSON; fails when found)
pdfcraft-cli check <files|dirs…> [--json out.json]    # does each PDF open and render
pdfcraft-cli run <tool> [key=value …] [--root DIR] [--out image.png]   # one tool
pdfcraft-cli run --script steps.json [--root DIR]     # several tools in one process
  • edit options run in order and later page numbers refer to the document after the earlier options (--delete 2 --move 3:1 moves the page that is third after the deletion). Rotation is PAGES:DEGREES.
  • run <tool> key=value: values are JSON-ish (doc=1 page=1); strings with spaces need shell quotes.
  • --script steps.json is a JSON array: [{"tool":"doc_open","args":{"path":"a.pdf"}}, …]; each step prints its result.
  • --root DIR (on run, batch, mcp; not on info/edit/…) confines file access to DIR and relative paths then resolve against DIR.

State between invocations

Direct subcommands (edit, combine, …) read a file and write a new file (--out); the input is never modified. The automation tools (run) are different: they work on open documents (doc_open → doc id, usually 1), and a single run process exits and forgets its documents (run page_add_text doc=1 … alone fails with "no open document with id 1"). Put doc_open, the edits and doc_save in one --script (or one MCP session). Edits are in memory until doc_save (path = save as; omit = in place).

Discovery first

There is no commands: discovery is pdfcraft-cli tools.

pi-craft pdfcraft exec tools | jq -r '.[] | "\(.name)\t\(.read_only)\t\(.description[0:80])"'   # all names
pi-craft pdfcraft exec tools | jq '.[] | select(.name=="page_add_text") | .input_schema'       # parameters
pi-craft pdfcraft exec info doc.pdf                    # page count before choosing page numbers

Each entry has name, description, input_schema (JSON Schema, required list), read_only, and command (the GUI command id, often null). Use name. Typical families: doc_* (open/save/combine/split/info/set_info), page_* (rotate/delete/move/extract/render/add_text/add_image), text_* (extract/find), form_*, bookmark_*, redact_*, stamp_*, link_*. Prefer a direct subcommand when one exists; use tools for everything else.

Traps

  • run is stateless across processes (above): doc=1 only exists inside the same --script/MCP session.
  • combine adds one bookmark per input file (info shows bookmarks: 2 for two inputs); pdf_version becomes 1.7.
  • --root rewrites relative paths: with --root sub, path=a.pdf means sub/a.pdf and path=sub/a.pdf fails with "No such file"; an absolute path outside the root fails with "is outside the allowed directory".
  • info/text/edit reject --root ("unknown option"); confine through run --root or mcp --root only.
  • text separates pages by a form feed and keeps the text layer only: a scanned PDF returns nothing (OCR is a batch --steps ocr step).
  • Page numbers are 1-based; a page that does not exist is an error (render --page 9 → "page 9 does not exist", exit 1).
  • render at --dpi 72 gives one
Полный SKILL.md на GitHub

Установить pdfcraft в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл pdfcraft?

Headless PDF work with PdfCraft, provisioned on demand by pi-craft - combine, split, extract, rotate, delete and reorder pages, read text, render a page to png, audit faux redactions, script its 163 tools. Use for "merge these two PDFs", "extract pages 1 and 3 from this PDF", "rotate page 1 and drop page 2", "what text is in this PDF".

Как установить скилл pdfcraft?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pdfcraft запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pdfcraft с