Structured Element Extraction logo

Structured Element Extraction

Community
vivy-yi
structured-element-extraction

结构化要素清单——将法律问题/案件事实分解为完整、互斥、可验证的要素清单。 适用情形:接收到案件事实描述需要提取全部法律要素后分析、需要判断法律关系是否成立、需要对比多个法律事实的异同。 核心原则:完整性优先(MECE原则)、三重完整性校验、每个要素标注状态(✅已满足/❌未满足/⚠️待查/➖不适用/🔶存在争议)。 质量关卡:这是法律分析链条的"质量闸门",要素提取通过三重校验后方可进入下一阶段推理。

Overview

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

Use it in TypingMind

Enable Structured 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 Structured 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 Structured 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.

/structured-element-extraction — 结构化要素清单

核心概念

结构化要素 = 最小可判断单元

每个要素必须满足:
- 原子性:不可再进一步有意义地拆分
- 可判断性:可对其作出"满足/不满足/待查"的明确判断
- 独立性:各要素之间逻辑上互不包含(MECE原则)
- 可追溯性:每个要素可追溯到具体法律条文或法理依据

要素状态标注

状态符号含义
已满足✅现有材料可充分证明该要素成立
未满足❌现有材料明确表明该要素不成立
待查证⚠️现有材料不足以判断,需补充信息
不适用➖该要素在本案情形下不需要考察
存在争议🔶该要素的满足与否存在不同解释空间

MECE原则

相互独立(Mutually Exclusive):
  ❌ 错误:并列"过错"和"故意" → 包含关系
  ✅ 正确:将"过错"列为上位,"故意/过失"为其下位

完全穷尽(Collectively Exhaustive):
  ❌ 错误:遗漏"因果关系"要素
  ✅ 正确:覆盖该法律问题的全部判断维度

工作流程

Phase 1:识别问题类型与确定要素框架

步骤1.1:识别法律问题类型
  ├── 合同纠纷类(成立、效力、履行、违约、解除)
  ├── 侵权责任类(一般侵权、特殊侵权、产品责任)
  ├── 犯罪构成类(四要件/三阶层)
  ├── 行政行为类(合法性审查五要素)
  └── 程序事项类(管辖、时效、主体资格)

步骤1.2:调取对应标准要素框架
  - 优先使用法定构成要件
  - 法定要件不明确时,参照司法解释
  - 均无明确规定时,参照通说学理

步骤1.3:确认层级结构
  - 一级要素:法定构成要件(必须全部覆盖)
  - 二级要素:对一级要素的细化分解
  - 三级要素:具体事实判断点(可选,视复杂度决定)

Phase 2:逐项提取与填充

步骤2.1:逐一对照要素框架,从原始材料提取
  - 每个要素必须独立提取,不可跳过
  - 直接引用原始材料中的关键语句
  - 无法提取的要素标注为"待查证"

步骤2.2:为每个要素标注状态(✅/❌/⚠️/➖/🔶)

步骤2.3:为每个要素记录证据/依据来源
  - 事实要素:标注来源于哪份材料的哪个部分
  - 法律要素:标注对应的法条编号

Phase 3:三重完整性校验

第一重:框架完整性
  → 问:是否遗漏了标准框架中的任何一级要素?
  → 方法:将提取结果与标准框架逐一比对

第二重:事实覆盖度
  → 问:原始材料中是否有尚未被任何要素"消化"的重要事实?
  → 方法:重新通读原始材料,标记未被引用的事实片段

第三重:逻辑自洽性
  → 问:各要素之间是否存在逻辑矛盾?
  → 方法:检查要素间的逻辑关系

Phase 4:输出与交接

步骤4.1:按标准模板输出结构化要素清单
步骤4.2:附加完整性声明(通过/未通过三重校验)
步骤4.3:标注整体置信度
步骤4.4:列出待查证事项清单
步骤4.5:确认可以进入下一阶段 / 需要补充信息后再继续

常见领域要素框架

合同纠纷

一级要素法源二级要素
合同成立民法典469要约+承诺
合同生效民法典502主体合格+意思表示真实+内容合法
合同履行民法典509按约定全面履行
违约责任民法典577不履行/不完全履行

侵权纠纷

一级要素法源二级要素
加害行为民法典1165行为违法性
损害事实民法典1165财产/人身损害
因果关系民法典1165相当因果关系
主观过错民法典1165故意/过失

输出格式

## 结构化要素清单

### 案件/问题
[简要描述]

### 要素框架
| 一级要素 | 二级要素 | 状态 | 证据/依据 | 备注 |
|---------|---------|------|---------|------|
| E-01   | 子要素1  | ✅  | 证据X    |      |
| E-01   | 子要素2  | ⚠️  | 待补充   |      |
| E-02   | 子要素1  | ❌  | 证据Y    |      |
...

### 三重校验结果
- 框架完整性:[通过/未通过] — [说明]
- 事实覆盖度:[通过/未通过] — [说明]
- 逻辑自洽性:[通过/未通过] — [说明]

### 待查证事项
- [要素E-XX]:[缺失的关键信息] — [如何查证]

### 整体置信度:🟢高 / 🟡中 / 🔴低

### 下一阶段建议
[是否可以进入法律推理/法律适用/风险评估]

引用说明

本skill方法论来自 THUYRan/Legal-Skills-Chinese/structured-element-extraction, THUYRan原版15000字,GCL精简至约200行,保留MECE原则和三重校验框架。

Frequently asked questions

What does the Structured Element Extraction AI skill do?

结构化要素清单——将法律问题/案件事实分解为完整、互斥、可验证的要素清单。 适用情形:接收到案件事实描述需要提取全部法律要素后分析、需要判断法律关系是否成立、需要对比多个法律事实的异同。 核心原则:完整性优先(MECE原则)、三重完整性校验、每个要素标注状态(✅已满足/❌未满足/⚠️待查/➖不适用/🔶存在争议)。 质量关卡:这是法律分析链条的"质量闸门",要素提取通过三重校验后方可进入下一阶段推理。

Why use Structured Element Extraction on TypingMind?

Because you install it once and use it with any model. Structured 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 Structured 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/structured-element-extraction. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Structured 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 Structured Element Extraction?

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

Is the Structured 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 👇