Legal Element Extraction logo

Legal Element Extraction

Community
vivy-yi
legal-element-extraction

法律要素提取——从非结构化叙述中提取法律事实。 适用情形:用户提供了案件描述/聊天记录/当事人陈述等非结构化内容,需要先提取法律事实再进入后续分析。 核心价值:将"他一直拖着不还"这类生活语言,转化为"债务履行期限届满后未履行"的法律语言。 是所有场景的输入预处理skill——任何场景skill收到非结构化输入时,应先调用此skill。

Overview

Publishervivy-yi
RepositoryGreater-China-Legal
Skill namelegal-element-extraction
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 Legal Element Extraction 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-atomic/legal-element-extraction
  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-atomic/legal-element-extraction .claude/skills/legal-element-extraction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal Element Extraction 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 Legal Element Extraction 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 Legal Element Extraction 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.

/legal-element-extraction — 法律要素提取

场景通用原子skill 本skill是所有9个场景的输入预处理。任何场景收到非结构化叙述时,先调用本skill提取法律事实,再进入场景判断。

加载上下文

本skill为纯方法论skill,不依赖法域配置。 如需针对特定场景(如劳动仲裁/合同纠纷),在调用前读取对应场景的CLAUDE.md获取场景上下文。

一、三层事实结构

原始叙述(生活叙事)
    ↓ 提取与筛选
法律相关事实(具有规范意义的事实单元)
    ↓ 类型化与对应
要件事实(可直接对应法律构成要件的事实)
层次特征示例
原始叙述口语化、情绪化、叙事性强"他一直拖着不还,这种人简直不讲信用"
法律相关事实与法律判断直接关联,剔除情绪和评价借款5万元、约定1个月、逾期3个月、删除微信
要件事实直接对应特定请求权或抗辩的构成要件借贷合意成立→履行期限届满→未返还(违约)

二、九类事实单元

所有法律事实均可归入以下九类:

事实类型核心问题典型内容
主体事实何人?行为人、受害人、合同当事人、代理人
行为事实做了什么?签约、支付、交付、通知、拒绝、催告
时间事实何时?合同成立、履行期限、损害发生、催告时间
地点事实何地?合同成立地、履行地、管辖连接点
对象事实指向什么?款项、货物、数据、作品、隐私信息
结果事实产生什么后果?未履行、瑕疵交付、损害发生、财产减少
因果关系事实行为与结果有无联系?是否导致某一结果,介入因素
主观事实主观状态?故意、过失、明知、应知、善意/恶意
程序事实采取了什么程序?催告、协商、申诉、报案、起诉

三、事实属性四分法

属性特征识别标志处理方法
客观事实可通过外部证据描述和证明陈述具体行为、时间、地点、对象直接提取,标注证据来源
主观判断当事人基于自身感受的判断"我觉得""我认为""显然""肯定"剥离情绪,追问客观事实
法律评价已带有规范归类或责任判断"构成欺诈""属于违约""存在恶意"还原为客观事实基础
背景信息与法律判断无直接关联当事人性格、无关的前因后果剔除,仅保留必要背景

关键原则: "欺骗""恶意""明显违法"等评价性表述不能直接作为分析前提,必须还原为可被规范识别的客观事实。

四、工作流程

步骤1:切分最小事实单元

将原始叙述拆解为可独立识别、独立判断的最小事实单元。

  • 按句子拆分复合叙事
  • 每个单元应包含:谁(主体)+ 做了什么(行为)+ 何时(时间)+ 指向什么(对象)+ 产生什么(结果)
  • 缺少要素的单元,标注"待补充"

步骤2:事实类型化归类

将切分出的单元按九类事实归类。

步骤3:属性辨析与净化

原始表述属性判断净化结果
"他一直拖着不还"主观判断+法律评价行为事实:履行期限届满后未履行;程序事实:债权人多次催告
"卖家明明说是新的"主观判断("明明")行为事实:出卖人作出"商品为全新"表示;主观事实:出卖人明知或应知商品非全新
"平台把我的信息泄露了"法律评价("泄露")行为事实:平台向第三方提供用户个人信息;对象事实:用户个人信息;结果事实:信息被第三方获取
"这种人简直不讲信用"主观判断+情绪背景信息 → 剔除

步骤4:生活语言→法律语言转化

生活语言法律语言
"他一直拖着不还""债务履行期限届满后,债务人未履行还款义务"
"卖家说是全新的""出卖人曾就标的物品质作出特定表示(标的物为全新)"
"平台把我的信息泄露了""信息处理者实施了向第三方提供个人信息的行为,该提供行为未经信息主体同意"
"每次问他都说再等等""债权人多次催告,债务人多次承诺履行但未实际履行"
"被公司开除了""用人单位单方解除劳动合同"
"公司没给我交社保""用人单位未依法缴纳社会保险"

步骤5:对应法律构成要件

  1. 识别案件涉及的可能法律关系(合同/侵权/不当得利/劳动争议)
  2. 列出该法律关系的构成要件
  3. 将事实逐一映射到各要件
  4. 标注:✅满足 / ⚠️部分满足 / ❌缺乏

五、输出格式

形式A:结构化法律要素清单(默认)

## 法律要素提取报告

### 原始叙述摘要
[1-2句话概括核心内容]

### 九类事实提取

#### 主体事实
- [事实1]
- [事实2]

#### 行为事实
- [事实1]

#### 时间事实
- [事实1]

#### 对象事实
- [事实1]

#### 结果事实
- [事实1]

#### 因果关系事实
- [如有]

#### 主观事实
- [如有]

#### 程序事实
- [如有]

### 待补充事实
- [缺失但对法律分析重要的事实]

