Legalize kr
Use this skill when working with Legalize-KR public Korean legal data, including laws, court precedents, administrative rules, and local ordinances. It guides agents to choose between legalize-cli, the local stdio legalize MCP server, git clone workflows, and direct GitHub access for search, retrieval, article lookup, revision history, bulk analysis, offline work, and LLM context building.From its SKILL.md
npx -y skills add legalize-kr/agent-skills --skill legalize-krAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
4 things to look at
- reads credentialsReads from 1 credential source: `GITHUB_TOKEN`.
- 11 stars11 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 8 commands, including `python3 skills/legalize-kr/scripts/select_access_mode.py --task search --scope all` and 7 more.
- fetches URLsInstructs the agent to fetch 1 URL, including https://legalize.kr/llms.txt.
SKILL.md
5.5 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
Legalize-KR Data
Use Legalize-KR as a public Markdown/Git mirror of Korean legal data. The core datasets are:
- Laws:
legalize-kr/legalize-kr - Court precedents:
legalize-kr/precedent-kr - Administrative rules:
legalize-kr/admrule-kr - Local ordinances:
legalize-kr/ordinance-kr
Treat the data as legal source material, not legal advice. When answering a user, state the dataset, date basis, and access method used whenever those affect correctness.
Workflow
-
Classify the request:
- Dataset: laws, precedents, administrative rules, ordinances, or all.
- Operation: list, search, fetch full text, fetch one law article, compare revisions, inspect history, bulk analyze, or configure agent access.
- Freshness: current remote data, a specific date, a local clone, or cached/offline data.
-
Choose the access method:
- Prefer
legalize-clifor shell-based one-off lookup, JSON output, and no-clone workflows. - Prefer local stdio MCP tools when the user is configuring or using an MCP-capable agent that can run local commands.
- Prefer
git clonefor large grep/search, history/diff work, reproducible offline analysis, or direct Markdown inspection. - Use direct GitHub/raw URLs only when the target path is already known and installing tools or cloning would be excessive.
If the best path is unclear, run:
python3 skills/legalize-kr/scripts/select_access_mode.py --task search --scope all - Prefer
-
Use the selected method with a narrow query first, then broaden only if needed. Avoid dumping whole repositories into context.
-
If docs conflict, prefer the current target repository README or current tree over compact summaries.
https://legalize.kr/llms.txtis useful LLM context, but it may be a summary and may lag detailed repo docs or newer CLI/MCP support.
CLI Quick Reference
Install:
pipx install legalize-cli
pipx install 'legalize-cli[mcp]'
uvx legalize-cli laws list --json
uvx --from legalize-cli[mcp] legalize-mcp
Set a token for GitHub API rate limits when doing repeated or code-search work:
export GITHUB_TOKEN=$(gh auth token)
legalize auth status --json
Common commands:
legalize laws list --category 법률 --json
legalize laws get 민법 --date 2015-06-01 --json
legalize laws article 민법 제839조의2 --date 2015-06-01 --json
legalize laws diff 민법 민법 --date-a 2015-01-01 --date-b 2024-01-01 --mode article --json
legalize precedents list --court 대법원 --type 민사 --json
legalize precedents get "2022다12345" --json
legalize admrules list --agency 행정안전부 --type 고시 --json
legalize admrules get "공공데이터 관리지침" --agency 행정안전부 --type 고시 --json
legalize ordinances list --jurisdiction 서울특별시 --type 조례 --json
legalize ordinances get "서울특별시 테스트 조례" --jurisdiction 서울특별시 --type 조례 --json
legalize search "부동산 점유취득시효" --in all --json
Use --json for agent-readable output. Use --offline only when the needed data is already cached.
MCP Quick Reference
Install MCP support:
pipx install 'legalize-cli[mcp]'
legalize-mcp
Register a local stdio server in MCP clients. Use uvx when the package should run without a permanent install:
{
"mcpServers": {
"legalize-kr": {
"command": "uvx",
"args": ["--from", "legalize-cli[mcp]", "legalize-mcp"]
}
}
}
Use an already installed legalize-mcp command when legalize-cli[mcp] was installed with pipx or pip:
{
"mcpServers": {
"legalize-kr": {
"command": "legalize-mcp",
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Current tool surface in legalize-cli includes:
laws_list,laws_get,laws_articleprecedents_list,precedents_getadmrules_list,admrules_getordinances_list,ordinances_getsearch
Prefer MCP when a user asks an agent to answer legal-data questions conversationally and the host can run local stdio MCP servers. If the host cannot run tools, use the skill as guidance and cite the GitHub dataset paths or direct URLs used.
Git Clone Quick Reference
Clone only the dataset needed:
git clone https://github.com/legalize-kr/legalize-kr.git
git clone https://github.com/legalize-kr/precedent-kr.git
git clone https://github.com/legalize-kr/admrule-kr.git
git clone https://github.com/legalize-kr/ordinance-kr.git
Examples:
cat legalize-kr/kr/민법/법률.md
git -C legalize-kr log -- kr/민법/
rg "개인정보" legalize-kr/kr
rg "사실혼" precedent-kr/가사
rg "공공데이터" admrule-kr/행정안전부
rg "공공시설" ordinance-kr/서울특별시
The data repositories may be force-pushed after pipeline improvements. Do not rely on commit SHA stability for durable citations; cite repository path plus frontmatter dates or domain identifiers where possible.
References
- Read
references/access-options.mdwhen choosing between CLI, MCP, git clone, and direct GitHub access. - Read
references/data-layout.mdwhen constructing repository paths, interpreting frontmatter, or explaining data model details.
What ships with it: 4 files
13.7 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml244 B
references/
- access-options.md4.2 KB
- data-layout.md4.6 KB
scripts/
- select_access_mode.pyruns4.7 KB
Gives 0 of the 12 instructions most mcp tooling skills give in ~1.4k tokens
Counted across 780 of the 1,136 authors here whose files we hold, read 2026-09-06
- Use Zod for input validationin 34 of 780, across 21 files
- Use stdio for local clientsin 27 of 780, across 10 files
- Restart Claude Code after configurationin 26 of 780, across 23 files
- Verify MCP server connection before using toolsin 23 of 780, across 17 files
- Define input schemas for every toolin 20 of 780, across 11 files
- Use Streamable HTTP for remote clientsin 18 of 780, across 8 files
- Pin SDK version in package.jsonin 17 of 780, across 6 files
- Keep server logic independent of transportin 16 of 780, across 6 files
- Verify SDK methods against official documentationin 15 of 780, across 5 files
- Format evaluation results as an XML filein 15 of 780, across 12 files
- Test servers using the MCP Inspectorin 15 of 780, across 14 files
- Create ten complex and independent evaluation questionsin 14 of 780, across 11 files
Said here and by no other author read
- Classify request by dataset, operation, and freshness
- Prefer legalize-cli for shell-based lookups
- Use local stdio MCP for conversational agents
- Use git clone for large grep or history analysis
- State dataset and access method in responses
- Prefer repository README over compact summaries
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.