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.
npx skills add TimSimpsonJr/magpie --skill ingestgit clone --depth 1 https://github.com/TimSimpsonJr/magpieWrote 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.
[](https://agentmods.dev/skills/timsimpsonjr/magpie/ingest)<a href="https://agentmods.dev/skills/timsimpsonjr/magpie/ingest"><img src="https://agentmods.dev/badge/skills/timsimpsonjr/magpie/ingest/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.
<a href="https://agentmods.dev/skills/timsimpsonjr/magpie/ingest"><img src="https://agentmods.dev/badge/skills/timsimpsonjr/magpie/ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00132 | $0.02172 |
| Opus 5 | $0.00066 | $0.01086 |
| Sonnet 5 | $0.00026 | $0.00434 |
| Haiku 4.5 | $0.00013 | $0.00217 |
Grade A, and why
ingest 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 9d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ingest
Turn a PDF into a DoclingDocument JSON kept internally (never Markdown) so
every extracted element keeps its {page_no, bbox, charspan} provenance for the
Phase-8 citation anchor. A pure text-layer quality gate decides
native-text-vs-re-OCR before any OCR runs; degraded / handwriting pages are
flagged for a human, never silently OCR'd as fact.
This is the suite's document/PDF path. The structured-data (CSV/XLSX) path is
dataset-analyze (load_table + data_quality); ingest does not duplicate it.
Two modules, mirroring the suite's pure-core / engine-at-the-edge split (like
pii_sweep):
scripts/ingest_gate.py— the PURE gate (stdlib only; golden-testable with no model): per-pagediagnose_page(...)→decide_doc(...)conservative rollup.scripts/ingest.py— the Docling edge (the only docling importer; imports it lazily):ingest(pdf_path, *, out_dir, ...)→ writes theDoclingDocumentJSON and returns anIngestResult.
The verified Docling / RapidOCR / OCRmyPDF facts (the API surface, the
coordinate-origin trap, the confidence/nan semantics, the CPU-latency budget)
live in references/prior-art.md (the Phase-6 research gate) — consult it before
changing a convert call, a backend, or a confidence threshold.
The pipeline
Call one function; it runs the gate and applies the decision.
from scripts.ingest import ingest
result = ingest(
pdf_path, # the source PDF
out_dir=work_dir, # where the DoclingDocument JSON is written
deskew=False, # OCRmyPDF preprocess (Tesseract-gated; see the seam)
)
Internally (design §3):
- Source identity — SHA-256 the file (
source_sha256). Provenance is geometry and artifact identity: a citation ties back to which file. - Pass #1,
do_ocr=False— one Docling parse over the native text layer. Its per-page native text +parse_scoreare what the gate sees, and the doc is reused if the decision isnative(no second parse). - Gate (pure) —
diagnose_pagelabels each pagenative_ok/image_only/garbled_text/uncertain_review;decide_docrolls those up conservatively into a doc decision:native/ocr_images/force_full_doc_ocr/review. - Apply the decision —
nativereuses pass #1;ocr_images(do_ocr=True, force_full_page_ocr=False) lets Docling OCR the image regions;force_full_doc_ocr(force_full_page_ocr=True) overrides a present-but-bad text layer;reviewnever silently OCRs. OCR uses RapidOCR (no system binaries). - Normalize provenance + persist — force every item's prov bbox to a single
coord_origin, thensave_as_json(never Markdown). - Bates post-pass + degraded flags — capture Bates stamps separately
(keeping
{page_no, bbox}), and flag degraded / low-confidence / uncertain pages fromres.confidence+ the gate diagnoses.
What ships with it
2 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.
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.
- 9d ago First seen · 145 lines · 132 tokens per session scan A 13d10a83a593
ingest is a skill published in the GitHub repository TimSimpsonJr/magpie (2 stars, last pushed 2mo ago), licensed MIT. It adds 132 tokens to every session and 2,172 once invoked, about $0.0007 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.
Other skills, from other repositories
pdf-table-extractor-brief
Produces a structured extraction plan and clean spreadsheet template for pulling tabular data out of a PDF document — identifying the table structure, defining column headers, flagging extraction pitfalls, and providing a ready-to-use template that ensures the data lands in a consistent, analysable format.
pdf-design
Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.
document-design
Creates print-ready HTML that exports to PDF. Use to make a proposal, report, one-pager, newsletter, slides, or flyer.
data-table-formatter
Formats raw or messy data into a clean, publication-ready table with appropriate headers, sorted rows, consistent number formatting, and a source note — ready to drop into an article, report, or web page.
foia-request-writer
Drafts legally complete public records requests (federal FOIA and all 50 state laws), administrative appeals, and redaction challenge strategies for U.S. government records.
osint-tool-catalog
Produces a categorised catalog of open-source intelligence tools relevant to a journalist's investigation, with practical guidance on what each tool does, when to use it, and what its limitations are.