save-pdf-kb
Skill7 starsChanged 48 days agoMITView on GitHub
Convert a local or public remote PDF into an auditable Markdown knowledge-base bundle with the original document, inferred headings, page provenance, OCR text, image metadata, and local visual assets. Use when the user asks to save, import, archive, extract, or turn a PDF into KB Markdown, especially scanned documents and PDFs containing screenshots, Slack messages, charts, photos, or a mix of native text and images.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- hraness/wrenchword for word, first seen Sep 28, 2026
- hraness/personal-monorepo-templateedited, first seen Sep 28, 2026
Other versions4 projects use a version of this.
Word for word · 3
- hraness/wrench★ 7100% same
- hraness/slopcamera★ 7100% same
- hraness/direct★ 2100% same
Edited · 1
- hraness/personal-monorepo-template★ 499% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- .agents/skills/cinematic-pack-authoring/AGENTS.mdAGENTS.md
- .agents/skills/percolate-kb/AGENTS.mdAGENTS.md
- .agents/skills/phase-final-reviewer/AGENTS.mdAGENTS.md
- .agents/skills/phase-implementer/AGENTS.mdAGENTS.md
- .agents/skills/phase-orchestrator/AGENTS.mdAGENTS.md
- .agents/skills/phase-reviewer/AGENTS.mdAGENTS.md
- .agents/skills/plan-kb/AGENTS.mdAGENTS.md
- .agents/skills/query-kb/AGENTS.mdAGENTS.md
- .agents/skills/refresh-kb/AGENTS.mdAGENTS.md
- .agents/skills/save-pdf-kb/AGENTS.mdAGENTS.md
- .agents/skills/save-url-kb/AGENTS.mdAGENTS.md
- .agents/skills/write-phase-plan/AGENTS.mdAGENTS.md
- kb/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- cinematic-pack-authoringSkill
- percolate-kbSkill
- phase-final-reviewerSkill
- phase-implementerSkill
- phase-orchestratorSkill
- phase-reviewerSkill
- plan-kbSkill
- query-kbSkill
- refresh-kbSkill
- save-url-kbSkill
- write-phase-planSkill
- slopcameraSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Use the installed wordcell CLI.
- Distinctive: line 20
Check the local conversion routes, then capture the PDF:
- Distinctive: line 56
Treat native PDF text and image text as two independent extraction surfaces.
- Distinctive: line 97
Use only IDs and SHA-256 values from the first manifest.
- Very specific: line 117
Use complete only when every page was processed and every extracted image was classified.
- Distinctive: line 128
Check that source-image links accompany OCR-derived text.
- Distinctive: line 132
After adding or linking the capture, run the vault's normal refresh and check:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Save a PDF to the knowledge base
Use the installed wordcell CLI. Resolve <vault> to the directory containing its
authored or managed index.md front door, then set the shell-local KB_ROOT
to that path (KB_ROOT=kb from a typical repository root).
Check the local conversion routes, then capture the PDF:
wordcell doctor
wordcell pdf "/absolute/path/to/document.pdf" --output "$KB_ROOT/articles"
wordcell pdf "https://example.com/document.pdf" --output "$KB_ROOT/articles"Pass a stable slug or replace a prior tool-owned bundle only when needed:
wordcell pdf "/absolute/path/to/document.pdf" --slug ben-leaves-zo --output "$KB_ROOT/articles"
wordcell pdf "/absolute/path/to/document.pdf" --output "$KB_ROOT/articles" --forceThe command installs one atomic bundle:
<slug>/
<slug>.md
capture.json
source.pdf
annotations.json # present after a reviewed annotation pass
assets/source.pdf is the byte-identical input. The manifest records its original
name, hash, byte count, page count, bounded document metadata, processed-page
and block counts, image geometry, OCR status, and warnings without retaining
the original absolute path. A reviewed second pass also retains the exact
normalized annotation array as annotations.json; the manifest records its
path, count, byte count, and SHA-256 so the image interpretation remains
reproducible.
Preserve text and visual evidence
Treat native PDF text and image text as two independent extraction surfaces. Native text supplies layout, heading, link, and reading-order evidence. Local OCR supplies candidate text for scans and screenshots. Keep every extracted image as an asset even when its text is converted to Markdown.
For recognizable conversations, review the source image and turn OCR into readable message blocks with available platform, author, channel, and timestamp metadata. Preserve uncertain words explicitly instead of silently repairing them. Read references/review.md before refining screenshot-heavy or mixed-media PDFs.
The first capture supplies stable image IDs and hashes in capture.json.
For screenshot-heavy documents, write reviewed interpretations to a JSON array
and rerun the capture:
[
{
"id": "page-5-image-1-0123456789ab",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"kind": "mixed",
"method": "agent",
"markdown": "> bg @ Oct 15, 2024 at 4:26 PM\n> Message text",
"metadata": {
"platform": "Slack",
"contentType": "message screenshot",
"author": "bg",
"timestamp": "Oct 15, 2024 at 4:26 PM",
"participants": ["bg"]
}
}
]wordcell pdf "/absolute/path/to/document.pdf" \
--output "$KB_ROOT/articles" \
--annotations /tmp/pdf-image-annotations.json \
--forceUse only IDs and SHA-256 values from the first manifest. The command rejects a
stale interpretation if the extracted image changed. Omit metadata fields that
are not visible, and use kind: "visual" with an optional alt instead of
inventing a transcription for a non-text image. Put only the transcribed body
in markdown; the renderer owns the image embed, “Text visible in…” heading,
and visible metadata line.
Embed primarily visual images in the Markdown. For text-bearing or mixed images, keep the source image embedded beside the transcription so diagrams, photos, UI state, and spatial meaning remain inspectable. The embed is the source-image reference; do not duplicate it inside an annotation.
Heading inference follows native font, emphasis, spacing, and page geometry. Review semantic hierarchy separately: typography can identify a heading without proving whether it is a peer or a child of the preceding section. Report an ambiguous or incorrect level instead of silently treating the inference as source truth.
Report completeness literally
Use complete only when every page was processed and every extracted image was
classified. Preserve partial when a tool, page, image, byte, time, or OCR
boundary was reached. A usable native-text extraction does not make
unprocessed screenshot pages complete.
Review:
- Compare the manifest page count with the PDF.
- Review inferred headings and report ambiguous or incorrect hierarchy.
- Sample native-text, screenshot, scanned, and visual-only pages.
- Confirm every retained asset resolves from the Markdown or manifest.
- Check that source-image links accompany OCR-derived text.
- Report the output path, status, page and image counts, OCR coverage, and unresolved warnings.
After adding or linking the capture, run the vault's normal refresh and check:
wordcell percolate "<maintained-note-id>" --root "$KB_ROOT" --limit 25 --json
wordcell refresh --root "$KB_ROOT"
wordcell check --root "$KB_ROOT"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

