auto-index

Extract statutes, cases, and keywords from Markdown notes into a tag index.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually tracking which legal articles, court precedents, and keywords appear across dozens of Korean law study notes is error-prone and time-consuming. This Skill automates the extraction and indexing of legal references from Markdown files into a centralized tag_index.json, and keeps Obsidian-style wiki links, footnotes, and backlinks consistent across the vault. ## Core Features & Use Cases - Automatic Tag Extraction: Parses Markdown files for statute patterns (제XXX조), case citations (대법원 YYYY.M.D, XX다XXXX), bolded legal keywords, and section headers, then updates a reverse-lookup index. - Note Enrichment: Injects [[wiki-style links]] into note bodies based on indexed keywords while protecting existing links, code blocks, and YAML frontmatter. - Vault Auditing: Detects orphan footnote references and definitions, suggests backlink candidates between midterm and final exam notes, and reports broken wiki links. - Use Case: After transcribing a civil law lecture into part12.md, run the indexer to register all cited articles and keywords, then query the index to find every part that discusses 제126조 or 표현대리. ## Quick Start Ask the AI to run the auto-index update script on a completed Markdown lecture note so its statutes, cases, and keywords are added to tag_index.json.

Frequently Asked Questions about auto-index

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

FAQPage Schema
How do I automatically index keywords from Markdown notes?▼

Run the update_index.py script with a Markdown file or folder path. It extracts statute numbers, case citations, and bolded keywords using regex patterns, then writes them into a tag_index.json file with reverse lookups from each tag to its source files.

How to add wiki links to Obsidian notes automatically?▼

Use the enrich_note.py script, which matches indexed keywords against note text and converts matches into [[wiki-style links]]. It protects existing links, code blocks, and YAML frontmatter, and only links the first occurrence of each keyword to avoid over-linking.

Can I search which notes mention a specific statute or keyword?▼

Yes, the query_index.py script supports lookups by article number, keyword, or source file. For example, querying article 126조 returns every indexed part that cites it, and a source query lists all articles, keywords, and cases found in that file.

Does the link injection work with Korean text?▼

Yes, the extraction patterns are designed for Korean legal text, matching Hangul keywords in bold markers, statute formats like 제126조, and case numbers like 2018다40231. Keywords shorter than two characters are filtered to reduce noise.

What are the limitations of regex-based note indexing?▼

Regex extraction can miss citations written in non-standard formats and may produce false positives from common bolded words. The scripts also depend on hardcoded vault paths, so they require path adjustments when the folder structure changes.