Case Retrieval logo

Case Retrieval

Community
vivy-yi
case-retrieval

案例检索——查找类似案例和相关判决,评估相似度,输出结构化检索报告。 适用情形:需要支撑法律论点/预判案件/撰写文书引用案例/了解司法实践趋势。 核心价值:GCL各场景的references/查询路径.md目前多为占位符,本skill提供完整方法论。 使用注意:本skill产出每一个案例都必须来自真实检索,严禁凭记忆生成。

Overview

Publishervivy-yi
RepositoryGreater-China-Legal
Skill namecase-retrieval
Stars
49
Forks
9
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by vivy-yi on GitHub. Read the source before you install it.

Installation

Install the Case Retrieval AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vivy-yi/Greater-China-Legal/tree/main/plugins/legal-management/case-retrieval
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vivy-yi/Greater-China-Legal.git /tmp/Greater-China-Legal
mkdir -p .claude/skills
cp -r /tmp/Greater-China-Legal/plugins/legal-management/case-retrieval .claude/skills/case-retrieval
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Case Retrieval in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Case Retrieval on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Case Retrieval is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/case-retrieval — 案例检索方法论

检索前准备

确定检索需求

来源一:从案件材料中提炼
  - 案由/纠纷类型
  - 核心法律关系
  - 主要争议焦点
  - 适用法律条文

来源二:从检索目的反推
  - 支撑论点:找支持己方的裁判先例
  - 预判风险:了解同类案件胜诉率
  - 反驳对方:找否定对方论点的案例
  - 填补空白:法律未明确规定时的司法态度

检索范围

时间范围:优先近三年(指导性案例除外)
地域范围:上级法院及本院 > 省市高院/中院近三年
案例层级:指导性案例 > 公报案例 > 典型案例 > 一般案例

检索方法

四种检索路径

路径适用场景方法
法条找案例法律适用明确在数据库找到目标法条,点击"引用本法条"的案例
案例找案例领域陌生先找种子案例→精读提取关键词→扩大检索
关键词检索最常用规范性关键词+非规范性关键词组合
主体找案例特定企业在当事人字段输入公司名,检索其所有判决

关键词提取

规范性关键词:法律概念/术语
  例:案由、罪名、自首、国家工作人员、非法占有目的

非规范性关键词:自然事实/通俗用语
  例:App、代持股、干股、逾期完工

提取方法:
1. 从法条中拆分(如《公司法》第63条→一人公司/股东/连带责任)
2. 从案件材料中提取行业术语
3. 从案件事实中归纳

类案相似度评估

相似度五维评估

维度权重评估内容
法律关系一致30%案由/当事人地位/权利义务结构/基础法律关系
争议焦点对应25%核心法律问题是否同一/涉及法条是否相同
关键事实相似25%要件事实是否类似/决定性情节是否一致
裁判规则参照15%裁判要旨是否形成明确可移植的规则
程序问题关联5%审理程序/举证责任/诉讼阶段是否相同

评估标准

高度相似:三个识别标志均高度一致
  - 事实识别:关键事实(要件事实)一致
  - 焦点识别:法律适用争议焦点相同
  - 法律识别:涉及相同法条/同一条文下的同一解释问题

低相似度(排除):
  - 案由根本不同
  - 核心争议焦点完全不同
  - 关键事实存在实质性差异

案例效力层级

第一层级:应当参照
  最高人民法院发布的指导性案例

第二层级:重要参考
  最高人民法院公报案例
  最高人民法院典型案例
  各省市高级人民法院典型案例

第三层级:参考
  中级人民法院典型案例
  基层人民法院示范案例

第四层级:研究参考
  一般生效裁判(注意:不具有约束力)

检索流程

步骤1:问题定性
  - 明确检索目的(支撑/反驳/预判/趋势)
  - 提炼3-5个检索关键词

步骤2:多路径检索
  - 路径A:法条找案例(明确法条时)
  - 路径B:关键词组合检索(最常用)
  - 路径C:案例找案例(陌生领域)

步骤3:初步筛选
  - 按效力层级排序
  - 过滤时间范围(优先近三年)
  - 排除明显不相关案例

步骤4:深度评估
  - 对每个候选案例执行五维评估
  - 计算综合相似度得分

步骤5:排序与输出
  - 按相似度降序排列
  - 输出结构化检索报告

输出格式

## 案例检索报告

### 检索需求
- 案件类型:[类型]
- 核心争议:[争议焦点]
- 检索目的:[支撑论点/预判风险/其他]

### 检索路径
- 主要路径:[路径]
- 关键词:[组合]

### 检索结果(按相似度排序)

#### 案例1:[案号] 🟢高度相似
- 法院:[法院]
- 案由:[案由]
- 裁判要旨:[核心裁判观点]
- 与本案相似度:🟢高(法律关系一致/争议焦点对应/关键事实相似)
- 引用法条:《X法》第X条
- 来源:[链接]
- 对本案的参考价值:[分析]

#### 案例2:[案号] 🟡中度相似
[同上格式]

#### 案例3:[案号] 🔴参考
[同上格式]

### 裁判规则总结

| 规则 | 来源案例 | 适用条件 |
|---|---|---|
| [规则1] | 案例1 | [条件] |
| [规则2] | 案例2 | [条件] |

### 风险提示
- [本案不同于案例X的关键点]
- [本案可能的不利裁判倾向]

### 置信度
🟢/🟡/🔴 — [说明]

工具调用约定

本skill产出的每一个案例都必须来自真实检索,严禁凭记忆生成。

若环境中存在案例库工具(如北大法宝MCP):
→ 必须将检索词交给该工具,以返回的真实结果作为唯一数据来源

若环境中不存在案例库工具:
→ 完成检索式设计,但涉及具体案例处标注 [待检索]
→ 报告中明确说明"未接入案例库,以下检索式需人工执行"
→ 绝不编造案号、当事人或裁判要旨

各场景调用场景

场景调用时机检索重点
litigation-support论证某一裁判规则时类案胜诉率/裁判趋势
contract-review评估条款风险时合同效力裁判规则
labor-arbitration劳动关系认定有争议时劳动争议典型案例
tax-compliance税务处理不确定时税务稽查裁判案例
IP-infringement侵权认定有争议时知识产权侵权典型案例

引用说明

本skill方法论来自 THUYRan/Legal-Skills-Chinese/case-retrieval, THUYRan原版27000字,GCL精简至约200行,保留核心检索流程和相似度评估框架。

Frequently asked questions

What does the Case Retrieval AI skill do?

案例检索——查找类似案例和相关判决,评估相似度,输出结构化检索报告。 适用情形:需要支撑法律论点/预判案件/撰写文书引用案例/了解司法实践趋势。 核心价值:GCL各场景的references/查询路径.md目前多为占位符,本skill提供完整方法论。 使用注意:本skill产出每一个案例都必须来自真实检索,严禁凭记忆生成。

Why use Case Retrieval on TypingMind?

Because you install it once and use it with any model. Case Retrieval is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Case Retrieval in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vivy-yi/Greater-China-Legal/tree/main/plugins/legal-management/case-retrieval. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Case Retrieval?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Case Retrieval?

As many as you like. As long as a model supports skills, you can use Case Retrieval with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Case Retrieval AI skill free?

It is published on GitHub by vivy-yi. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