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 chunkinggit 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/chunking)<a href="https://agentmods.dev/skills/kitchen-engineer42/joharnessburg/chunking"><img src="https://agentmods.dev/badge/skills/kitchen-engineer42/joharnessburg/chunking.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.00090 | $0.01385 |
| Opus 5 | $0.00045 | $0.00692 |
| Sonnet 5 | $0.00018 | $0.00277 |
| Haiku 4.5 | $0.00009 | $0.00138 |
Grade A, and why
chunking 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 8d 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
chunking
Parsed markdown is rarely the right unit for downstream extraction — too big to fit one extractor's context, too coarse to fan out subagents over. Chunking turns parsed output into a tree of progressively-disclosed pieces the extraction phase can sweep.
Where the work happens
- Inputs:
<project>/.john/parsed/*/doc.md(from [[parsing]]) - Outputs:
<project>/.john/chunks/<chunk-id>.md+<project>/.john/chunks/chunks_index.json(master map) - Each chunk has YAML frontmatter (chunk_id, parent_id, source_doc, char_count, header_path) + body markdown.
The onion decision lives in phase-design
The peeler-vs-wrapper-vs-hybrid decision is made at phase-design time, not chunking time — see [[phase-design]] for the rubric and the decision criteria. By the time this skill runs, PLAN.md's chunk phase already specifies which mode applies (and for hybrid corpora, the per-section mode). Read PLAN.md's chunk phase; execute what it says.
Brief mode reminders so you don't have to context-switch:
- Peeler: long doc → tree of pieces via header hierarchy. Default for textbooks, regulations, long articles.
- Wrapper: many short files → assembled tree. Default for corpora arriving as folders of small files.
- Hybrid: peel the long ones, wrap the short ones, merge their trees at a shared root.
The peeler algorithm
- Read the parsed
doc.md. - Extract the header hierarchy (H1/H2/H3...) with line numbers.
- Walk top-down, splitting at the highest-level boundary that produces chunks within the token budget. Don't pre-decide a level; let content drive it.
- If a section is still too large after H1/H2/H3 splits, fall back to LLM-wedge chunking (see
references/llm-wedge-chunker.md): ask an LLM to suggest cut points within the running window, fuzzy-match the suggestions back to the source via Levenshtein, slide forward. - Emit each chunk with frontmatter linking parent/source. Build
chunks_index.jsonas a tree.
Tunable: MAX_TOKEN_LENGTH per chunk. Default ~100K tokens (large; we want bigger chunks where possible — "bigger chunks > smaller chunks. Only chunk when necessary, never over-chunk" per the predecessor's pipeline spec). Drop if the extraction phase struggles.
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.
- 8d ago First seen · 89 lines · 90 tokens per session scan A 29703c3ec035
chunking is a skill published in the GitHub repository kitchen-engineer42/joharnessburg (9 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 1,385 once invoked, about $0.0005 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.