Agent skill

Yuandian Law Search

by cat-xierluo in cat-xierluo/legal-skills

元典法律检索与精选报告。查询中国法律法规、案例或围绕案件争点查找依据时使用;优先直接调用可用的元典 MCP,无 MCP 时使用 API。轻量理解问题、筛除不适用候选,按需生成可追溯报告。不要用于替代完整证据审查、诉讼方案或正式法律意见。

MITAuto-check: notes

Install Yuandian Law Search

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill yuandian-law-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills yuandian-law-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/yuandian-law-search .claude/skills/yuandian-law-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yuandian-law-search
GitHub stars
720
Token cost
~882 tokens
SKILL.md length
158 words
Files
68 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

元典法律检索与精选报告。查询中国法律法规、案例或围绕案件争点查找依据时使用;优先直接调用可用的元典 MCP,无 MCP 时使用 API。轻量理解问题、筛除不适用候选,按需生成可追溯报告。不要用于替代完整证据审查、诉讼方案或正式法律意见。

  • Works in 3 steps: 定位问题:从已有上下文识别“要判断什么、哪一项事实会改变适用”。有现成分析报告时只… → 调用一次合适的工具:有元典 MCP 就按工具实际 schema… → 筛选并回答:核对适用范围、关键事实、时点、原文支持和来源;只解释有用的依据。已有结…
  • Tasks that involve MCP servers
  • SKILL.md covers 默认路径, 轻量法律判断, 何时追加检索 and 结果质量与交付, plus 2 more sections
  • Calls brew and apt-get; needs YD_API_KEY

What it does

Yuandian Law Search is an agent skill from cat-xierluo/legal-skills. 元典法律检索与精选报告。查询中国法律法规、案例或围绕案件争点查找依据时使用;优先直接调用可用的元典 MCP,无 MCP 时使用 API。轻量理解问题、筛除不适用候选,按需生成可追溯报告。不要用于替代完整证据审查、诉讼方案或正式法律意见。

Its SKILL.md is about 880 tokens, which your agent loads only when the skill is triggered. The skill folder holds 68 other files, including scripts and reference files (for example `CHANGELOG.md`, `README.md` and `endpoints/01-law-vector-search.md`).

It works with Model Context Protocol. The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/yuandian-law-search”

Requirements

  • Python 3
  • A credential in YD_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 定位问题:从已有上下文识别“要判断什么、哪一项事实会改变适用”。有现成分析报告时只读相关争点,不重复全案分析。明确法名条号或案号直接查详情;即使附带案件事实,单争点也默认轻量处理。
  2. 调用一次合适的工具:有元典 MCP 就按工具实际 schema 直接调用,不要求本地 Key、CLI、研究计划 JSON 或归档。无 MCP/用户要求 API 时才读 API 入口。首轮不是“试检后必有正式检索”,能回答即完成。
  3. 筛选并回答:核对适用范围、关键事实、时点、原文支持和来源;只解释有用的依据。已有结果足够则停止。

What it can do on your machine

Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • brew
    • apt-get

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • YD_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yuandian Law Search loads about 882 tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 35 tokens; SKILL.md has 158 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~882
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:77
    敏。原始文书、客户材料、Key 和归档不提交公开仓库。不要输出 `scripts/.env` 内容或把 Key 写入命令。
  • NoteRuns commands with sudoSKILL.md:85
    脚本) | macOS:`brew install python`;Linux:`sudo apt-get install python3` |
  • NoteMentions a .env fileSKILL.md:87
    需要 API 时从环境变量 `YD_API_KEY` 或 `scripts/.env` 读取 Key,缺失时按 [API 入口](references/09-api-usage.md) 提示配置;不因 Key 缺失阻止使用现成 MCP 或整

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 158 words, ~882 tokens.

