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 kitchen-engineer42/joharnessburg --skill knowledge-rewritegit clone --depth 1 https://github.com/kitchen-engineer42/joharnessburgWrote 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/kitchen-engineer42/joharnessburg/knowledge-rewrite)<a href="https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/knowledge-rewrite"><img src="https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/knowledge-rewrite.svg" alt="Measured on agentmods" 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.00079 | $0.01740 |
| Opus 5 | $0.00039 | $0.00870 |
| Sonnet 5 | $0.00016 | $0.00348 |
| Haiku 4.5 | $0.00008 | $0.00174 |
Grade A, and why
knowledge-rewrite 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 7d 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
knowledge-rewrite
Extraction is fan-out; rewrite is consolidation. The raw event log from [[knowledge-extraction]] has redundancies, near-duplicates, missing cross-references, inconsistent terminology, and entries that don't yet have the header+body split. Rewrite fixes all of that and produces the entries [[packaging]] will emit.
Three jobs
- Header + body progressive disclosure — every entry gets a one-line header (description + classification + cross-refs) and a full body. The header is what loads cheap; the body is what loads on demand.
- Cross-linking — entries reference each other; shared vocabulary lives in a glossary; relationships are typed where the schema supports it.
- Dedup — two-tier (cheap quick-scan + expensive deep-read) to remove duplicates without false positives or false negatives.
Where the work happens
- Inputs:
<project>/.john/checkpoints/extract/state.json(from [[event-log-and-reducer]]) - Working state:
<project>/.john/knowledge/<entry-id>/{header.md, body.md}(per-entry directory) - Outputs: cleaned knowledge directory ready for [[packaging]]; an updated
<project>/.john/checkpoints/rewrite/state.jsonrecording what was merged, dropped, or cross-linked.
Header + body — what goes where
Why this matters at scale. At 1000+ entries, loading all bodies into a context consumes 2M+ tokens — impossible. Loading all headers is more like 4K tokens — easy. The header+body split is what makes large knowledge bases work at all; it's not an optimization, it's the only way. It's one of the strengths of the knowledge pipeline worth preserving universally.
Header is the entry's "first impression." Pinned in indexes, included in cross-link contexts, cheap to load. Includes:
- One-line description (what this entry says in 20 words or less)
- Classification (e.g., "factual" / "relational" / "skill" — depends on schema)
- Cross-refs (
related_to,depends_on, etc., per schema) - Source pointer (chunk_id or source_ref)
What ships with it
3 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.
- 7d ago First seen · 106 lines · 79 tokens per session scan A b90bbbcd5847
knowledge-rewrite is a skill published in the GitHub repository kitchen-engineer42/joharnessburg (9 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 1,740 once invoked, about $0.0004 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
text-stats
Compute word count, character count, or reading time for a piece of text using the in-bundle text-stats engine. Invoke whenever the user asks how long a passage is, how many words or characters it has, or how long it takes to read.
book-capture
Capture book pages from Mac Kindle, Apple Books, Kindle Cloud Reader, PDF files, or photos of a physical book, then OCR and generate structured Obsidian Markdown. Activates when user mentions capturing a book, Kindle screenshots, Apple Books capture, book OCR, book-to-markdown conversion, photographing a paper book…
wise-markitdown
File-to-markdown text extraction via Microsoft's markitdown CLI — the ONE tool to reach for whenever text/content must be extracted from a binary or structured file: PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx/.xls), images (EXIF metadata), audio (metadata + transcription), HTML, CSV/JSON/XML, ZIP archives…
research-capture
The durable research-evidence-trail discipline. At a deep-research-bearing research-first gate, persist the FULL claim-level trail (verified ∧ REFUTED) as - .md at the configured governance.researchpath (defaults to .foundry/research/) from the research-artifact template, and author the ADR at the configured…
md-to-pdf
Convert Markdown to PDF via reportlab or weasyprint engines. Triggers - pdf, md to pdf, markdown to pdf, generate pdf.
especialista-em-documentos
Especialista em Documentos. Use para criar, editar, converter e estruturar arquivos .md, .doc e .docx: estilos, sumário, seções, tabelas e templates. Palavras-chave: documento, Word, docx, markdown, doc, modelo, formatação.