image-to-pages

image-to-pages is a skill for Codex from WiseWong6/wise-skills. It costs 120 tokens per session (2,551 once invoked), scanned A, original, MIT.

A tool that arranges a set of image files into self-contained HTML pages and PDF documents. It detects whether the images are mainly portrait or landscape and uses layouts such as 3:4 portrait containers or one landscape image per page.

In plain words
What is it for?
Use it to turn folders or ordered lists of JPG, PNG, GIF, or WebP images into printable portrait pages, landscape PDFs, or downloadable page screenshots.
Why use it?
It removes the manual work of ordering images and placing them into printable pages while preserving the intended image sequence.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to turn folders or ordered lists of JPG, PNG, GIF, or WebP images into printable portrait pages, landscape PDFs, or downloadable page screenshots.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wisewong6/wise-skills/image-to-pages
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add WiseWong6/wise-skills --skill image-to-pages
Clone the repo
git clone --depth 1 https://github.com/WiseWong6/wise-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-to-pages

README.md
[![agentmods](https://agentmods.dev/badge/skills/wisewong6/wise-skills/image-to-pages/github.svg)](https://agentmods.dev/skills/wisewong6/wise-skills/image-to-pages)
Your own site
<a href="https://agentmods.dev/skills/wisewong6/wise-skills/image-to-pages"><img src="https://agentmods.dev/badge/skills/wisewong6/wise-skills/image-to-pages/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-to-pages

Your own site · 80×15
<a href="https://agentmods.dev/skills/wisewong6/wise-skills/image-to-pages"><img src="https://agentmods.dev/badge/skills/wisewong6/wise-skills/image-to-pages.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.02551
Opus 5 $0.00060 $0.01275
Sonnet 5 $0.00024 $0.00510
Haiku 4.5 $0.00012 $0.00255

Measured 12d ago against content hash ddbc478f2aa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

image-to-pages scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate_html.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

image-to-pages/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

图片布局打印机

将图片自动拼接成白色容器,生成可直接双击打开的独立 HTML 页面和 PDF 文件(图片默认 WebP 压缩后 base64 嵌入,自包含、无需服务器)。

支持三种模式,并自动判定页面方向(横版/竖版):

模式对比

模式 适用场景 效果
auto(竖版默认) 任意比例竖版图片 → 拼成统一3:4容器 每容器放1-2张图,各占50%高度
full(竖版) 图片本身已是3:4比例 → 直接排列 每张图独占一个完整容器
landscape(横版,自动) 横版图片(宽>高)→ 横版 PDF 每页一张,比例自动匹配 4:3 或 16:9

方向自动判定:脚本读取每张图实际宽高,横版图占比大 → 整篇横版 PDF;否则竖版(主方向统一)。横版时一律每页一张。

输入

用户可提供:

  1. 文件夹路径 - 包含图片的文件夹(脚本按文件名自然排序)
  2. 图片文件列表 - 用 --files 指定,按给定顺序排版(文件名无序号时由你排好顺序传入)

支持的图片格式:jpg, jpeg, png, gif, webp

工作流程

步骤 1: 收集图片并确定顺序

排序策略(关键)

  • 文件名带序号1.png 2.png ... 10.png):直接传文件夹,脚本按自然排序(数值序,不会变成 1, 10, 2)。
  • 文件名无序号封面.png 目录.png 第二章.png 或随机文件名):脚本无法判断语义,由当前 Agent 评估顺序
    1. 先看文件名语义——章节词、步骤词、时间词、"一二三"等中文序词
    2. 文件名也无语义时,用当前 Agent 的图片查看能力逐张看图,按内容逻辑排序(漫画分镜、操作步骤、故事时间线、目录页码)
    3. 排好后用 --files <有序列表> 传给脚本,脚本严格按给定顺序、不重排
    4. 顺序不确定时,简要说明排序依据并询问用户确认

步骤 2: 生成 HTML 与 PDF

SCRIPT="<skill-root>/scripts/generate_html.py"

# 竖版图集(默认):自动拼成3:4容器
python3 $SCRIPT <图片文件夹> [输出名]

# 横版图集:自动检测,横版 PDF 每页一张(4:3 或 16:9 自动判定)
python3 $SCRIPT <横版图片文件夹>

# 文件名无序号:你评估好顺序后用 --files(--files 会吞掉后续位置参数,输出名用 --output)
python3 $SCRIPT --output <输出名> --files 封面.png 01.png 02.png 结尾.png

# 强制页面方向
python3 $SCRIPT <文件夹> --orientation landscape   # 强制横版
python3 $SCRIPT <文件夹> --orientation portrait     # 强制竖版

# 已有3:4图片,每张独占完整容器
python3 $SCRIPT <文件夹> --mode full

# 仅生成 HTML,不生成 PDF
python3 $SCRIPT <文件夹> --no-pdf

执行前把 <skill-root> 替换为当前加载的 image-to-pages Skill 绝对目录,不要假设它固定安装在 Claude、Codex 或其他 Agent 的某个家目录下。

自动模式检测:竖版图集若超 70% 接近 3:4,自动从 auto 升级到 full(每张独占一页)。

横版比例自动 snap:取横版图 宽/高 中位数,< 1.5 → 4:3(200mm×150mm),≥ 1.5 → 16:9(267mm×150mm)。竖版固定 3:4(150mm×200mm)。

输出文件名规则:不传输出名时自动用 <文件夹名>_layout;显式传 输出名--output 时用原名(不加 _layout 后缀)。

输出的 HTML 文件可直接双击打开,打印和下载功能完全正常,无需启动任何服务器。

参数说明

参数 说明
folder(位置) 图片文件夹路径,与 --files 二选一
output(位置) 输出文件名,--files 模式下改用 --output
--output 输出文件名,--files 模式下使用(避免与多值参数冲突)
--files 显式图片路径列表,按给定顺序排版,跳过文件名排序
--mode 竖版布局:auto(拼2张)/ full(每张独占),横版时不生效
--orientation auto(默认,按主方向)/ landscape(强制横版)/ portrait(强制竖版)
--no-pdf 跳过 PDF 生成,仅输出 HTML
--no-compress 关闭压缩,按原图 base64 嵌入(旧行为,体积约原图 1.33 倍)
--img-format 压缩格式:webp(默认,最小且文字锐利)/ jpeg
--quality 压缩质量 1-100(默认 80)
--max-width 图片最大宽度,超过则等比缩小(默认 1920,0=不缩放)
--pdf-quality PDF 二次压缩档位(Ghostscript):ebook(默认,150dpi,缩约5倍)/ screen(72dpi,最小)/ printer(300dpi)/ none(不压缩)

Read the full file on GitHub · 156 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 156 lines · 120 tokens per session scan A ddbc478f2aa4

Subscribe to this mod's changes

image-to-pages is a skill published in the GitHub repository WiseWong6/wise-skills (6 stars, last pushed 3d ago), licensed MIT. It adds 120 tokens to every session and 2,551 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories