Automated summary
Splits a batch-scanned archival PDF (one physical folder per PDF, vFlat style) into document-level Zotero items, copying metadata and filing each new item into the batch item's deepest collection.
Strengths
- Identifies document boundaries by visually reading the extracted page images rather than trusting OCR (letters, press clippings, manuscripts)
- Extracts the original embedded JPEG from each page, rasterizing only as a fallback
- Cleanly separates inspection (locate plus page reading) from writing, through an editable manifest.json reviewed before execution
- Respects Zotero safety rules: no writes under ~/Zotero, everything goes through the web API, and the batch item is never deleted
Limitations
- Assumes vFlat-style PDFs with exactly one embedded photo per page; other scan workflows need script changes
- Reading every page visually is manual work and gets slow on large batches
- Conventions such as the `for review` tag, `DONE ` prefix and item-type mapping are defaults that must be edited for a different workflow
Use it when a scanned archival folder has been imported into Zotero as a single PDF item and needs to be broken into per-document items with metadata.
Avoid it for PDFs that are already split per document, scans without one embedded photo per page, or when you cannot use the Zotero web API.
Security analysis
SafeThe skill's actions—reading a local PDF, splitting it with pypdf, creating Zotero items, uploading attachments, and tagging a title—are all core intended functionality. It explicitly forbids writing under ~/Zotero and forbids deleting the batch item, uses no curl|sh, base64 payloads, or secret-exfiltration, and the only credential use is for the stated Zotero API. Network access and API-key handling are inherent to the task and non-destructive, so overall risk is low.
- •Reads Zotero API credentials (ZOTERO_API_KEY etc.) from plaintext ~/.zotero_env; used only for the legitimate Zotero web API, no evidence of external exfiltration
- •Broad Bash(python3:*) permission with network access via pyzotero creates items, uploads PDFs, and mutates remote library metadata (prepends 'DONE ' to a title)
- •Writes intermediate files to /tmp/zotero-split/<batchKey>/ (standard, non-destructive)
Examples
Split the Zotero item "[Folder 42, Box 1]" into per-document items, using the deepest collection and tagging everything for review.Run zsplit.py locate on "Folder 17, Box 3" and show me the page images so we can decide the document boundaries.Split the batch scan item "[Folder 8, Box 2]" and produce a transcription for any handwritten pages you find.name: zotero-split-scans description: Split a batch-scanned archival PDF in your Zotero library into document-level items. Use whenever you ask to "split" a Zotero folder/batch scan item (e.g. an item titled "[Folder N, Box X]"), break a multi-document archive scan into separate items, or process a new batch scan from the archive. The batch PDFs are assumed to come from the vFlat iPhone app — one OCR'ed PDF per physical archive folder, with multiple documents inside. allowed-tools: Bash(python3:*) Read
Zotero Split Scans
Splits one "whole folder" batch scan item into per-document Zotero items, with metadata copied from the batch item and visual (not OCR-trusting) document identification.
Conventions are adaptable defaults. The choices below — the
for reviewtag, theDONEtitle marker, the vFlat-style "one embedded photo per page" assumption, the letter/manuscript/article item-type mapping, and the "deepest collection only" rule — reflect one archival workflow. They are sensible defaults, not requirements; adjust the prose here and the constants inscripts/zsplit.py(e.g.DONE_PREFIX) to match your own library.
Hard rules
- Never write under
~/Zotero/(storage, settings, database). Local storage is read-only; every write goes through the Zotero web API. - Never delete the batch item, and leave its content alone. The single allowed edit: on a clean
executerun, the script prependsDONEto its title (e.g.[Folder 42, Box 1]→DONE [Folder 42, Box 1]) so processed folders stand out in the library. Its PDF, tags, collections, and other metadata are never touched. - All new items get the
for reviewtag. - New items go into the batch item's deepest collection only (the folder-level subcollection, e.g. "folder 42, box 1.2.1") — not parent collections, not anywhere else, unless you say otherwise.
Workflow
1. Locate
python3 ~/.claude/skills/zotero-split-scans/scripts/zsplit.py locate <ITEMKEY or "title query">
Resolves the batch item, copies its PDF out of local Zotero storage (~/Zotero/storage/<attKey>/, API download as fallback), extracts each page's embedded scan photo to the workdir /tmp/zotero-split/<batchKey>/, and writes batch.json (metadata + per-page OCR previews) and manifest.template.json.
vFlat pages each contain exactly one embedded JPEG (the camera photo) under an invisible OCR text layer — the script extracts the original photo; it only rasterizes as a fallback.
2. Inspect visually
Read every page image (page-001.jpeg, …) with the Read tool. Do not segment documents from the OCR previews alone — your visual recognition is more accurate. Decide:
- Document boundaries (which pages belong together — letterheads, signatures, page numbers, paper/handwriting changes are the cues)
- Item type per document:
letter— letters and memorandanewspaperArticle/magazineArticle— press clippingsmanuscript— everything else (default)
- Title, creators, date as visible on the document
- Whether any page is handwritten → produce a transcription from the image (do not rely on OCR)
3. Write the manifest
Write manifest.json in the workdir (start from manifest.template.json):
{
"batch_key": "XXXXXXXX",
"collections": ["<deepest collection key only>"],
"documents": [
{
"pages": [1, 2],
"itemType": "letter",
"title": "",
"creators": [
{"creatorType": "author", "firstName": "Clay", "lastName": "Myers"},
{"creatorType": "recipient", "firstName": "…", "lastName": "…"}
],
"date": "1983-07-25",
"transcription": null
}
]
}
Metadata rules:
- Every item needs a
title— except letters, which may instead have at least anauthorcreator. Never invent a title starting with[Letter(that pattern is Zotero's auto-generated display title; leave letter titles empty instead). dateas written on the document (ISO if a full date is known).transcription: plain text for handwritten documents; becomes a child note.nullotherwise.- Optional per-document fields passed through when the item type supports them:
letterType,publicationTitle,place,abstractNote,manuscriptType,numPages,section. For an article's printed page range usebibPages(a string like"42-48") — notpages, which is reserved for selecting the scan pages of the document. - Tags, Archive, and Loc. in Archive are copied from the batch item automatically — don't put them in the manifest.
4. Execute
python3 ~/.claude/skills/zotero-split-scans/scripts/zsplit.py execute /tmp/zotero-split/<batchKey>/manifest.json
Splits the PDF with pypdf (preserves the OCR text layer), creates the items, uploads each split PDF, adds transcription notes, then runs a verification pass listing each new item's children. Warns if any batch pages were left unassigned.
When every document is created successfully, it finally prepends DONE to the batch item's title — your at-a-glance signal in the library for which folders are processed. This is idempotent (a re-run won't stack DONE DONE), and a run where any item failed to create leaves the title unmarked so DONE always means "fully split". Unassigned pages only warn; they don't block the marker.
5. Report
Tell the user: items created (keys + labels + web links from results.json), any attachment/note failures, any unassigned pages, whether the batch item was marked DONE (and if not, why — e.g. a creation failure left it unmarked), and a reminder that everything is tagged for review.
Gotchas
pyzotero.attachment_simplereturns three buckets:success,failure, andunchanged. An already-uploaded identical file lands inunchanged— that is success, not failure.- Credentials live in
~/.zotero_env(ZOTERO_LIBRARY_ID/ZOTERO_LIBRARY_TYPE/ZOTERO_API_KEY). See.zotero_env.examplein the repo. - Full-library
q=searches sometimes time out; prefer passing the 8-char item key. - If the batch item was just scanned, the local client may not have synced yet — if the item isn't found via the API, ask the user to sync Zotero first.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/zotero-batch-scan-splitter-mrx3xwut/download' --output '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md.part' && mv '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md.part' '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Bash(python3:*) Read
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md' && test -s '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/zotero-split-scans' && cp -R '.skill-downloads/zotero-batch-scan-splitter-mrx3xwut' '.claude/skills/zotero-split-scans'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/zotero-batch-scan-splitter-mrx3xwut'openskills read 'zotero-batch-scan-splitter-mrx3xwut'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/zotero-batch-scan-splitter-mrx3xwut/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
PDF Reader
Productivity
Read and extract text from PDF files, including documents, reports, contracts, and spreadsheets. Works with local files, URLs, and WhatsApp attachments. Use whenever PDF content is needed, even if not explicitly requested.
Discord Messaging Workflows
Productivity
Use the message tool to send, edit, and moderate Discord messages with interactive components.
Interactive Verdict Preview
Productivity
Generate an interactive HTML preview of keep/drop verdicts for maintainer review, then process the pasted feedback JSON.