Deductive Reasoning logo

Deductive Reasoning

Community
vivy-yi
deductive-reasoning

法律演绎推理——将法律规范和案件事实转化为严格的三段论(P-F-C)推理链条。 适用情形:分析案件逻辑、验证法律推理、提取三段论、梳理事实与法条关系、判断论证有效性。 核心价值:P-F-C结构(Provision-Provision/法律规则、Fact/法律事实、Conclusion/结论), 将隐含推理显式化,发现逻辑断裂和谬误。 适用场景:litigation-support(诉讼策略)、labor-arbitration(解除合法性判断)、 contract-review(违约责任分析)、company-governance(董事责任判断)。

Overview

Publishervivy-yi
RepositoryGreater-China-Legal
Skill namedeductive-reasoning
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 Deductive Reasoning 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/deductive-reasoning
  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/deductive-reasoning .claude/skills/deductive-reasoning
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deductive Reasoning 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 Deductive Reasoning 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 Deductive Reasoning 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.

演绎推理(P-F-C三段论)

定位

将隐含的法律推理转化为显式的P-F-C结构:

大前提(P) = 法律规则(法条)
小前提(F) = 法律事实(法条对案件事实的定性)
结论(C)   = 法律效果(权利/责任/义务)
中项(M)   = 连接大前提和小前提的桥梁概念
大前提(P): 《民法典》第577条 — 违约方应承担继续履行/补救/赔偿损失等违约责任
小前提(F): 甲公司未按约定时间交付货物 → 构成违约
结论(C):   甲公司应向乙公司赔偿损失
中项(M):   "不履行合同义务"

三段论类型

直言三段论(构成要件型)

所有满足构成要件X的行为 → 都有法律后果Y
当前行为满足构成要件X
∴ 当前行为具有法律后果Y

假言三段论(条件关系型)

肯定前件式(最常用):

如果X,则Y(X → Y)
X成立
∴ Y成立

否定后件式(用于抗辩):

如果X,则Y(X → Y)
Y不成立
∴ X不成立

完整推理流程

第一步:输入分类

将案件材料分类到三个初始框:

【大前提 P】:法律规则(法条),如无明文规定需补充隐含前提
【小前提 F】:法律事实(法律对自然事实的定性)
【小前提 f】:自然事实(当事人陈述/事件描述)
【结论 C】:假设性结论(待验证)

第二步:推理(循环交替执行直到逻辑闭环)

A. 完善各部分逻辑结构
P层:大前提梳理
  - 辨别类型:直言三段论(构成要件)or 假言三段论(条件关系)
  - 如无明文规定,补充隐含大前提

F层:小前提梳理
  - 理清事件性质/先后顺序/因果关系
  - 厘清各主体间的法律关系
  - 标注缺失或模糊的法律关系

C层:结论排序
  - 对多个结论排序
  - 识别中间结论
B. 链接关系与识别中项
f → F(事实归入)
  将自然事实链接到法律定性
  例:"没付尾款" → "根本违约"

F → P(寻找规范)
  将法律小前提链接到法条
  例:"根本违约" → 《民法典》第577条

P + F → C(推导结论)
  由法条+法律事实推理到结论
  写成三段论格式,验证中项是否正确推导

第三步:有效性验证

谬误类型错误形式后果
肯定后件谬误X→Y, Y成立, ∴X成立把结果当原因
否定前件谬误X→Y, ¬X成立, ∴¬Y成立把无因当无果
四词谬误A→B, C→D, ∴A→D中项未连接/偷换概念

有效性只取决于形式,不取决于内容。 即使大前提/小前题为假,只要形式正确,推理仍判定为"有效"。

输出格式

1. P-F-C结构图

## 推理链条

### C1:[最终结论]
  P:[法条] — 所有X → Y
  F:[法律事实] — 当前事实满足X
  C:当前事实 → Y
  中项(M):[连接P和F的概念]

### C1.1:[中间结论]
  P:[法条]
  F:[法律事实]
  C:[中间结论]

2. 三段论详表

| 自然事实(f) | 法律小前提(F) | 触发法条(P) | 中项(M) |
|---|---|---|---|
| f1:... | F1:... | P1:... | X |
| f2:... | F2:... | P2:... | Y |

3. 有效性报告

## 推理有效性

| 结论 | 形式有效性 | 中项状态 | 谬误类型 | 说明 |
|---|---|---|---|---|
| C1 | ✅有效/❌无效 | 存在/缺失 | 无/肯定后件/否定前件/四词 | ... |
| C2 | ... | ... | ... | ... |

### 谬误说明
- [如有谬误,详细说明]

各场景应用

labor-arbitration(解除合法性判断)

判断公司解除劳动合同是否违法:

P层:《劳动合同法》第39条(过错解除)/ 第40条(非过错解除)
F层:员工是否存在第39条情形 / 是否提前30日通知
C层:解除是否合法

中项示例:"严重违反规章制度"、"不能胜任工作"

contract-review(违约责任分析)

判断违约责任是否成立:

P层:《民法典》第577条(违约责任)
F层:合同义务是否未履行/不符合约定
C层:违约责任是否成立

中项示例:"不履行合同义务"、"履行不符合约定"

litigation-support(诉讼策略)

设计诉讼请求的论证链:

P层:请求权基础(合同/侵权/不当得利)
F层:案件事实是否满足构成要件
C层:诉讼请求能否得到支持

中项示例:"合同成立"、"损害后果"、"因果关系"

与场景的集成方式

场景skill处理流程:
  1. [legal-element-extraction] 提取法律事实
  2. [legal-norm-validity-check] 核查法条效力
  3. [dispute-issue-identification] 识别争议焦点
  4. [deductive-reasoning] 构建P-F-C推理链 ← 本skill
  5. [argument-chain-builder] 组织论证链(后续)

引用说明

本skill方法论参考 THUYRan/Legal-Skills-Chinese/deductive-reasoning, 在THUYRan原版基础上针对GCL场景做了精简和格式调整。

Frequently asked questions

What does the Deductive Reasoning AI skill do?

法律演绎推理——将法律规范和案件事实转化为严格的三段论(P-F-C)推理链条。 适用情形:分析案件逻辑、验证法律推理、提取三段论、梳理事实与法条关系、判断论证有效性。 核心价值:P-F-C结构(Provision-Provision/法律规则、Fact/法律事实、Conclusion/结论), 将隐含推理显式化,发现逻辑断裂和谬误。 适用场景:litigation-support(诉讼策略)、labor-arbitration(解除合法性判断)、 contract-review(违约责任分析)、company-governance(董事责任判断)。

Why use Deductive Reasoning on TypingMind?

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

Which AI models can use Deductive Reasoning?

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 Deductive Reasoning?

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

Is the Deductive Reasoning 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 👇