wiki-ingest-pdf
Skill2 starsChanged 3 months agoMITView on GitHub
Use when adding one or more PDF files as sources in a llm-wiki knowledge base. Covers source folder creation, PDF extraction, structured analysis, index update, and wiki ingest. Triggers on: "add this PDF to the wiki", "ingest this paper", "create a source for this file", "add as source in my wiki".
In this repository8 other files it gives its agents.
- anti-slopSkill
- coding-agentSkill
- kb-conventionsSkill
- oracleSkill
- pdf-parseSkill
- research-extractionSkill
- research-paperSkill
- summarizeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Add one or more PDFs as first-class wiki sources: folder layout, extraction, structured analysis, index update, and ingest in one …
- Very specific: line 26
Run llm-wiki:bootstrap for the target wiki.
- Distinctive: line 61
If the PDF is already in the right place, skip the move.
- Very specific: line 65
Use the paper type schema from geronimo-skills:kb-conventions.
- Very specific: line 71
Follow geronimo-skills:pdf-parse to select the right tool.
- Very specific: line 111
Create analysis/README.md — one-line entry per analysis file (no frontmatter needed.
- Very specific: line 115
Every file in analysis/ that should be indexed must have valid frontmatter.
- Very specific: line 116
Use llm-wiki:content to verify and fix if needed.
- Distinctive: line 143
After analysis, fill in:
- Distinctive: line 152
Add a row to the sources table:
- Very specific: line 160
Use llm-wiki:content to review the final page set, then commit and index with wiki_ingest:
- Distinctive: line 170
All other warnings need investigation before proceeding
- Very specific: line 172
After ingest, run wiki_lint and check for orphan warnings:
- Distinctive: line 178
Run Steps 1–8 for each PDF independently.
≈ “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
Wiki Ingest PDF
Add one or more PDFs as first-class wiki sources: folder layout, extraction, structured analysis, index update, and ingest in one repeatable pipeline.
Required sub-skills (read before starting):
geronimo-skills:pdf-parse— extraction tool selection and xberg invocationgeronimo-skills:research-paper— structured analysis pipeline and anti-slopgeronimo-skills:kb-conventions— frontmatter schema, annotation markers, layoutllm-wiki:bootstrap— orient to the target wiki before touching filesllm-wiki:content— create and update wiki pages with correct frontmatter
Step 0 — Orient to the wiki
Run llm-wiki:bootstrap for the target wiki. Identify:
- Wiki root path (from
wiki_config) - The
sources/section slug and itsindex.mdpath - Existing source slugs (avoid collisions)
Step 1 — Derive slug and paths
From the PDF filename, derive a lowercase-hyphenated slug.
Convention: <author>-<short-topic> or <author>-<year>-<short-topic>.
PDF: Psychisme_modele_constructible_cardon.pdf
Slug: cardon-psychismePaths:
<wiki_root>/sources/<slug>/
original.pdf ← PDF moved/copied here
extracted/
content.md ← xberg output
analysis/
<slug>.md ← structured analysis
README.md ← analysis index
source.md ← wiki page (paper.json schema)Step 2 — Create folder layout and move PDF
mkdir -p <wiki_root>/sources/<slug>/extracted
mkdir -p <wiki_root>/sources/<slug>/analysis
mv <inbox_path> <wiki_root>/sources/<slug>/original.pdfIf the PDF is already in the right place, skip the move.
Step 3 — Create stub source.md
Use the paper type schema from geronimo-skills:kb-conventions.
Fill title, tags, read_when from the filename and any known context.
Set status: draft, confidence: 0.0, leave tldr and claims empty.
Step 4 — Extract PDF
Follow geronimo-skills:pdf-parse to select the right tool.
xberg (machine-readable PDFs):
# Detect
pdfinfo original.pdf # check Characters: > 0
# Extract — xberg writes WARN lines to stdout; redirect and strip
xberg extract original.pdf --content-format markdown --page-markers true \
> /tmp/<slug>_raw.md
grep -vE "^WARN" /tmp/<slug>_raw.md > extracted/content.md
# Verify
wc -w -l extracted/content.md # sanity: > 500 words for a real docmarker-pdf (scanned/image PDFs):
uvx marker-pdf marker_single original.pdf --output_dir extracted/Step 5 — Produce structured analysis
Follow geronimo-skills:research-paper §Step 4.
Output: analysis/<slug>.md.
Required sections:
- Publication details
- Core thesis (
[DIRECT]) - Key contributions (annotated)
- Mathematical foundations (or
∅ NOT FOUND IN SOURCES) - Algorithms / pseudocode (or
∅) - Architecture / system design
- Experimental results (or
∅) - Limitations and open problems
- Relation to existing KB (use
> ✦ NEW:,> ⚠ DIVERGES FROM KB:,> ∅ NOT FOUND IN SOURCES:) - Glossary
Apply geronimo-skills:anti-slop before saving.
Create analysis/README.md — one-line entry per analysis file (no frontmatter needed; indexer skips it by design).
Step 5b — Verify analysis frontmatter
Every file in analysis/ that should be indexed must have valid frontmatter.
Use llm-wiki:content to verify and fix if needed.
Required fields per geronimo-skills:kb-conventions:
---
title: "Analysis: <Document Title>"
type: note
summary: "<one-line summary>"
read_when:
- <retrieval condition>
status: active
last_updated: "<YYYY-MM-DD>"
source: "sources/<slug>/original.pdf"
---Checklist before proceeding:
type:field present (most common omission — indexer silently skips pages without it)status: activesummaryis one line, not a paragraphsourcepoints tosources/<slug>/original.pdf
extracted/content.md and analysis/README.md intentionally have no frontmatter — leave them as-is.
Step 6 — Update source.md
After analysis, fill in:
tldr: one-sentence key takeawaystatus: activeconcepts: slugs of wiki concept pages this source informsconfidence: 0.8–1.0 for[DIRECT]; 0.5–0.7 for[INFERRED]; 0.1–0.4 for[SPECULATIVE]claims: 3–7 key claims using the claim schema inkb-conventions
Step 7 — Update sources/index.md
Add a row to the sources table:
| [<slug>](sources/<slug>/source.md) | <Title> | paper | <tags> | active |Step 8 — Ingest
Use llm-wiki:content to review the final page set, then commit and index with wiki_ingest:
wiki_ingest(wiki: "<wiki-name>", path: "sources/<slug>")Check the response:
pages_validatedshould coversource.md+ allanalysis/*.mdfiles with frontmatter- Warnings about
no frontmatteronextracted/content.mdandanalysis/README.mdare expected — ignore informsedge warnings (target has type 'note', expected concept) mean a slug inconcepts:points to a non-concept page — fix the target type or remove the slug and add a[[wikilink]]in the body instead- All other warnings need investigation before proceeding
After ingest, run wiki_lint and check for orphan warnings:
- An orphan warning on
analysis/<slug>.mdmeanssource.mdhas no link to the analysis file — add a[[sources/<slug>/analysis/<slug>]]wikilink in thesource.mdbody and re-run ingest - 0 errors and 0 warnings (excluding expected no-frontmatter) is the acceptance bar
Multiple PDFs
Run Steps 1–8 for each PDF independently. Do not batch-create slugs or merge analyses. Each PDF gets its own folder and analysis.
Common mistakes
| Mistake | Fix |
Using --output flag with xberg | Flag doesn't exist; use stdout redirect + grep |
Skipping pdfinfo check | Machine-readable vs scanned requires different tool |
type: note on analysis files | Set type: note (analysis files are notes, not papers) |
Linking concepts: to synthesis docs or sections | Only type: concept pages; use [[wikilink]] in body for others |
Forgetting type: field in analysis frontmatter | Required; wiki indexer skips pages without it |
Leaving confidence: 0.0 in source.md after analysis | Update to reflect actual annotation level |
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.

