problem-index

Manage a Korean law problem index with lecture-based queries, PDF extraction, and issue frequency analysis.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, and includes scripts (resource) components.

What problem does it solve? Korean law study materials (DT multiple-choice PDFs, case problems, textbook extracts) are scattered across directories, making it hard to find problems matching a specific lecture or track which legal issues appear most often. This Skill maintains a central problem_index.json so problems can be queried, scanned, repaired, and analyzed consistently. ## Core Features & Use Cases - Lecture-Based Problem Query: Retrieve all problems (dt, case, textbook) mapped to a given lecture number and subject, with optional JSON output for downstream pipelines. - Index Scanning and Repair: Scan directories for new problem files, remap legacy file paths to the current workspace, prune duplicate legacy case entries, and log unresolved paths. - Textbook Problem Extraction: Scan textbook markdown extracts for embedded problem candidates using signal scoring, then register approved candidates into the index. - Issue Frequency Analysis: Aggregate question_text across the index to rank legal issues (민법, 형법, 헌법) by frequency, producing issue_frequency.json for other study-note skills. - Use Case: Before a study session on lecture 10 of civil law, run the query script to list every DT and case problem for that lecture, then check issue_frequency.json to prioritize the highest-frequency issues. ## Quick Start Ask the AI to query the problem index for lecture 10 problems in civil law and show which issues appear most frequently.

Frequently Asked Questions about problem-index

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

FAQPage Schema
How do I query problems by lecture number from a JSON index?▼

Run query_problems.py with --lecture and optionally --subject to filter problems mapped to that lecture in problem_index.json. Add --json to get structured output suitable for downstream pipelines.

How to extract questions and answers from Korean law PDF files?▼

Use extract_problems.py with the PDF path; it uses pypdf to pull page text and regex patterns to detect O/X and multiple-choice questions with their answers. Use --update-index to register results directly into problem_index.json or --dry-run to preview.

How do I fix broken file paths in a problem index after moving files?▼

Run repair_problem_index.py, which remaps legacy file and answer_source paths to the current workspace and writes unresolved entries to problem_index_unresolved.json. Use --dry-run first to review changes without writing.

Can the index track which legal issues appear most frequently?▼

Yes, extract_issues.py scans question_text across the index and matches subject-specific regex patterns for civil, criminal, and constitutional law issues. Results are ranked by frequency and saved to issue_frequency.json.

What are the limitations of automatic textbook problem scanning?▼

The scanner relies on signal scoring from headings, question markers, and choice symbols, so low-confidence candidates are discarded and topic mapping may fail without alignment data. Candidates default to dry-run registration and require --apply plus manual review before entering the index.