Agent skill

Photo To Scanned PDF

by daymade in daymade/claude-code-skills

Two pipelines ending at a scanner-look PDF. An agent skill from daymade/claude-code-skills.

MITAuto-check passedDocuments & Office

Install Photo To Scanned PDF

skills CLI
$ npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install daymade/claude-code-skills photo-to-scanned-pdf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/daymade-docs/photo-to-scanned-pdf .claude/skills/photo-to-scanned-pdf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
photo-to-scanned-pdf
GitHub stars
1.4k
Token cost
~2.3k tokens
SKILL.md length
1,006 words
Files
6 (incl. scripts, references)
Skills in repo
104
Repo updated
First seen
Licence
MIT

At a glance

Two pipelines ending at a scanner-look PDF. An agent skill from daymade/claude-code-skills.

  • Works in 6 steps: Dependencies → Rectify → Order by content, detect colored paper… → …
  • Tasks that involve PDF
  • SKILL.md covers Step 0 — Dependencies, Step 1 — Rectify, Step 2 — Order by content,… and Step 3 — Enhance (noteshrink,…, plus 4 more sections
  • Runs Python scripts from its folder; calls uv, uvx and brew

What it does

Photo To Scanned PDF is an agent skill from daymade/claude-code-skills. Two pipelines ending at a scanner-look PDF. (1) Phone photos of paper documents (contracts, stamped certificates, receipts, forms, handwritten notes) → clean scanner-quality PDF: perspective rectification + noteshrink whitening + A4 assembly + mandatory whole-document check. Trigger: "把照片 做成扫描件", "photos to scanned PDF", "make this look scanned", "手机拍的 文档转 PDF", "盖章文件扫描", replacing pages in an existing scanned PDF, any CamScanner-like request. (2) A digital document with no signature yet (rendered docx/PDF…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/digital-signature-synthesis.md`, `scripts/assemble_pdf.py` and `scripts/make_contact_sheet.py`).

It sits in Documents & Office, covering PDF and Word documents. It works with Microsoft Word and OpenCV. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

When your agent uses it

  • Tasks that involve PDF
  • Tasks that involve Word documents

Example prompts

  • “把照片 做成扫描件”
  • “photos to scanned PDF”
  • “make this look scanned”
  • “/photo-to-scanned-pdf”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Dependencies
  2. Rectify
  3. Order by content, detect colored paper (agent judgment)
  4. Enhance (noteshrink, split by paper color)
  5. Assemble
  6. Verify the WHOLE document (mandatory, not optional)

What it can do on your machine

Read from SKILL.md and the folder at commit 0e52df5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • uvx
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv and uvx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Photo To Scanned PDF loads about 2.3k tokens when it runs, and up to ~6.1k if it reads all its reference files. Until then it costs about 256 tokens; SKILL.md has 1,006 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~256
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 0e52df5, republished under its MIT licence (© daymade). 1,006 words, ~2,340 tokens.

Download SKILL.mdSave it as .claude/skills/photo-to-scanned-pdf/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
photo-to-scanned-pdf
description
Two pipelines ending at a scanner-look PDF. (1) Phone photos of paper documents (contracts, stamped certificates, receipts, forms, handwritten notes) → clean scanner-quality PDF: perspective rectification + noteshrink whitening + A4 assembly + mandatory whole-document check. Trigger: "把照片 做成扫描件", "photos to scanned PDF", "make this look scanned", "手机拍的 文档转 PDF", "盖章文件扫描", replacing pages in an existing scanned PDF, any CamScanner-like request. (2) A digital document with no signature yet (rendered docx/PDF, confirmation form, contract draft) → make it look hand-signed and scanned: synthesize a handwriting-style signature, composite it onto the signature line, apply the same scan-look post-processing. Trigger: "帮我做个手写签名", "生成签名盖到这份文件上", "做成签过字的扫描件", "synthesize a signature", any request for a document that needs to look signed without a real photographed signature. Do NOT hand-roll levels/contrast enhancement for scan-look — tried and rejected twice; this skill's pipeline is the proven one.
disable-model-invocation
true

Photo → Scanned PDF

Two related pipelines, same destination look, different starting point: phone photos of paper documents, or a digital document that needs a synthetic signature before it looks signed. The pipelines that work, and the failure modes that ship wrong PDFs if skipped.

Which one do you need?

The input is...Use
Phone photos of an already-signed/stamped paper documentThis file, main pipeline below
A digital document (docx/PDF) with no signature yet, and you need to make it look hand-signedreferences/digital-signature-synthesis.md
photos ──► rectify (photo_to_scan.py --raw)
       ──► ORDER BY CONTENT, detect colored paper   ← agent eyes, not filenames
       ──► enhance: noteshrink (white batch with -g │ colored pages separately,
                                after white-balance pre-pass)
       ──► assemble_pdf.py → A4 PDF
       ──► make_contact_sheet.py → READ IT, verify EVERY page   ← mandatory

Division of labor: scripts carry execution; you (the agent) carry the two judgment steps — content-based page ordering, and whole-document verification. Neither can be automated away: filenames lie about order, and per-page spot checks miss wrong-slot bugs. The digital-signature branch shares this same philosophy with its own two judgment calls — see the reference file.

Step 0 — Dependencies

bash
which pdftoppm || brew install poppler   # contact sheet + any PDF rendering
uvx noteshrink --help | head -3          # first run builds it (~30 s)

Scripts are uv run single-file scripts (PEP 723); OpenCV/PIL/img2pdf resolve automatically on first run.

Step 1 — Rectify

bash
uv run <skill>/scripts/photo_to_scan.py --raw --out-dir work --prefix page \
    photo1.jpg photo2.jpg ...

Expected: one page_NN.jpg per photo, each tagged [quad]. A [FULLFRAME-fallback] tag means the paper outline wasn't found (busy background, page cut off) — view that photo and decide: retake, or accept the uncropped frame.

The script handles EXIF rotation internally (cv2.imread ignores EXIF; phone photos come rotated — this silently produces sideways pages if you rectify with raw OpenCV).

Step 2 — Order by content, detect colored paper (agent judgment)

Read every rectified image (batch of ~6 per message) and record two things:

  1. Its identity — date, title, page number, whatever distinguishes pages. Batch-exported photos (WeChat, AirDrop) get timestamps of the export moment, often all within one second — filename order is meaningless. Real case: 17 photos turned out to be in exact reverse document order; only content reading caught it.
  2. Its paper color — white, or colored (blue/yellow/pink stock)? Colored pages take a different path in Step 3. If unsure, sample programmatically: mean RGB of a blank region; B > R + 25 ⇒ blue-ish paper.

Build the final page order as an explicit list before proceeding. If pages are supposed to match an external register (an invoice list, a session table), cross-check identity against it now — missing/duplicate pages found here cost seconds; found after delivery they cost a redo.

Step 3 — Enhance (noteshrink, split by paper color)

White-paper pages — one batch, global palette:

bash
uvx noteshrink -w -g -K -q -b ns -c "true" page_03.jpg page_01.jpg page_07.jpg ...
# inputs IN FINAL PAGE ORDER → outputs ns0000.png, ns0001.png, ... in that order
  • -w white background, -g one global palette (uniform ink/stamp color across pages), -K keep given order, -c "true" skips its internal PDF step (we assemble ourselves).
  • Pass filenames explicitly. zsh does not word-split $VAR — a file list in a variable arrives as one giant "filename", noteshrink exits without output, and -q keeps it silent. Verify outputs exist (ls ns0*.png) rather than trusting stdout.

Colored-paper pages — separate, with white-balance pre-pass:

bash
uv run <skill>/scripts/photo_to_scan.py --out-dir work --prefix wb colored_photo.jpg   # no --raw
uvx noteshrink -w -g -K -q -b nc -c "true" work/wb_01.jpg

Two distinct failure modes force this split (both shipped as bugs before the rule existed):

  1. Colored pages inside the -g batch poison the whole document — the paper color enters the global palette and white pages come out with tinted shadows/artifacts.
  2. noteshrink alone on colored paper whitens the background but not the foreground cast — black ink photographed on blue stock reads blue-purple, a red stamp reads maroon. The default (non---raw) mode of photo_to_scan.py divides out the paper color first, so ink returns to black and stamps to red.

Step 4 — Assemble

bash
uv run <skill>/scripts/assemble_pdf.py --out scanned.pdf \
    ns0000.png ns0001.png nc0000.png ns0002.png ...   # FINAL page order

Expected: OK scanned.pdf (N pages, ~0.05 MB/page). Edge crop (default 24px top / 12px sides at 200 dpi) removes the sliver of desk surface that rectification drags in along page borders; document margins dwarf it.

Show full SKILL.md (438 more words)Show less

Step 5 — Verify the WHOLE document (mandatory, not optional)

bash
uv run <skill>/scripts/make_contact_sheet.py scanned.pdf --out contact.png

Read contact.png and check every page: identity sequence complete and correct (each date/title where it should be, no duplicates, none missing), no off-color page, stamps/signatures present. Then spot-read 1–2 pages at full resolution for text sharpness.

Why whole-document, every time: two shipped-bug stories from the session this skill was distilled from —

  • A page-replacement task wrote the new page into the wrong slot (an off-by-one in a copy command), silently overwriting a neighboring page. The per-page check of the replaced slots passed; the clobbered neighbor was only caught by the user.
  • A palette-poisoning bug (Step 3 #1) tinted pages that were not being edited. Checking only the edited pages missed it.

The cost asymmetry is absolute: contact sheet = one Read; a wrong page in a delivered PDF = redo + lost trust. "I verified the pages I changed" is not verification.

Replacing pages in an existing scanned PDF

Keep the per-page enhanced PNGs (ns*/nc*) as the working set. To replace page k: process the new photo through Steps 1–3, overwrite that page's PNG, re-run Steps 4–5. When copying into numbered slots, mind the mapping — slot numbers shift when photo order was reversed; derive the slot from the page's content identity, never from its position in the photo batch. Then the Step 5 full check is what actually protects you.

Troubleshooting

SymptomCause / fix
Output "doesn't look scanned" — gray haze, soft textYou hand-rolled levels/curves/divide enhancement. Don't — two attempts were rejected by a real user before switching to noteshrink (background sampling + palette quantization is what produces the flat-white scan look).
White pages have tinted shadowsA colored-paper page was inside the -g batch. Re-run whites-only batch (Step 3).
Ink looks blue/purple, stamp looks maroon on a colored pagenoteshrink got the colored page raw. Insert the white-balance pre-pass (photo_to_scan.py without --raw).
noteshrink produced no output, no errorFile list passed via an unquoted shell variable under zsh (no word splitting), or paths with spaces. Pass explicit filenames; check ls ns0*.png.
Page sideways / upside downEXIF ignored somewhere upstream, or the quad landed landscape. photo_to_scan.py corrects EXIF + rotates to portrait; upside-down pages it cannot know — catch at Step 2 and rotate the source photo.
[FULLFRAME-fallback] on a photoPaper outline not detected (low contrast vs table, page cut off). Retake against a dark background, or accept full frame + rely on edge crop.
Thin dark strip along page edge in the PDFDesk surface dragged in by rectification. Raise --crop-top/--crop-side in assemble_pdf.py.
Pages in wrong order in the PDFFilename-order assumption. Order comes from Step 2 content reading, passed explicitly to noteshrink (-K) and assemble_pdf.py.

© daymade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in daymade-docs/photo-to-scanned-pdf of daymade/claude-code-skills.

  • SKILL.md
  • references/digital-signature-synthesis.md
  • scripts/assemble_pdf.py
  • scripts/make_contact_sheet.py
  • scripts/photo_to_scan.py
  • scripts/synthesize_signature.py

Open the folder on GitHubat commit 0e52df5

Compare with similar skills

Photo To Scanned PDF next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Photo To Scanned PDF compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Photo To Scanned PDF this skilldaymade/claude-code-skills1.4k—~2.3kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Gzh Designisjiamu/gzh-design-skill4k—~2.2kAutomated safety check: PassAGPL-3.0
GenOffice Document CLIgenspark-ai/genoffice9.2k—~19kAutomated safety check: PassApache-2.0
Translate Bookdeusyu/translate-book2.1k—~5.5kAutomated safety check: NotesMIT
Docsagentdocsagent/docsagent625—~834Automated safety check: PassNone

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    4k GitHub stars~2.2k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • GenOffice Document CLI

    genspark-ai/genoffice

    Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.

    9.2k GitHub stars~19k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Translate Book

    deusyu/translate-book

    Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents.

    2.1k GitHub stars~5.5k tokensUpdated 17 days ago
    Documents & OfficeAuto-check: notes
  • Docsagent

    docsagent/docsagent

    Search and manage private, local document collections (PDF, PPTX, DOCX) offline.

    625 GitHub stars~834 tokensUpdated 13 days ago
    Documents & OfficeAuto-check passed
  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes

More from daymade/claude-code-skills

All 104 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.5k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.5k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.5k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.5k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Skill Creator

    daymade/claude-code-skills

    Creates, edits and benchmarks skills; supersedes the official skill-creator plugin, so when both are listed, use this one.

    1.5k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.5k GitHub stars~2.9k tokensUpdated today
    Auto-check: notes

Questions about Photo To Scanned PDF

What does Photo To Scanned PDF do?

Two pipelines ending at a scanner-look PDF. An agent skill from daymade/claude-code-skills. Photo To Scanned PDF is an agent skill from daymade/claude-code-skills. Two pipelines ending at a scanner-look PDF.

When should I use Photo To Scanned PDF?

Photo To Scanned PDF fits situations like: tasks that involve PDF; tasks that involve Word documents.

How do I install Photo To Scanned PDF in Claude Code?

Run `npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a claude-code`. Or copy the skill folder (daymade-docs/photo-to-scanned-pdf in daymade/claude-code-skills) into .claude/skills/photo-to-scanned-pdf in your project. Claude Code loads it when a task matches its description.

How do I install Photo To Scanned PDF in Codex?

Run `npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a codex`. Or copy the skill folder (daymade-docs/photo-to-scanned-pdf in daymade/claude-code-skills) into .agents/skills/photo-to-scanned-pdf in your project. Codex loads it when a task matches its description.

Can I use Photo To Scanned PDF in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add daymade/claude-code-skills --skill photo-to-scanned-pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/photo-to-scanned-pdf, .gemini/skills/photo-to-scanned-pdf, .github/skills/photo-to-scanned-pdf and .opencode/skills/photo-to-scanned-pdf in your project.

What does Photo To Scanned PDF need to run?

Going by SKILL.md and its folder, Photo To Scanned PDF needs Python for the scripts in its folder and the command-line tools its instructions call (uv, uvx and brew). Our summary lists: Python 3.

Does Photo To Scanned PDF access the network?

SKILL.md contains no URLs. Its commands use uv and uvx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Photo To Scanned PDF safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Photo To Scanned PDF use?

Photo To Scanned PDF is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Photo To Scanned PDF use?

About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.8k tokens, read only when the agent opens those files.

What are the alternatives to Photo To Scanned PDF?

Skills that share tags, products or a category with Photo To Scanned PDF: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 4k stars), GenOffice Document CLI (genspark-ai/genoffice, 9.2k stars) and Translate Book (deusyu/translate-book, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Photo To Scanned PDF?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,448 GitHub stars. The repository holds 104 skills in this directory. The repository was last updated on October 10, 2026.

Source: daymade/claude-code-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.