[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1008FT36GM7699Y8JESTY":3,"skill-same:01M7F1008FT36GM7699Y8JESTY":47},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F1008FT36GM7699Y8JESTY","images-to-pdf",null,"Use when the user wants to combine a folder or list of images into a single PDF — typically on a standard paper size (A4 default) for digital printers, document-style sharing, or proof sheets. Modes - one-per-page (default; auto-orient portrait\u002Flandscape per image), multi-up (2\u002F4\u002F6\u002F9 per page), as-is (native pixel size). Prefers `img2pdf` for lossless JPEG embedding; falls back to ImageMagick for non-JPEG sources or when img2pdf is missing. Triggers - \"put these photos into a PDF\", \"make a proof sheet\", \"bundle this folder for the print shop\".","shotcowboystyle\u002Fag-skills","shotcowboystyle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62471?v=4","01M7EZTCFCZJ6K3MYW8BPM4X6R","Curtis Blanton","01M7EZTCG1S5M04J90A931X9BX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fimage-ops\u002Fskills\u002Fimages-to-pdf\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: images-to-pdf\ndescription: Use when the user wants to combine a folder or list of images into a single PDF — typically on a standard paper size (A4 default) for digital printers, document-style sharing, or proof sheets. Modes - one-per-page (default; auto-orient portrait\u002Flandscape per image), multi-up (2\u002F4\u002F6\u002F9 per page), as-is (native pixel size). Prefers `img2pdf` for lossless JPEG embedding; falls back to ImageMagick for non-JPEG sources or when img2pdf is missing. Triggers - \"put these photos into a PDF\", \"make a proof sheet\", \"bundle this folder for the print shop\".\nallowed-tools: Bash(img2pdf *), Bash(magick *), Bash(convert *), Bash(montage *), Bash(identify *), Bash(pdfinfo *), Bash(which *), Bash(command *), Bash(vipsthumbnail *), Bash(find *), Bash(mktemp *), Bash(mkdir *), Bash(rm *), Read, Write\n---\n\n# Images → PDF\n\nBundle images into a PDF with predictable paper-size and layout behaviour. Built for the recurring \"I need to send this batch to a printer\" workflow.\n\n## When to use\n\n- Preparing a photo set for a digital print shop (one-per-page on A4 \u002F Letter).\n- Building a proof sheet (multi-up).\n- Sharing a document-style PDF (e.g. scanned receipts) without re-encoding.\n- Bundling AI-generated images for client review.\n\nDo **not** use this skill when:\n- The user wants the PDF to also include text\u002Fmarkdown — that's a different workflow (typst \u002F pandoc).\n- The PDF needs OCR text layer — out of scope (run tesseract separately, then merge).\n- A single image → PDF without paper-size constraints — `img2pdf \u003Cinput> -o \u003Coutput>.pdf` is enough; no skill needed.\n\n## Inputs\n\n1. **Inputs** — directory, glob, or explicit file list. Required.\n2. **Output PDF path** — required.\n3. **Paper size** — `A4` (default), `A3`, `A5`, `Letter`, `Legal`, `Tabloid`, or explicit `\u003CW>x\u003CH>\u003Cunit>` (e.g. `210x297mm`, `8.5x11in`).\n4. **Mode** — one of:\n   - `one-per-page` (default) — one image per page, fitted to the paper with margins. Auto-rotates the page (portrait vs landscape) to match the image's aspect ratio.\n   - `multi-up` — `2`, `4`, `6`, or `9` images per page (`--per-page N`). Grid layout, each cell sized equally, image fitted within cell.\n   - `as-is` — native pixel dimensions become the page size (use for digital archives or when DPI metadata is authoritative).\n5. **Margin** — millimetres. Default `10mm` (`one-per-page`), `5mm` per cell (`multi-up`), `0` (`as-is`).\n6. **Sort order** — `filename` (default, natural sort), `exif-date` (capture time from EXIF), `mtime` (filesystem mtime).\n7. **DPI** — assumed DPI for fit calculations when source has no DPI metadata. Default `300` (print-quality).\n8. **Auto-orient** — default `on` for `one-per-page`. Rotates page (not image) to match aspect — landscape image gets a landscape page. Disable with `--no-auto-orient`.\n\n## Procedure\n\n1. Detect tool availability:\n   - `which img2pdf` — preferred path.\n   - `which magick || which convert` — fallback for cases img2pdf can't handle.\n   - If neither exists, point at `image-ops-install-deps`.\n\n2. Enumerate inputs in the requested sort order (image extensions only: jpg, jpeg, png, webp, tiff, gif). Skip non-image files with a one-line note.\n\n3. **Mode: `one-per-page` with img2pdf** — preferred path because img2pdf embeds JPEG bytes losslessly (no re-encode):\n\n   ```bash\n   img2pdf \\\n     --pagesize \"$paper_spec\" \\\n     --imgsize \"$paper_minus_margins\" \\\n     --fit into \\\n     --auto-orient \\\n     -o \"$output\" \\\n     \"${files[@]}\" \\\n     || { echo \"img2pdf failed — see stderr above; not falling through silently\" >&2; exit 1; }\n   ```\n\n   Collect the inputs into a bash array (`files=()`, `files+=( \"$f\" )` per match) and expand as `\"${files[@]}\"`. A bare unquoted file list word-splits on the first path containing a space.\n\n   `--fit into` keeps aspect ratio, fits within page minus margins. `--auto-orient` rotates pages to match image aspect.\n\n   img2pdf accepts JPEG, PNG, TIFF natively. For other formats (WebP, HEIC, AVIF), pre-convert to PNG via vipsthumbnail and stage in a temp directory; img2pdf will re-embed losslessly.\n\n4. **Mode: `multi-up`** — img2pdf doesn't natively grid; build an intermediate composite per page using ImageMagick `montage`:\n\n   ```bash\n   # for each chunk of N files:\n   montage \"${chunk[@]}\" -tile \"${cols}x${rows}\" \\\n     -geometry \"${cell_w}x${cell_h}+${margin}+${margin}\" \\\n     -background white \\\n     \"$staged\u002Fpage-$idx.png\"\n   ```\n\n   Then feed the staged page PNGs to img2pdf as `one-per-page` against the chosen paper size. Cell dimensions = `(paper-w - 2*outer-margin) \u002F cols - cell-margin` and similar for height.\n\n   Layout mapping: `--per-page 2` = 1×2 portrait or 2×1 landscape (orient by paper); `4` = 2×2; `6` = 2×3 (portrait) \u002F 3×2 (landscape); `9` = 3×3.\n\n5. **Mode: `as-is`** — straight pass-through:\n\n   ```bash\n   img2pdf -o \"$output\" \"${files[@]}\"\n   ```\n\n   No `--pagesize` or `--imgsize`; img2pdf uses each image's native dimensions and DPI.\n\n6. **ImageMagick fallback** (only if img2pdf is missing or chokes on a format):\n\n   ```bash\n   magick -density \"$dpi\" \"${files[@]}\" \\\n     -page \"$paper_spec\" \\\n     -gravity center \\\n     -background white \\\n     -extent \"$paper_spec\" \\\n     -compress jpeg -quality 90 \\\n     \"$output\"\n   ```\n\n   Two things about the ordering. `-density` is a *setting*, not an operator: it applies only to images read after it appears, so placing it at the end of the command leaves the sources decoded at their default density and the requested DPI silently does nothing. Likewise `-background white` must precede `-extent`, or the padding colour on non-matching aspect ratios is whatever the current background happens to be rather than the white a print shop expects.\n\n   `magick` is the ImageMagick 7 entry point (`convert` is the v6 name, deprecated in v7).\n\n   This re-encodes JPEGs (quality loss), so prefer img2pdf when possible. Surface a warning when falling back.\n\n7. Verify output. Check the exit status of whichever tool ran — do not report success on a non-zero exit — then confirm the artefact:\n\n   ```bash\n   pdfinfo \"$output\" || { echo \"output is not a readable PDF\" >&2; exit 1; }\n   ```\n\n   If `pdfinfo` is unavailable, check the file is non-empty and starts with the `%PDF` magic. Report the page count.\n\n## Output\n\n- The PDF at the resolved path.\n- Summary: `\u003Cn> images → \u003Coutput> (\u003Cpages> pages, \u003Csize-MB>MB)`.\n- Mode used + tool used (img2pdf primary \u002F ImageMagick fallback).\n- List of any skipped or staged-via-conversion files.\n\n## Notes\n\n- `one-per-page` with auto-orient is the default because real-world prints want each photo at maximum size on the page regardless of original orientation. Disable for documents\u002Fcontracts where every page must be uniform portrait.\n- img2pdf is the right default: lossless JPEG embedding means the output PDF is essentially the JPEGs in a PDF wrapper — no quality loss, smallest possible file. ImageMagick re-encodes; only fall back when forced.\n- For very large input sets (>200 images) ImageMagick `montage` becomes slow on multi-up mode — chunk and parallelise. For one-per-page mode, img2pdf handles thousands of pages without issue.\n- Paper-size internals: A4 = 210×297mm, A3 = 297×420mm, A5 = 148×210mm, Letter = 8.5×11in (215.9×279.4mm), Legal = 8.5×14in, Tabloid = 11×17in.\n- Print-shop-friendly defaults: A4, 10mm margin, 300 DPI assumption, auto-orient on. Override only with explicit reason.\n- For mixed orientations in `as-is` mode without auto-orient, the resulting PDF will have heterogeneous page sizes — many printers handle this but some don't. Default to `one-per-page` with auto-orient for printer reliability.\n","# Images → PDF\n\nBundle images into a PDF with predictable paper-size and layout behaviour. Built for the recurring \"I need to send this batch to a printer\" workflow.\n\n## When to use\n\n- Preparing a photo set for a digital print shop (one-per-page on A4 \u002F Letter).\n- Building a proof sheet (multi-up).\n- Sharing a document-style PDF (e.g. scanned receipts) without re-encoding.\n- Bundling AI-generated images for client review.\n\nDo **not** use this skill when:\n- The user wants the PDF to also include text\u002Fmarkdown — that's a different workflow (typst \u002F pandoc).\n- The PDF needs OCR text layer — out of scope (run tesseract separately, then merge).\n- A single image → PDF without paper-size constraints — `img2pdf \u003Cinput> -o \u003Coutput>.pdf` is enough; no skill needed.\n\n## Inputs\n\n1. **Inputs** — directory, glob, or explicit file list. Required.\n2. **Output PDF path** — required.\n3. **Paper size** — `A4` (default), `A3`, `A5`, `Letter`, `Legal`, `Tabloid`, or explicit `\u003CW>x\u003CH>\u003Cunit>` (e.g. `210x297mm`, `8.5x11in`).\n4. **Mode** — one of:\n   - `one-per-page` (default) — one image per page, fitted to the paper with margins. Auto-rotates the page (portrait vs landscape) to match the image's aspect ratio.\n   - `multi-up` — `2`, `4`, `6`, or `9` images per page (`--per-page N`). Grid layout, each cell sized equally, image fitted within cell.\n   - `as-is` — native pixel dimensions become the page size (use for digital archives or when DPI metadata is authoritative).\n5. **Margin** — millimetres. Default `10mm` (`one-per-page`), `5mm` per cell (`multi-up`), `0` (`as-is`).\n6. **Sort order** — `filename` (default, natural sort), `exif-date` (capture time from EXIF), `mtime` (filesystem mtime).\n7. **DPI** — assumed DPI for fit calculations when source has no DPI metadata. Default `300` (print-quality).\n8. **Auto-orient** — default `on` for `one-per-page`. Rotates page (not image) to match aspect — landscape image gets a landscape page. Disable with `--no-auto-orient`.\n\n## Procedure\n\n1. Detect tool availability:\n   - `which img2pdf` — preferred path.\n   - `which magick || which convert` — fallback for cases img2pdf can't handle.\n   - If neither exists, point at `image-ops-install-deps`.\n\n2. Enumerate inputs in the requested sort order (image extensions only: jpg, jpeg, png, webp, tiff, gif). Skip non-image files with a one-line note.\n\n3. **Mode: `one-per-page` with img2pdf** — preferred path because img2pdf embeds JPEG bytes losslessly (no re-encode):\n\n   ```bash\n   img2pdf \\\n     --pagesize \"$paper_spec\" \\\n     --imgsize \"$paper_minus_margins\" \\\n     --fit into \\\n     --auto-orient \\\n     -o \"$output\" \\\n     \"${files[@]}\" \\\n     || { echo \"img2pdf failed — see stderr above; not falling through silently\" >&2; exit 1; }\n   ```\n\n   Collect the inputs into a bash array (`files=()`, `files+=( \"$f\" )` per match) and expand as `\"${files[@]}\"`. A bare unquoted file list word-splits on the first path containing a space.\n\n   `--fit into` keeps aspect ratio, fits within page minus margins. `--auto-orient` rotates pages to match image aspect.\n\n   img2pdf accepts JPEG, PNG, TIFF natively. For other formats (WebP, HEIC, AVIF), pre-convert to PNG via vipsthumbnail and stage in a temp directory; img2pdf will re-embed losslessly.\n\n4. **Mode: `multi-up`** — img2pdf doesn't natively grid; build an intermediate composite per page using ImageMagick `montage`:\n\n   ```bash\n   # for each chunk of N files:\n   montage \"${chunk[@]}\" -tile \"${cols}x${rows}\" \\\n     -geometry \"${cell_w}x${cell_h}+${margin}+${margin}\" \\\n     -background white \\\n     \"$staged\u002Fpage-$idx.png\"\n   ```\n\n   Then feed the staged page PNGs to img2pdf as `one-per-page` against the chosen paper size. Cell dimensions = `(paper-w - 2*outer-margin) \u002F cols - cell-margin` and similar for height.\n\n   Layout mapping: `--per-page 2` = 1×2 portrait or 2×1 landscape (orient by paper); `4` = 2×2; `6` = 2×3 (portrait) \u002F 3×2 (landscape); `9` = 3×3.\n\n5. **Mode: `as-is`** — straight pass-through:\n\n   ```bash\n   img2pdf -o \"$output\" \"${files[@]}\"\n   ```\n\n   No `--pagesize` or `--imgsize`; img2pdf uses each image's native dimensions and DPI.\n\n6. **ImageMagick fallback** (only if img2pdf is missing or chokes on a format):\n\n   ```bash\n   magick -density \"$dpi\" \"${files[@]}\" \\\n     -page \"$paper_spec\" \\\n     -gravity center \\\n     -background white \\\n     -extent \"$paper_spec\" \\\n     -compress jpeg -quality 90 \\\n     \"$output\"\n   ```\n\n   Two things about the ordering. `-density` is a *setting*, not an operator: it applies only to images read after it appears, so placing it at the end of the command leaves the sources decoded at their default density and the requested DPI silently does nothing. Likewise `-background white` must precede `-extent`, or the padding colour on non-matching aspect ratios is whatever the current background happens to be rather than the white a print shop expects.\n\n   `magick` is the ImageMagick 7 entry point (`convert` is the v6 name, deprecated in v7).\n\n   This re-encodes JPEGs (quality loss), so prefer img2pdf when possible. Surface a warning when falling back.\n\n7. Verify output. Check the exit status of whichever tool ran — do not report success on a non-zero exit — then confirm the artefact:\n\n   ```bash\n   pdfinfo \"$output\" || { echo \"output is not a readable PDF\" >&2; exit 1; }\n   ```\n\n   If `pdfinfo` is unavailable, check the file is non-empty and starts with the `%PDF` magic. Report the page count.\n\n## Output\n\n- The PDF at the resolved path.\n- Summary: `\u003Cn> images → \u003Coutput> (\u003Cpages> pages, \u003Csize-MB>MB)`.\n- Mode used + tool used (img2pdf primary \u002F ImageMagick fallback).\n- List of any skipped or staged-via-conversion files.\n\n## Notes\n\n- `one-per-page` with auto-orient is the default because real-world prints want each photo at maximum size on the page regardless of original orientation. Disable for documents\u002Fcontracts where every page must be uniform portrait.\n- img2pdf is the right default: lossless JPEG embedding means the output PDF is essentially the JPEGs in a PDF wrapper — no quality loss, smallest possible file. ImageMagick re-encodes; only fall back when forced.\n- For very large input sets (>200 images) ImageMagick `montage` becomes slow on multi-up mode — chunk and parallelise. For one-per-page mode, img2pdf handles thousands of pages without issue.\n- Paper-size internals: A4 = 210×297mm, A3 = 297×420mm, A5 = 148×210mm, Letter = 8.5×11in (215.9×279.4mm), Legal = 8.5×14in, Tabloid = 11×17in.\n- Print-shop-friendly defaults: A4, 10mm margin, 300 DPI assumption, auto-orient on. Override only with explicit reason.\n- For mixed orientations in `as-is` mode without auto-orient, the resulting PDF will have heterogeneous page sizes — many printers handle this but some don't. Default to `one-per-page` with auto-orient for printer reliability.\n",{"name":5,"description":7,"allowed-tools":24},"Bash(img2pdf *), Bash(magick *), Bash(convert *), Bash(montage *), Bash(identify *), Bash(pdfinfo *), Bash(which *), Bash(command *), Bash(vipsthumbnail *), Bash(find *), Bash(mktemp *), Bash(mkdir *), Bash(rm *), Read, Write","main","f846d9a97082ff30d613b55a085cef425d822473","plugins\u002Fimage-ops\u002Fskills\u002Fimages-to-pdf","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle","https:\u002F\u002Fshotcowboystyle.github.io","Building smarter with AI, automation & modern tools. Exploring how far one person can go without a big team using today’s AI.","2026-11-10 04:58:27",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add shotcowboystyle\u002Fag-skills --skill images-to-pdf",{"tool":39,"command":40},"bunx","bunx skills add shotcowboystyle\u002Fag-skills --skill images-to-pdf",{"tool":42,"command":43},"pnpm","pnpm dlx skills add shotcowboystyle\u002Fag-skills --skill images-to-pdf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fimage-ops\u002Fskills\u002Fimages-to-pdf\u002FSKILL.md",true,[],[48,54,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7F1YRY5S5QRJ1V0BJS130QX","no-description","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fno-description\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7F1Y9BV2FJNQJ3NB32JS5CM","good-skill","Fixture skill that satisfies every rule.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7F1XXBQ3NQRXZSS0KAGAR9V","broken-link","Links to a reference file that does not exist.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbroken-link\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7F1XBX4R46NR9W0HXQ7XCDX","Bad_Name","Name violates the kebab-case rule and does not match the directory.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad-name\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7F1WNAF8WNEQ7S5HKT5VK0D","skill-authoring","Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-authoring\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7F1W30TC0XFNSF7YBRGETK2","weigh-bags","Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts\u002Freconcile.py.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftravel-packing-assistant\u002Fskills\u002Fweigh-bags\u002FSKILL.md",[],[]]