Download SKILL.mdSave it as .claude/skills/yuandian-law-search/SKILL.md (or your agent's skills folder). This skill also uses 67 other files; get the full folder from GitHub.
name
yuandian-law-search
description
元典法律检索与精选报告。查询中国法律法规、案例或围绕案件争点查找依据时使用;优先直接调用可用的元典 MCP,无 MCP 时使用 API。轻量理解问题、筛除不适用候选,按需生成可追溯报告。不要用于替代完整证据审查、诉讼方案或正式法律意见。
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
1.10.0
license
MIT

元典法律检索

把中间层用于两件事:把问题问准,把返回材料选准。普通检索直接执行;不要把思维模型变成每次必填的表格。

默认路径

  1. 定位问题:从已有上下文识别“要判断什么、哪一项事实会改变适用”。有现成分析报告时只读相关争点,不重复全案分析。明确法名条号或案号直接查详情;即使附带案件事实,单争点也默认轻量处理。
  2. 调用一次合适的工具:有元典 MCP 就按工具实际 schema 直接调用,不要求本地 Key、CLI、研究计划 JSON 或归档。无 MCP/用户要求 API 时才读 API 入口。首轮不是“试检后必有正式检索”,能回答即完成。
  3. 筛选并回答:核对适用范围、关键事实、时点、原文支持和来源;只解释有用的依据。已有结果足够则停止。

普通对话不生成 research-plan.json、selected-sources.json,不运行合同校验,不强制拉详情、不自动语义加关键词双查。不要为凑正反两面另发请求:一次返回可以同时包含支持和反向材料。

参数与预算
  • 使用当前 MCP schema/API 的默认值;仅在具体需要时显式设置过滤、改写或数量。不要把 CLI 参数名直接塞入 MCP 参数。
  • YD_STRATEGY=aggressive/balanced/economical 是历史兼容配置,不再指挥法律检索,也不再改变 CLI 检索参数。不要先读取策略、更改用户配置或批量执行旧流程。
  • 默认值不等于少返回:元典语义接口可能召回几十条。候选量不是报告篇幅;不逐条重写摘要,不把整个响应复述给用户。若上下文已明显拥挤,可按实际需要显式限制下一次候选数,说明这不是服务端默认。
  • 调用会消耗平台积分;在用户授权的检索范围和预算内执行,不每次重复索要许可。扩大问题范围、批量核验、企业调查、幻觉检测或费用超出已有授权时再确认。无预算约定时不自行批量调用。

轻量法律判断

只保留能改变检索或选材的判断,不要求展示内部推理全过程:

  • 问题:请求或抗辩是什么,而不只是案由名称。
  • 关键前提:主体、客体、行为、履行顺序/时间中哪些会影响规则适用。未知事实不填成已查明;只有会改变路线时才补问,否则标注假设推进。
  • 适用检查:材料能支持哪一点,缺哪项事实,是否只是同主题近邻。

例如“提前退租能否没收保证金”,需要区分普通房屋租赁与融资租赁,并将“保证金是否构成违约金”作为待验证问题,不能预先认定。房屋过户与尾款问题,要比较同时履行还是先后履行;客户名单纠纷要看信息内容、保密措施及使用行为,不能只看“员工离职”。

涵摄是判断方式,不是固定输出工序。 只有多争点相互牵制、决定性依据冲突、用户明确要求深度案件研究/完整检索计划时,才按需加载 深度研究。不得仅因有案件事实或代理立场就升级。

何时追加检索

先指出首轮尚未解决的缺口,再选择一个对应动作:

观察到的问题有必要时的下一步
已知法名条号/案号,需要确定文本精确详情;已有完整可核对文本则不重复取
结果混入近邻案型补关键事实、换表达或使用该接口支持的过滤
语义结果主题对,但履行顺序/裁判命题不对用已经发现的裁判用语做关键词/字段复检
零命中检查参数、缩短过窄表达或换检索方式;不宣称“无类案”
返回文本不足以支撑拟引用结论只核验准备采用的来源;取得不到就披露未核实
缺的是案件事实或证据提示补充,不用更多查询代替补证

已解决用户问题、没有新有效材料、或下一步超预算时停止并说明边界。关键词技巧和场景示例仅在需要时读 查询修正、检索示例。

结果质量与交付

  • 后端分数只反映检索排序,不代表法律适用性、权威性或核验通过。
  • 核对规范对象、效力层级、施行时点和案涉时间。典型案例是案例,不是法律条文;行业指引不是司法解释。“现行有效”也不等于适用本案。
  • 历史法源不当然无用:旧事实可能需要旧法;不得仅因有新法就替换,也不得无时间适用说明直接采用。现有报告脚本暂不接受历史法源作 core;遇此情形披露限制,不把它伪标 current 来过门禁。
  • 类案比较决定性事实与法院实际裁判理由,区分当事人主张、法院判断和平台整理。元典案例语义结果可能是整理内容,不自动等于裁判文书逐字全文;不要称已经“原文全文核验”。
  • 默认对话交付:先答问题,再给少量精选依据、适用前提和未解决点。没有必要就不追加案例、不填满12条上限。
  • 用户要求报告/落盘时才读 报告生成 与 精选来源合同。普通报告用 focused 轻量记录,深度报告兼容原完整合同。完整召回不得复制进正文。
  • 正式报告仍需来源核验、相关性说明、分组排序及引用追溯。程序只检查结构和声明,不会自动证明 Agent 的法律判断正确。

MCP、API 与数据留存

MCP 连接配置/可选归档见 MCP 指南。不要为归档把整份工具响应重新手写成 JSON;有文件再用 ingest --input,没有则保留工具调用和来源链接即可。

CLI 默认写 archive/ 原始 JSON、per-call Markdown,通常另写工作目录副本;这些是候选底稿,不是正式报告。普通 API 检索优先加 --no-report 避免底稿冒充交付。

  • --no-report:不写 Markdown,仍写 archive JSON。
  • --no-cwd-report:仅不写工作目录 Markdown。
  • --no-archive:关闭全部检索留存;仍读取已有缓存,新查询不再入缓存,后续可能重复扣费。此开关不代替用户明确发起的 consolidate 报告写入。
  • --archive-dir/YD_ARCHIVE_DIR:重定向归档。归档失败只告警,不吞响应、不自动重试。

请求发送至 open.chineselaw.com,来源链接可能位于 ydzk.chineselaw.com;用最少必要事实,先脱敏。原始文书、客户材料、Key 和归档不提交公开仓库。不要输出 scripts/.env 内容或把 Key 写入命令。

依赖

MCP 路径只需客户端已配置元典工具,无本地 Python 或 API Key 前置要求。API/归档/报告脚本使用 Python 3 标准库,无第三方 Python 包。

依赖安装方式
Python 3(仅本地脚本)macOS:brew install python;Linux:sudo apt-get install python3

需要 API 时从环境变量 YD_API_KEY 或 scripts/.env 读取 Key,缺失时按 API 入口 提示配置;不因 Key 缺失阻止使用现成 MCP 或整理已有结果。

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 67 other files (scripts, references) in skills/yuandian-law-search of cat-xierluo/legal-skills.

  • SKILL.md
  • .gitignore
  • CHANGELOG.md
  • LICENSE.txt
  • README.md
  • endpoints/01-law-vector-search.md
  • endpoints/02-law-keyword-search.md
  • endpoints/03-law-detail.md
  • endpoints/04-case-semantic-search.md
  • endpoints/05-case-keyword-search.md
  • endpoints/06-case-keyword-search-authority.md
  • endpoints/07-case-detail.md
  • endpoints/08-regulation-search.md
  • endpoints/09-regulation-detail.md
  • endpoints/10-enterprise-search.md
  • endpoints/11-enterprise-detail.md
  • endpoints/12-hall-detect.md
  • endpoints/13-enterprise-search-lightweight.md
  • endpoints/14-enterprise-base-info.md
  • endpoints/15-enterprise-aggregation-summary.md
  • … and 48 more

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Yuandian Law Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yuandian Law Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yuandian Law Search this skillcat-xierluo/legal-skills720—~882Automated safety check: NotesMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
MCP Developmentcoollabsio/coolify63k1 repos~949Automated safety check: PassMIT
Analyze Logsactivepieces/activepieces25k1 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed
  • Analyze Logs

    activepieces/activepieces

    Analyze application logs from the .evlog/logs/ directory. An agent skill from activepieces/activepieces.

    25k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Composio

    ComposioHQ/composio

    Route and complete Composio work across Composio For You and Composio Platform.

    30k GitHub starsUsed in 1 repo~1.7k tokens
    Productivity & AutomationAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    721 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    721 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    721 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    721 GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    721 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    721 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about Yuandian Law Search

What does Yuandian Law Search do?

元典法律检索与精选报告。查询中国法律法规、案例或围绕案件争点查找依据时使用;优先直接调用可用的元典 MCP,无 MCP 时使用 API。轻量理解问题、筛除不适用候选,按需生成可追溯报告。不要用于替代完整证据审查、诉讼方案或正式法律意见。. Yuandian Law Search is an agent skill from cat-xierluo/legal-skills.

When should I use Yuandian Law Search?

Yuandian Law Search fits situations like: tasks that involve MCP servers.

How do I install Yuandian Law Search in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill yuandian-law-search -a claude-code`. Or copy the skill folder (skills/yuandian-law-search in cat-xierluo/legal-skills) into .claude/skills/yuandian-law-search in your project. Claude Code loads it when a task matches its description.

How do I install Yuandian Law Search in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill yuandian-law-search -a codex`. Or copy the skill folder (skills/yuandian-law-search in cat-xierluo/legal-skills) into .agents/skills/yuandian-law-search in your project. Codex loads it when a task matches its description.

Can I use Yuandian Law Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill yuandian-law-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yuandian-law-search, .gemini/skills/yuandian-law-search, .github/skills/yuandian-law-search and .opencode/skills/yuandian-law-search in your project.

What does Yuandian Law Search need to run?

Going by SKILL.md and its folder, Yuandian Law Search needs the command-line tools its instructions call (brew and apt-get) and credentials named YD_API_KEY. Our summary lists: Python 3; A credential in YD_API_KEY.

Does Yuandian Law Search access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Yuandian Law Search safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Yuandian Law Search use?

Yuandian Law Search is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yuandian Law Search use?

About 882 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Yuandian Law Search?

Skills that share tags, products or a category with Yuandian Law Search: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and MCP Development (coollabsio/coolify, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yuandian Law Search?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.