[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HQNC35K6BX6Y3FJJGZPBR5":3,"skill-same:01M6HQNC35K6BX6Y3FJJGZPBR5":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6HQNC35K6BX6Y3FJJGZPBR5","pdfcraft",null,"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\".","BlackBeltTechnology\u002Fpi-agent-dashboard","BlackBeltTechnology","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8101592?v=4","01M6HQDX7QAJA0QP4NYRYBMJ8A","BlackBelt Technology","01M6HQDXCC7719N9YDMQVH9JS6",348,"MIT","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fcraft-apps\u002F.pi\u002Fskills\u002Fpdfcraft\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"craft","for","headless","combine","split","with","render","pages","drop","PDF","use","pi","read","work","page","text","audit","delete","merge","2026-11-10 10:12:30",false,"---\nname: pdfcraft\ndescription: 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\".\n---\n\n# PdfCraft — headless PDF editing\n\nPdfCraft is ArtCraft's PDF app. `pi-craft` provisions the headless `pdfcraft-cli` on first use (no desktop app).\nChoosing between apps, the discover → execute → save → verify loop, hand-off formats and the MCP policy live in\n`craft-studio`. Note: `pi-craft verify --pages\u002F--text-contains` itself uses `pdfcraft-cli`, so any PDF you make is\nchecked by the same engine that wrote it.\n\n## What it is for \u002F formats\n\nPDF in, PDF \u002F png (`.png .jpg .tif .pam`) \u002F text out. Page-level operations (combine, split, extract, rotate,\ndelete, move, blank pages), metadata, text extraction, page rendering, forms, bookmarks, stamps, redaction,\nOCR\u002Foptimise batches. There is no project file: a PDF is the document. For laying out a new multi-page document\nuse DesignCraft or WordCraft (then `convert … pdf`); PdfCraft edits PDFs that already exist.\n\n## CLI dialect\n\n`pi-craft pdfcraft exec \u003Cargs…>` passes the arguments to `pdfcraft-cli`.\nPdfCraft has **no `commands` \u002F `describe` \u002F `--cmd`**: it has direct subcommands plus a JSON tool registry.\n\n```bash\npdfcraft-cli tools                                    # JSON list of the 163 automation tools + input schemas\npdfcraft-cli info \u003Cf.pdf>                             # JSON summary (pages, page_labels, bookmarks, encrypted, …)\npdfcraft-cli text \u003Cf.pdf> [--page N]                  # extracted text, pages separated by form feeds\npdfcraft-cli render \u003Cf.pdf> --page N [--dpi 96] --out x.png\npdfcraft-cli edit \u003Cin.pdf> --out \u003Cout.pdf> [--rotate 1,3:90] [--delete 2,4] [--move 5:1] [--insert-blank 1] [--title T] [--author A]\npdfcraft-cli combine a.pdf b.pdf … --out c.pdf\npdfcraft-cli extract \u003Cin.pdf> --pages 1,3,5 --out o.pdf\npdfcraft-cli split \u003Cin.pdf> (--every N | --before 3,7) [--out-dir DIR]\npdfcraft-cli audit \u003Cf.pdf>                            # faux-redaction finder (JSON; fails when found)\npdfcraft-cli check \u003Cfiles|dirs…> [--json out.json]    # does each PDF open and render\npdfcraft-cli run \u003Ctool> [key=value …] [--root DIR] [--out image.png]   # one tool\npdfcraft-cli run --script steps.json [--root DIR]     # several tools in one process\n```\n\n- `edit` options **run in order** and later page numbers refer to the document *after* the earlier options\n  (`--delete 2 --move 3:1` moves the page that is third after the deletion). Rotation is `PAGES:DEGREES`.\n- `run \u003Ctool> key=value`: values are JSON-ish (`doc=1 page=1`); strings with spaces need shell quotes.\n- `--script steps.json` is a JSON array: `[{\"tool\":\"doc_open\",\"args\":{\"path\":\"a.pdf\"}}, …]`; each step prints its result.\n- `--root DIR` (on `run`, `batch`, `mcp`; **not** on `info`\u002F`edit`\u002F…) confines file access to DIR and relative paths then resolve\n  *against DIR*.\n\n## State between invocations\n\nDirect subcommands (`edit`, `combine`, …) read a file and write a **new** file (`--out`); the input is never modified.\nThe automation tools (`run`) are different: they work on *open documents* (`doc_open` → `doc` id, usually `1`), and\na **single `run` process exits and forgets its documents** (`run page_add_text doc=1 …` alone fails with \"no open\ndocument with id 1\"). Put `doc_open`, the edits and `doc_save` in one `--script` (or one MCP session). Edits are\nin memory until `doc_save` (`path` = save as; omit = in place).\n\n## Discovery first\n\nThere is no `commands`: discovery is `pdfcraft-cli tools`.\n\n```bash\npi-craft pdfcraft exec tools | jq -r '.[] | \"\\(.name)\\t\\(.read_only)\\t\\(.description[0:80])\"'   # all names\npi-craft pdfcraft exec tools | jq '.[] | select(.name==\"page_add_text\") | .input_schema'       # parameters\npi-craft pdfcraft exec info doc.pdf                    # page count before choosing page numbers\n```\n\nEach entry has `name`, `description`, `input_schema` (JSON Schema, `required` list), `read_only`, and `command`\n(the GUI command id, often `null`). Use `name`. Typical families: `doc_*` (open\u002Fsave\u002Fcombine\u002Fsplit\u002Finfo\u002Fset_info),\n`page_*` (rotate\u002Fdelete\u002Fmove\u002Fextract\u002Frender\u002Fadd_text\u002Fadd_image), `text_*` (extract\u002Ffind), `form_*`, `bookmark_*`,\n`redact_*`, `stamp_*`, `link_*`. Prefer a direct subcommand when one exists; use tools for everything else.\n\n## Traps\n\n- **`run` is stateless across processes** (above): `doc=1` only exists inside the same `--script`\u002FMCP session.\n- **`combine` adds one bookmark per input file** (`info` shows `bookmarks: 2` for two inputs); `pdf_version` becomes 1.7.\n- **`--root` rewrites relative paths**: with `--root sub`, `path=a.pdf` means `sub\u002Fa.pdf` and `path=sub\u002Fa.pdf` fails with\n  \"No such file\"; an absolute path outside the root fails with \"is outside the allowed directory\".\n- `info`\u002F`text`\u002F`edit` reject `--root` (\"unknown option\"); confine through `run --root` or `mcp --root` only.\n- `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).\n- Page numbers are 1-based; a page that does not exist is an error (`render --page 9` → \"page 9 does not exist\", exit 1).\n- `render` at `--dpi 72` gives one pixel per point (a 200×200 pt page → 200×200 px); the default is 96 dpi.\n- `edit --rotate` does not show in `info`; check it by rendering a non-square page (width and height swap).\n- `split --every 2 --out-dir D` names parts `\u003Cname>-p1-2.pdf`, `\u003Cname>-p3-4.pdf`, `\u003Cname>-p5.pdf` and also lists them on stdout.\n\n## MCP route (opt-in)\n\n`pi-craft pdfcraft mcp --register` writes a `craft-pdfcraft` entry into `.pi\u002Fmcp.json`; it is confined to the project\ndirectory (`--root`). 163 tools would flood the model context — register with `--compact` (a core set plus `tool_search`\nand `tool_call`) or stay on the bash route. GUI bridging (`ui --control`) is out of scope.\n\n## Recipes\n\nThe recipes generate their own PDFs with a tiny python3 writer (no network).\n\n```bash recipe: combine-extract\n# Two PDFs (2 + 3 pages) -> one 5-page PDF -> pages 1,3,5 only.\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 a.pdf \"Alpha one\" \"Alpha two\"\npython3 mk.py 200 200 b.pdf \"Beta one\" \"Beta two\" \"Beta three\"\npi-craft pdfcraft exec combine a.pdf b.pdf --out c.pdf\npi-craft pdfcraft exec extract c.pdf --pages 1,3,5 --out odd.pdf\npi-craft verify odd.pdf --pages 3 --text-contains \"Beta one\"\n```\n\n```bash recipe: rotate-delete\n# Rotate page 1 by 90 degrees and drop page 2; rotation is proved by the rendered size (300x200 -> 200x300).\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 300 200 in.pdf \"Keep me\" \"Drop me\" \"Also keep\"\npi-craft pdfcraft exec edit in.pdf --out out.pdf --rotate 1:90 --delete 2\npi-craft verify out.pdf --pages 2 --text-contains \"Also keep\"\npi-craft pdfcraft exec render out.pdf --page 1 --dpi 72 --out p1.png\npi-craft verify p1.png --size 200x300\n```\n\n```bash recipe: render-page\n# Render page 2 of a PDF at 144 dpi: a 200x200 pt page becomes 400x400 px.\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 two.pdf \"First page\" \"Second page\"\npi-craft pdfcraft exec text two.pdf --page 2\npi-craft pdfcraft exec render two.pdf --page 2 --dpi 144 --out page2.png\npi-craft verify page2.png --size 400x400\n```\n\n```bash recipe: script-stamp\n# Tools need an open document: open, edit and save inside ONE --script (a lone `run` forgets doc 1).\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 a.pdf \"Alpha one\" \"Alpha two\"\ncat > steps.json \u003C\u003C'JSON'\n[{\"tool\":\"doc_open\",\"args\":{\"path\":\"a.pdf\"}},\n {\"tool\":\"page_add_text\",\"args\":{\"doc\":1,\"page\":1,\"text\":\"STAMPED\",\"at\":[20,20],\"size\":20}},\n {\"tool\":\"doc_set_info\",\"args\":{\"doc\":1,\"key\":\"Title\",\"value\":\"Stamped\"}},\n {\"tool\":\"doc_save\",\"args\":{\"doc\":1,\"path\":\"s.pdf\"}}]\nJSON\npi-craft pdfcraft exec run --script steps.json\npi-craft verify s.pdf --pages 2 --text-contains STAMPED\n```\n","# PdfCraft — headless PDF editing\n\nPdfCraft is ArtCraft's PDF app. `pi-craft` provisions the headless `pdfcraft-cli` on first use (no desktop app).\nChoosing between apps, the discover → execute → save → verify loop, hand-off formats and the MCP policy live in\n`craft-studio`. Note: `pi-craft verify --pages\u002F--text-contains` itself uses `pdfcraft-cli`, so any PDF you make is\nchecked by the same engine that wrote it.\n\n## What it is for \u002F formats\n\nPDF in, PDF \u002F png (`.png .jpg .tif .pam`) \u002F text out. Page-level operations (combine, split, extract, rotate,\ndelete, move, blank pages), metadata, text extraction, page rendering, forms, bookmarks, stamps, redaction,\nOCR\u002Foptimise batches. There is no project file: a PDF is the document. For laying out a new multi-page document\nuse DesignCraft or WordCraft (then `convert … pdf`); PdfCraft edits PDFs that already exist.\n\n## CLI dialect\n\n`pi-craft pdfcraft exec \u003Cargs…>` passes the arguments to `pdfcraft-cli`.\nPdfCraft has **no `commands` \u002F `describe` \u002F `--cmd`**: it has direct subcommands plus a JSON tool registry.\n\n```bash\npdfcraft-cli tools                                    # JSON list of the 163 automation tools + input schemas\npdfcraft-cli info \u003Cf.pdf>                             # JSON summary (pages, page_labels, bookmarks, encrypted, …)\npdfcraft-cli text \u003Cf.pdf> [--page N]                  # extracted text, pages separated by form feeds\npdfcraft-cli render \u003Cf.pdf> --page N [--dpi 96] --out x.png\npdfcraft-cli edit \u003Cin.pdf> --out \u003Cout.pdf> [--rotate 1,3:90] [--delete 2,4] [--move 5:1] [--insert-blank 1] [--title T] [--author A]\npdfcraft-cli combine a.pdf b.pdf … --out c.pdf\npdfcraft-cli extract \u003Cin.pdf> --pages 1,3,5 --out o.pdf\npdfcraft-cli split \u003Cin.pdf> (--every N | --before 3,7) [--out-dir DIR]\npdfcraft-cli audit \u003Cf.pdf>                            # faux-redaction finder (JSON; fails when found)\npdfcraft-cli check \u003Cfiles|dirs…> [--json out.json]    # does each PDF open and render\npdfcraft-cli run \u003Ctool> [key=value …] [--root DIR] [--out image.png]   # one tool\npdfcraft-cli run --script steps.json [--root DIR]     # several tools in one process\n```\n\n- `edit` options **run in order** and later page numbers refer to the document *after* the earlier options\n  (`--delete 2 --move 3:1` moves the page that is third after the deletion). Rotation is `PAGES:DEGREES`.\n- `run \u003Ctool> key=value`: values are JSON-ish (`doc=1 page=1`); strings with spaces need shell quotes.\n- `--script steps.json` is a JSON array: `[{\"tool\":\"doc_open\",\"args\":{\"path\":\"a.pdf\"}}, …]`; each step prints its result.\n- `--root DIR` (on `run`, `batch`, `mcp`; **not** on `info`\u002F`edit`\u002F…) confines file access to DIR and relative paths then resolve\n  *against DIR*.\n\n## State between invocations\n\nDirect subcommands (`edit`, `combine`, …) read a file and write a **new** file (`--out`); the input is never modified.\nThe automation tools (`run`) are different: they work on *open documents* (`doc_open` → `doc` id, usually `1`), and\na **single `run` process exits and forgets its documents** (`run page_add_text doc=1 …` alone fails with \"no open\ndocument with id 1\"). Put `doc_open`, the edits and `doc_save` in one `--script` (or one MCP session). Edits are\nin memory until `doc_save` (`path` = save as; omit = in place).\n\n## Discovery first\n\nThere is no `commands`: discovery is `pdfcraft-cli tools`.\n\n```bash\npi-craft pdfcraft exec tools | jq -r '.[] | \"\\(.name)\\t\\(.read_only)\\t\\(.description[0:80])\"'   # all names\npi-craft pdfcraft exec tools | jq '.[] | select(.name==\"page_add_text\") | .input_schema'       # parameters\npi-craft pdfcraft exec info doc.pdf                    # page count before choosing page numbers\n```\n\nEach entry has `name`, `description`, `input_schema` (JSON Schema, `required` list), `read_only`, and `command`\n(the GUI command id, often `null`). Use `name`. Typical families: `doc_*` (open\u002Fsave\u002Fcombine\u002Fsplit\u002Finfo\u002Fset_info),\n`page_*` (rotate\u002Fdelete\u002Fmove\u002Fextract\u002Frender\u002Fadd_text\u002Fadd_image), `text_*` (extract\u002Ffind), `form_*`, `bookmark_*`,\n`redact_*`, `stamp_*`, `link_*`. Prefer a direct subcommand when one exists; use tools for everything else.\n\n## Traps\n\n- **`run` is stateless across processes** (above): `doc=1` only exists inside the same `--script`\u002FMCP session.\n- **`combine` adds one bookmark per input file** (`info` shows `bookmarks: 2` for two inputs); `pdf_version` becomes 1.7.\n- **`--root` rewrites relative paths**: with `--root sub`, `path=a.pdf` means `sub\u002Fa.pdf` and `path=sub\u002Fa.pdf` fails with\n  \"No such file\"; an absolute path outside the root fails with \"is outside the allowed directory\".\n- `info`\u002F`text`\u002F`edit` reject `--root` (\"unknown option\"); confine through `run --root` or `mcp --root` only.\n- `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).\n- Page numbers are 1-based; a page that does not exist is an error (`render --page 9` → \"page 9 does not exist\", exit 1).\n- `render` at `--dpi 72` gives one pixel per point (a 200×200 pt page → 200×200 px); the default is 96 dpi.\n- `edit --rotate` does not show in `info`; check it by rendering a non-square page (width and height swap).\n- `split --every 2 --out-dir D` names parts `\u003Cname>-p1-2.pdf`, `\u003Cname>-p3-4.pdf`, `\u003Cname>-p5.pdf` and also lists them on stdout.\n\n## MCP route (opt-in)\n\n`pi-craft pdfcraft mcp --register` writes a `craft-pdfcraft` entry into `.pi\u002Fmcp.json`; it is confined to the project\ndirectory (`--root`). 163 tools would flood the model context — register with `--compact` (a core set plus `tool_search`\nand `tool_call`) or stay on the bash route. GUI bridging (`ui --control`) is out of scope.\n\n## Recipes\n\nThe recipes generate their own PDFs with a tiny python3 writer (no network).\n\n```bash recipe: combine-extract\n# Two PDFs (2 + 3 pages) -> one 5-page PDF -> pages 1,3,5 only.\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 a.pdf \"Alpha one\" \"Alpha two\"\npython3 mk.py 200 200 b.pdf \"Beta one\" \"Beta two\" \"Beta three\"\npi-craft pdfcraft exec combine a.pdf b.pdf --out c.pdf\npi-craft pdfcraft exec extract c.pdf --pages 1,3,5 --out odd.pdf\npi-craft verify odd.pdf --pages 3 --text-contains \"Beta one\"\n```\n\n```bash recipe: rotate-delete\n# Rotate page 1 by 90 degrees and drop page 2; rotation is proved by the rendered size (300x200 -> 200x300).\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 300 200 in.pdf \"Keep me\" \"Drop me\" \"Also keep\"\npi-craft pdfcraft exec edit in.pdf --out out.pdf --rotate 1:90 --delete 2\npi-craft verify out.pdf --pages 2 --text-contains \"Also keep\"\npi-craft pdfcraft exec render out.pdf --page 1 --dpi 72 --out p1.png\npi-craft verify p1.png --size 200x300\n```\n\n```bash recipe: render-page\n# Render page 2 of a PDF at 144 dpi: a 200x200 pt page becomes 400x400 px.\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 two.pdf \"First page\" \"Second page\"\npi-craft pdfcraft exec text two.pdf --page 2\npi-craft pdfcraft exec render two.pdf --page 2 --dpi 144 --out page2.png\npi-craft verify page2.png --size 400x400\n```\n\n```bash recipe: script-stamp\n# Tools need an open document: open, edit and save inside ONE --script (a lone `run` forgets doc 1).\ncat > mk.py \u003C\u003C'PY'\nimport sys\nw, h, out, *texts = sys.argv[1:]\nn = len(texts)\nobjs = [\"\u003C\u003C \u002FType \u002FCatalog \u002FPages 2 0 R >>\",\n        \"\u003C\u003C \u002FType \u002FPages \u002FKids [%s] \u002FCount %d >>\" % (\" \".join(\"%d 0 R\" % (3 + 2 * i) for i in range(n)), n)]\nfor i, t in enumerate(texts):\n    objs.append(\"\u003C\u003C \u002FType \u002FPage \u002FParent 2 0 R \u002FMediaBox [0 0 %s %s] \u002FContents %d 0 R \u002FResources \u003C\u003C \u002FFont \u003C\u003C \u002FF1 %d 0 R >> >> >>\" % (w, h, 4 + 2 * i, 3 + 2 * n))\n    s = \"BT \u002FF1 24 Tf 20 100 Td (%s) Tj ET\" % t\n    objs.append(\"\u003C\u003C \u002FLength %d >>\\nstream\\n%s\\nendstream\" % (len(s), s))\nobjs.append(\"\u003C\u003C \u002FType \u002FFont \u002FSubtype \u002FType1 \u002FBaseFont \u002FHelvetica >>\")\nb, offs = \"%PDF-1.4\\n\", []\nfor i, o in enumerate(objs):\n    offs.append(len(b)); b += \"%d 0 obj\\n%s\\nendobj\\n\" % (i + 1, o)\nx = len(b)\nb += \"xref\\n0 %d\\n0000000000 65535 f \\n\" % (len(objs) + 1) + \"\".join(\"%010d 00000 n \\n\" % o for o in offs)\nb += \"trailer\\n\u003C\u003C \u002FSize %d \u002FRoot 1 0 R >>\\nstartxref\\n%d\\n%%%%EOF\\n\" % (len(objs) + 1, x)\nopen(out, \"w\").write(b)\nPY\npython3 mk.py 200 200 a.pdf \"Alpha one\" \"Alpha two\"\ncat > steps.json \u003C\u003C'JSON'\n[{\"tool\":\"doc_open\",\"args\":{\"path\":\"a.pdf\"}},\n {\"tool\":\"page_add_text\",\"args\":{\"doc\":1,\"page\":1,\"text\":\"STAMPED\",\"at\":[20,20],\"size\":20}},\n {\"tool\":\"doc_set_info\",\"args\":{\"doc\":1,\"key\":\"Title\",\"value\":\"Stamped\"}},\n {\"tool\":\"doc_save\",\"args\":{\"doc\":1,\"path\":\"s.pdf\"}}]\nJSON\npi-craft pdfcraft exec run --script steps.json\npi-craft verify s.pdf --pages 2 --text-contains STAMPED\n```\n",{"name":5,"description":7},"develop","fb9a5af356f540de4839ef851ebbe14bcce64c0f","packages\u002Fcraft-apps\u002F.pi\u002Fskills\u002Fpdfcraft",56,"https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard","https:\u002F\u002Fpi-dashboard.dev\u002F","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology","https:\u002F\u002Fwww.blackbelt.hu","2026-11-12 23:37:37",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add BlackBeltTechnology\u002Fpi-agent-dashboard --skill pdfcraft",{"tool":58,"command":59},"bunx","bunx skills add BlackBeltTechnology\u002Fpi-agent-dashboard --skill pdfcraft",{"tool":61,"command":62},"pnpm","pnpm dlx skills add BlackBeltTechnology\u002Fpi-agent-dashboard --skill pdfcraft","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fcraft-apps\u002F.pi\u002Fskills\u002Fpdfcraft\u002FSKILL.md",true,[],[67,93,118,139,160,181],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":38},"01M6HQYQ5B82AM5T9Y299S9CFY","youtube-srt","Download YouTube subtitles (SRT + timestamped TXT) for a channel, playlist or video via yt-dlp, no media download; optionally mine them into a categorized catalog (e.g. AI models by function, open weights, local runnability, hardware tier). Use on \"download the srt of this video\", \"transcripts of channel X for the last N months\", \"catalog the models AI Search talked about\", \"update docs\u002Fmodels\".","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-transcription\u002F.pi\u002Fskills\u002Fyoutube-srt\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,29,85,86,87,88,89,90,91,20,92],"youtube","srt","youtube srt","update","search","subtitles","dlp","Video","Media","open","catalog","update docs","yt-dlp","local","mine","via","ai models","last","media download",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":38},"01M6HQYJBKSXR55T5RSYNJQG4D","video-transcription","Transcribe video and audio files to SRT subtitles with speaker diarization using the Soniox (default) or AssemblyAI API. Use when the user wants to transcribe meetings, videos, or audio files. Supports MKV, MP4, MOV, M4A, MP3. Triggers on \"\u002Ftranscribe\", \"transcribe my meetings\", \"transcribe videos in ~\u002FMovies\", or any request to convert audio\u002Fvideo to text.","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-transcription\u002F.pi\u002Fskills\u002Fvideo-transcription\u002FSKILL.md",[],[81,100,101,102,79,103,104,105,106,34,107,29,108,109,110,111,24,112,113,75,114,115,116,117],"transcription","video transcription","transcribe","api","Audio","convert","mp4","meetings","files","default","mp3","triggers","videos","assemblyai","my","srt subtitles","request","when",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M6HQYECMVDC5TDHHW22VC5RX","speaker-id","Name anonymous diarized SRT speakers from a persistent local voiceprint library and repair speaker drift; local, CPU-only, no API key. Triggers \"who is speaker 2\", \"put names on the transcript\", \"label the meeting SRT\", \"the diarization split one person into three\", \"enroll my voice\". Backed by the pi-voiceid CLI.","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-transcription\u002F.pi\u002Fskills\u002Fspeaker-id\u002FSKILL.md",[],[125,126,127,128,103,129,30,130,131,132,133,87,111,134,135,136,137,75,23,138],"id","speaker id","cli","transcript","voice","only","three","drift","repair","name","CPU","meeting","anonymous","person",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":38},"01M6HQYAZWDXE9QJEG592E5PXK","veo-showreel-production-kit","Turn a video timeline + voiceover into a reproducible, sliceable Veo 3.1 prompt package with a consistency anchor and AI storyboard sketches.","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-production\u002F.pi\u002Fskills\u002Fveo-showreel-production-kit\u002FSKILL.md",[],[146,147,148,149,150,151,152,81,153,154,155,156,24,157,158,159],"Production","veo","kit","veo showreel production kit","package","Reproducible","timeline","prompt","voiceover","storyboard","anchor","consistency","veo 3","2026",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":38},"01M6HQY6TJ0X1ADDKYPMVJY6NV","veo-generator","Render a scripted video project into mp4 clips with the Google Veo 3.1 API. Reads a project's shot package (shots\u002F*.md), one clip per camera cut, reusing each shot's prompt and sketch — world anchor only with `--with-reference`, seed unless `--no-seed`. Use on \"render the Veo video for \u003Cproject>\", \"generate the videos from the shot scripts\", \"make the clips with Veo\".","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-production\u002F.pi\u002Fskills\u002Fveo-generator\u002FSKILL.md",[],[147,167,168,169,170,150,103,81,106,153,29,171,130,172,173,174,175,176,156,177,178,179,25,24,180,20,158],"generator","veo generator","google","generate","clip","sketch","camera","world","seed","project","cut","scripts","make","google veo",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":38},"01M6HQY1K2NZJ3B2YHSJJPPVAF","hyperframes-showreel","Turn real screen and site footage into a rhythmic showreel rendered with HyperFrames: sampling, edit script, redacted clips, a generated composition, Veo only as additive FX, music edit + camera punches, delivery render and export QA. Use on \"make a showreel from these recordings\", \"build the HyperFrames video\", \"assemble the footage edit\", \"render and QA the showreel\".","https:\u002F\u002Fgithub.com\u002FBlackBeltTechnology\u002Fpi-agent-dashboard\u002Fblob\u002Fdevelop\u002Fpackages\u002Fvideo-production\u002F.pi\u002Fskills\u002Fhyperframes-showreel\u002FSKILL.md",[],[188,189,190,81,191,192,193,29,194,195,196,130,197,198,199,200,201,25,24,202],"hyperframes","hyperframes showreel","qa","Composition","edit","generated","assemble","export","sampling","build","delivery","as","fx","screen","script"]