### 争议事实
- [叙述中存在矛盾或需证据证实的事实]

形式B:要件映射分析(当用户指定法律关系时)

## 要件映射分析

**法律关系**:[如:借款合同纠纷]
**请求权基础**:[如:《民法典》第675条]

| 构成要件 | 对应事实 | 满足状态 |
|---|---|---|
| 借贷合意 | 双方就5万元借款达成一致 | ✅ 满足 |
| 款项交付 | 出借人向借款人转账5万元 | ✅ 满足 |
| 履行期限届满 | 约定1个月,已逾期3个月 | ✅ 满足 |
| 未返还借款 | 借款人未返还任何款项 | ✅ 满足 |

形式C:时间轴(复杂案件)

## 法律时间轴

| 时间 | 行为主体 | 行为内容 | 涉及对象 | 关键证据 | 法律意义 |
|---|---|---|---|---|---|
| [日期] | [主体] | [行为] | [对象] | [证据] | [意义] |

六、示例

输入:

"我去年借给朋友五万元,他当时说一个月后一定还我。后来过了三个月他都没还,每次问他都说再等等,最后把我微信删了。"

输出:

## 法律要素提取报告

### 原始叙述摘要
出借人向借款人出借5万元,约定1个月归还,逾期3个月未还,借款人删除出借人微信。

### 九类事实提取

#### 主体事实
- 出借人(叙述者)与借款人(朋友)成立借款关系
- 双方为自然人之间的借贷

#### 行为事实
- 双方就5万元借款达成合意
- 出借人向借款人交付借款(金额5万元)
- 借款人承诺1个月后归还
- 借款人在履行期限届满后未归还借款
- 出借人多次向借款人催告还款
- 借款人多次以"再等等"推诿
- 借款人删除出借人微信(断绝联系)

#### 时间事实
- 借款时间:"去年"(需确认具体日期)
- 约定还款期限:1个月
- 逾期时间:3个月
- 诉讼时效起算点:约定还款期限届满之日

#### 对象事实
- 借款标的:人民币5万元

#### 结果事实
- 借款人未按约定期限返还借款
- 借款人与出借人失去联系

#### 因果关系事实
- 借款人未履行还款义务 → 出借人债权未实现

#### 主观事实
- 借款人明知还款义务(曾承诺还款)
- 借款人有履行能力但拒不履行(多次推诿后断绝联系)

#### 程序事实
- 出借人多次催告(可构成时效中断)
- 未提起诉讼或仲裁

### 待补充事实
1. 借款具体日期(影响诉讼时效计算)
2. 借款交付方式(现金/转账,影响证据证明力)
3. 是否有借条、欠条或借款合同
4. 借款人身份信息(起诉需要明确的被告)
5. 借款人是否有财产线索(影响执行)

### 争议事实
- 借款人删除微信的行为是否构成逃废债的恶意证据(需结合其他证据判断)

### 要件映射

**法律关系:** 自然人借贷纠纷
**请求权基础:** 《民法典》第675条(返还借款请求权)

| 构成要件 | 对应事实 | 满足状态 |
|---|---|---|
| 借贷合意 | 双方就5万元借款达成一致 | ✅ 满足 |
| 款项交付 | 出借人向借款人转账5万元 | ⚠️ 待补充(需确认转账记录) |
| 履行期限届满 | 约定1个月,已逾期3个月 | ✅ 满足 |
| 未返还借款 | 借款人未返还任何款项 | ✅ 满足 |

七、质量检查清单

  • 原始叙述是否已切分为最小事实单元?
  • 每个事实单元是否已明确行为主体?
  • 全部事实是否已按九类事实类型归类?
  • 客观事实、主观判断、法律评价、背景信息是否已区分?
  • 法律评价性表述是否已还原为客观事实基础?
  • 主观情绪词是否已剥离?
  • 生活语言是否已转化为法律语言?
  • 提取的事实是否已对应到具体法律构成要件?
  • 待补充事实和争议事实是否已列明?
  • 关键时间节点是否已提取?

八、各场景调用指引

场景调用时机调用方式
labor-arbitration用户描述"被开除/拖欠工资/不交社保"等调用本skill提取劳动关系事实,再进入dispute-classifier
contract-review用户粘贴聊天记录/口头协议描述调用本skill提取事实,再进入contract-classifier
ip-infringement用户描述"被侵权/收到警告函"调用本skill提取侵权事实,再进入infringement-detector
litigation-support用户描述案件经过调用本skill提取事实,再进入strategy-designer
data-compliance用户描述"数据泄露/被投诉"调用本skill提取数据处理事实,再进入pipl-assessment
tax-compliance用户描述"少开发票/关联交易定价异常"调用本skill提取税务相关事实,再进入tax-type-classifier
其他场景用户输入为非结构化叙述时同上模式

Greater China Legal — Legal Atomic Skill v1.0.0

Frequently asked questions

What does the Legal Element Extraction AI skill do?

法律要素提取——从非结构化叙述中提取法律事实。 适用情形:用户提供了案件描述/聊天记录/当事人陈述等非结构化内容,需要先提取法律事实再进入后续分析。 核心价值:将"他一直拖着不还"这类生活语言,转化为"债务履行期限届满后未履行"的法律语言。 是所有场景的输入预处理skill——任何场景skill收到非结构化输入时,应先调用此skill。

Why use Legal Element Extraction on TypingMind?

Because you install it once and use it with any model. Legal Element Extraction 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 Legal Element Extraction in TypingMind?

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

Which AI models can use Legal Element Extraction?

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 Legal Element Extraction?

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

Is the Legal Element Extraction 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 👇