textbook-reflow

Restructures OCR-extracted Korean law textbook markdown into Obsidian-optimized layouts.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/kmjy98-sketch/khulaw --skill textbook-reflow-kmjy98-sketch
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: textbook-reflow
Source: https://github.com/kmjy98-sketch/khulaw/tree/main/.agent/skills/textbook-reflow
Command: npx skills add https://github.com/kmjy98-sketch/khulaw --skill textbook-reflow-kmjy98-sketch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? OCR and PDF extraction pipelines produce messy markdown with broken sentences, page headers, and flattened hierarchies that render poorly in Obsidian. This Skill reflows that raw output into a clean, logically structured document without altering legal citations. ## Core Features & Use Cases - Noise Removal and Rejoining: Strips repeated page headers/footers, stray page comments, and OCR spacing errors, then rejoins sentences split across page breaks. - Legal Structure Visualization: Converts inline enumerations into markdown lists, rebuilds scholarly debates as comparison tables, and isolates statutes and precedents in Obsidian callouts like [!조문] and [!판례]. - Integrity Verification: Counts statute and case citation identifiers before and after reflow to guarantee nothing was dropped, and preserves YAML frontmatter byte-for-byte. - Use Case: After running pdf-ingest on a civil law textbook chapter, ask for a reflow to get a study-ready Obsidian note with heading hierarchy, precedent callouts, and theory comparison tables. ## Quick Start Reflow the attached OCR-extracted civil law textbook markdown into an Obsidian-optimized structure while preserving all case and statute citations.

Frequently Asked Questions about textbook-reflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up OCR-extracted markdown for Obsidian?▼

Run a reflow pass that removes repeated page headers and footers, fixes OCR spacing errors, rejoins sentences split across pages, and applies heading levels, lists, and callouts. This Skill performs exactly that workflow for Korean law textbooks.

How to format legal statutes and case citations in Obsidian notes?▼

Wrap statutes in a custom [!조문] callout and precedents in a [!판례] callout so they render separately from body text. Scholarly debates can be rebuilt as markdown tables comparing positions, reasoning, and holdings.

Does reflow modify case numbers or statute text?▼

No. Case numbers and statute identifiers are strictly preserved, and the Skill forbids guessing or filling in OCR-damaged citations from external knowledge. It verifies citation counts before and after editing to confirm nothing was lost.

What input does the textbook reflow process expect?▼

It expects markdown produced by OCR or PDF extraction tools such as pypdf or easyocr, typically from the pdf-ingest pipeline. The document should contain its original YAML frontmatter, which is preserved byte-for-byte.

Why does OCR markdown render poorly in Obsidian?▼

OCR output contains page-break artifacts, inline numbering, flattened headings, and mixed statute text that Obsidian renders as dense unreadable paragraphs. Reflow restores logical hierarchy and visual separation so the note is usable for study.