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.
git clone --depth 1 https://github.com/Spark-To-Paper-Skills/paper-wikiWrote 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/commands/spark-to-paper-skills/paper-wiki/wiki-compile)<a href="https://agentmods.dev/commands/spark-to-paper-skills/paper-wiki/wiki-compile"><img src="https://agentmods.dev/badge/commands/spark-to-paper-skills/paper-wiki/wiki-compile/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/commands/spark-to-paper-skills/paper-wiki/wiki-compile"><img src="https://agentmods.dev/badge/commands/spark-to-paper-skills/paper-wiki/wiki-compile.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.00022 | $0.02783 |
| Opus 5 | $0.00011 | $0.01392 |
| Sonnet 5 | $0.00004 | $0.00557 |
| Haiku 4.5 | $0.00002 | $0.00278 |
Grade A, and why
wiki-compile 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 12d 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 — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Run the paper-wiki wiki-compile action. This file is a Claude Code slash-command
adapter; the action itself is platform-neutral.
Load the canonical project context
Read, in order:
WIKI.md— the only authoritative project rules, including variant, schemas, compilation rules, and prohibitions.research.md— current scope, lifecycle, seeds/material inventory, and progress.- The existing
wiki/tree — current compiled state.
CLAUDE.md and AGENTS.md are runtime adapters. Never take schema or business
rules from them, and never update them during compilation.
Diff raw/ against wiki/
List source material under raw/<topic>/, including OCR Markdown under
raw/<topic>/mineru/. Match each source to its compiled note using the mapping in
WIKI.md.
- New source: queue it.
- Already compiled: skip it unless the user requested
recompile. - OCR-derived source: validate paths and control metadata before reading any
OCR Markdown. The source directory must be a direct child with a safe
basename under
raw/<topic>/mineru/;lstatit, its manifest, every listed Markdown file, and every ancestor from the wiki root. Each must be a real directory or regular file as appropriate, never a symlink, junction, hard link with an unexpected link count, or other reparse point, and everyrealpathmust remain inside the source directory (the marker remains insidemineru/). Do not follow links while discovering files. "Safe" uses the OCR scripts' portable-name rules: no empty/dot component, separator, absolute/drive prefix, control character, trailing dot/space, Windows-forbidden punctuation or device basename, and no NFC+casefold collision. - Only after those path checks, parse
_paper-wiki-ocr-complete.json. Requireschema: paper-wiki/ocr-completion/v2,state: requires-batch-commit, a 32-lowercase-hexbatch_id,sourceexactly equal to the containing directory basename, andsource_pdfto be a safe basename. Requirecontent_fingerprint.schema: paper-wiki/ocr-content/v1, a nonemptyfileslist covering every regular single-link file under the source except the completion manifest itself, and atree_sha256. Each file record must contain exactly a safe relative POSIXpath, nonnegative integersize, and lowercase SHA-256. Paths must be unique after NFC+casefold.markdownmust be a nonempty, duplicate-free safe list exactly equal to the.mdsubset offiles. Recompute the tree digest from UTF-8-byte-sorted file records using the canonical bytespaper-wiki/ocr-content/v1\n, then for each recordpath_utf8 + NUL + decimal_size + NUL + lowercase_sha256 + LF. - Treat
batch_commit_markeronly as a basename matching_paper-wiki-ocr-batch-[0-9a-f]{32}.committed.json. Its named sibling underraw/<topic>/mineru/must pass the same regular/non-link/non-reparse/containment checks. Requireschema: paper-wiki/ocr-batch/v2,resolution: committed, the samebatch_id, and exactly one source record matching all manifest provenance fields:source,source_pdf,source_pdf_size,source_pdf_sha256, andsource_pdf_project_path, plus the completecontent_fingerprint. If the project path is non-null, it must be a safe project-relative path insideraw/<topic>/but outsidemineru/; re-open that regular non-link PDF, verify its basename, size, and SHA-256 against the manifest, and block on any change. A null path preserves external flat-staging compatibility but must be reported as "current PDF hash not revalidated". - Immediately before any OCR body is read, open each declared content file with
no-follow semantics, bind its pre-open
lstat, open-handlefstat, ancestor chain, and post-copy identity, and copy it into a new owner-only (0700directory, regular private files) snapshot while hashing. From those snapshot bytes require the exact declared file set, every size/SHA-256, and the canonicaltree_sha256. Read and compile only the verified private snapshot, never the original mutable path. Any legacy v1 manifest/batch or record missing the fingerprint is blocked; report that it needs re-OCR or an explicitly reviewed reseal operation. - Queue the source only after every check passes. An unsafe source tree, invalid
manifest, malformed/linked/mismatched/missing marker, unresolved pending batch,
or any aborted marker for that
batch_idis blocked and must be reported; never read its OCR body or compile it. - Course source: apply
WIKI.mdandwiki/exam-scope.md; do not compile material that is out of scope. - PDF without OCR/HTML/Markdown content: report that it needs OCR or a no-OCR source fetch before compilation.
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.
- 12d ago First seen · 183 lines · 22 tokens per session scan A 764567980399
wiki-compile is a command published in the GitHub repository Spark-To-Paper-Skills/paper-wiki (7 stars, last pushed 29d ago), licensed MIT. It adds 22 tokens to every session and 2,783 once invoked, about $0.0001 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 commands, from other repositories
contribute
Add a thought, source, or paste. Use --project/-p to target another project without switching current. Usage: /mb:contribute [-p ] [--mode daily|concept|daily+concept].
build
Rebuild context.md for a project from sources/. Usage: /mb:build [-p ] [project-id].
init
Scaffold a new MindBase project (v2 layout). Usage: /mb:init [template] [-- mission ...].
research
Deep research on a topic — web + existing wiki + synthesis → sources/research/. Usage: /mb:research [-p ].
new-project
Create a new project with template choice — interactive flow. Usage: /mb:new-project [template].
ask
Query the MindBase wiki — cited answer using hybrid search + graph expansion. Usage: /mb:ask [-p ] [--all-projects].