Element Analysis logo

Element Analysis

Community
Youchu-lawhub
element-analysis

请求权基础方法的实战攻防分析——处理原被告各执一词的"两个故事", 分阶段审查各方主张的法律合理性,萃取争点, 产出攻防审查报告 + 攻防结构图 + 待证事实清单 + 策略备忘录。 方法论自包含(内置 references/ 目录)。 触发词:要件分析、攻防分析、请求权基础、构成要件、攻防审查、攻防大纲、要件攻防。

Overview

PublisherYouchu-lawhub
Repositorycn-litigation-toolkit
Skill nameelement-analysis
Stars
31
Forks
4
Bundled files
8
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.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Youchu-lawhub on GitHub. Read the source before you install it.

Installation

Install the Element Analysis 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/Youchu-lawhub/cn-litigation-toolkit/tree/main/skills/element-analysis
  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/Youchu-lawhub/cn-litigation-toolkit.git /tmp/cn-litigation-toolkit
mkdir -p .claude/skills
cp -r /tmp/cn-litigation-toolkit/skills/element-analysis .claude/skills/element-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Element Analysis 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 Element Analysis 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 Element Analysis 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.

要件攻防分析(element-analysis)

一、核心逻辑

审理原则:程序先于实体 → 法律先于事实 → 原告先于被告。

工作方式:不同时处理两个故事,分阶段依次审查——

  • 原告阶段仅看原告陈述:你说的这些如果为真,法律上能否支持你的诉请?
  • 被告阶段仅看被告陈述:你说的这些如果为真,法律上能否挡住原告?
  • 陈述阶段不审查真假,仅审查法律合理性;
  • 双方陈述均合理且存在矛盾时,才进入证据阶段确定真假。

实战收益:经法律审查筛选后,大量案件不必进入证据比拼即可明确方向。

二、输入与触发

用户触发
  │
  ├─ AskUserQuestion:您的代理立场?
  │   (a) 原告/上诉人/申请人
  │   (b) 被告/被上诉人/被申请人
  │
  ├─ AskUserQuestion:目前手上有哪些材料?
  │   (1) 仅有原告起诉状 → 从原告阶段开始
  │   (2) 起诉状 + 答辩状 → 连续完成原、被告阶段
  │   (3) 双方诉辩 + 证据册 → 全流程含证据阶段
  │
  └─ 自动判断起始阶段并执行

三、审查流程

3.1 原告阶段

审查问题:原告主张在法律上能否支持其诉请?

  1. 确定诉请(转为法律表达);
  2. 遍检候选请求权基础(依 examination-sequence.md),列清单 → AskUserQuestion 确认候选清单;
  3. 构建攻防审查框架(依 outline-engine.md:找法→分类→构建→拆解→成型)→ AskUserQuestion 确认框架;
  4. 逐项审查原告陈述能否满足各请求权基础的要件:
    • 权利是否产生(构成要件逐项审查)
    • 权利未消灭(消灭事由审查)
    • 权利可行使(行使障碍审查)
    • 对己不利陈述亦须审查
  5. 阶段结论:
结论后续
法律上站不住短路终结——不进被告阶段
部分站得住仅合理部分进入被告阶段
法律上站得住进入被告阶段
  1. 渲染攻防结构图(仅原告侧节点)。

释明提示:站不住时,提示用户是否存在遗漏陈述。

3.2 被告阶段

前提:原告诉请至少部分在法律上站得住。

审查问题:被告防御在法律上能否成立?

  1. 识别被告防御手段:
类型性质主张责任
否认否认原告陈述的事实无(但不允许整体否认)
抗辩权利障碍/消灭/阻止被告承担
  1. 以通过原告阶段的请求权基础为引导,逐项审查被告陈述能否满足防御规范;
  2. 主动检索法定消极规范(即使被告未明确主张)——发现潜在抗辩标注 [风险提示];
  3. 阶段结论:
结论后续
防御站不住短路终结——原告不经举证胜诉
部分站得住未被防御的请求权基础直接成立
防御站得住进入反抗辩/证据阶段
  1. 补填攻防结构图(被告侧节点 + 争议标橙);
  2. 产出要件-陈述-证据对照表。

关键规则:只要有一项请求权基础未被合理防御,原告即因该项胜诉。

3.3 反抗辩与再抗辩

  • 反抗辩:被告抗辩站得住时,原告可提反击;审查方式同原告阶段。
  • 再抗辩:原告反抗辩站得住时,被告可再反击;审查方式同被告阶段。
  • 任一方未提出或不合理 → 对方胜诉。

3.4 证据阶段

前提:双方主张都在法律上站得住且存在事实矛盾。

核心规则:

  • 一方主张且对方认可 → 视为真实,不举证;
  • 仅双方有争议且具法律意义的事项 → 需举证。

操作:

  1. 从攻防结构中提取待证事实;
  2. 分配举证责任(成立要件→原告;消灭/阻止→被告;法定倒置从其规定);
  3. 输出待证事实清单(含举证结果推演)。

后续交付 /evidence-index、/cross-examination、/trial-outline。

3.5 短路决策树

原告阶段
├── 站不住 → 原告败诉方向(终结)
└── 站得住 → 被告阶段
    ├── 被告未防御 → 原告胜诉方向(终结)
    ├── 防御站不住 → 原告胜诉方向(终结)
    └── 防御站得住
        ├── 原告无/不合理反抗辩 → 被告抗辩成立
        └── 原告反抗辩合理
            ├── 被告无/不合理再抗辩 → 原告胜诉方向
            └── 被告再抗辩合理 → 证据阶段

🔗 台账自动回写(强制):在产出交付物之前,调用「案件管家」§0.7 自动同步接口:搜索台账 recordId → 追加案件进展"{日期}攻防分析完成(核心争议:{1句})" → 更新下一步动作 → 写入。搜索无结果跳过回写并标注;回写失败不阻塞输出但标注"⚠️ 台账未自动更新"。

四、输出产物

产物产出时机格式
攻防审查报告(各阶段)每阶段完成后.md
Mermaid 攻防结构图随报告嵌入mermaid 代码块
要件-陈述-证据对照表被告阶段后.md 表格
待证事实清单 + 举证责任分配证据阶段.md 表格
诉讼策略备忘录各阶段追加.md

报告经 /legal-verification 放行后询问是否转 Word。

转 Word(可选):本技能产出为内部参考/分析文件,非法院提交正式文书,不强制经过文书排版闸门。如用户选择转 Word,使用 scripts/md2docx_legal.py 转换脚本(排版参数详见 format-spec.md)。

4.1 报告写作规范

  • 采用直接论断("满足/不满足"),不用假设语气;
  • 明显满足的要件一句话带过,争议要件详细展开论证(参 proportionality.md);
  • 涉不确定概念时调用 legal-interpretation-toolkit.md;
  • 每项请求权基础完整审查三层(产生/消灭/行使);
  • 法条号经 MCP 校验(依 analytical-discipline.md)。

4.2 攻防结构图规范

每项请求权基础一棵 LR 攻防树:

  • 原告阶段:仅填原告侧(要件满足/不满足)
  • 被告阶段:补填被告侧(否认用 -.- 虚线,抗辩用 --> 实线)
  • 争议标橙 #fff3cd、满足标绿 #d4edda、不满足标红 #f8d7da

4.3 策略备忘录

谨慎度规则:

已完成阶段谨慎度
仅原告阶段高度谨慎——仅方向性判断 + "待对方应诉后重新评估"
被告阶段及以后可给区间概率,标注 [请审阅:主观判断]

主诉视角侧重:请求权基础选择、要件证据充分性、反抗辩准备、结果预判。

被诉视角侧重:原告薄弱点、我方防御方案、结果预判、和解评估(可选)。

标记词汇:[待验证:事实] / [需引用:法条] / [请审阅:主观判断] / [证据缺口] / [风险提示]

五、知识库调用(按 profile.md 知识库注册表)

本技能在多个环节调用知识库,具体域名由用户在 profile.md 注册表中配置。

环节调用方式
遍检候选请求权基础KB.retrieve(query="<案由> 请求权基础", top_k=5)
程序法校验KB.retrieve(query="<程序事项>", top_k=3)
实体法文献加载KB.retrieve(query="<条文号> <争议焦点>")
预检索历史攻防KB.retrieve(query="<案由>+<争议焦点>", top_k=5)

域名由用户注册时指定,本技能不预设路由。

完成后沉淀

分析完成后推荐"沉淀到 B 区办案笔记":KB.upload(domain=case-notes, file=<攻防报告.md>)

降级

CLI 不可达 → 降级到本地 ${KB_ROOT}/{skill-name}/knowledge-base/(外部知识库根目录,可在 profile.md 中配置;未配置时套件跳过本地降级) Read/Grep,标注 [KB:降级-本地]。

六、MCP 预检与调用

MCP 预检

执行分析前,先调用 MCP.list_tools 探测法律检索后端(关键词:law/yuandian/pkulaw/法宝)是否可用。

  • 可用 → 法条校验和案例检索自动执行,静默继续。
  • 不可用 → 用 AskUserQuestion 告知用户:"法律检索 MCP 未连接,要件分析中的法条和案例辅助将无法自动校验。本技能内置方法论可独立运行,分析框架不受影响。建议前往宿主平台的连接器/MCP 设置(Agent 运行时 / Claude Code / Cursor / Gemini CLI / OpenCode 等) 中配置元典或北大法宝。是否暂不配置、以降级模式继续?"
    • 用户选择继续 → 降级执行,标注 [L4-法条待验证]/[L4-案例待验证]

MCP 调用

  • 法条检索(法律检索后端 LAW.*):条文号/原文首次出现前须经 MCP 校验;不可用时标注 [L4-法条待验证]。
  • 案例检索(LAW.case_search / LAW.case_semantic):可选,辅助策略备忘录。不可用时标注 [L4-案例待验证]。

降级策略

不可用场景降级方案标注
法律检索后端不可用基于内置 references/ 方法论继续分析,法条引用基于模型知识[L4-法条待验证]
案例检索不可用跳过案例辅助,不阻塞要件审查[L4-案例待验证]
全部 MCP 不可用纯方法论分析,输出框架与结论,附待验证清单顶部附加降级提示

降级模式下在输出顶部附加:"当前以降级模式运行。如需启用自动校验,请前往宿主平台的连接器/MCP 设置(Agent 运行时 / Claude Code / Cursor / Gemini CLI / OpenCode 等) 配置对应 MCP 服务。" 通用降级规则详见 profile.md「MCP 预检协议 → 降级规则」。

七、方法论加载规则

references/ 为本 skill 的分析内核。加载规则:

  • 全局总览:relationstechnik.md(五阶段流程框架——启动分析时首先加载,确认整体节奏)
  • 原告阶段:examination-sequence.md(检索排序)+ outline-engine.md(框架构建)+ inner-structure.md(三层审查)+ proportionality.md(深度控制)
  • 被告阶段:inner-structure.md(否认 vs 抗辩归位)+ proportionality.md
  • 论证展开:legal-interpretation-toolkit.md(法律解释)
  • 全程:analytical-discipline.md(法条引用 + 品质纪律)
  • 框架速查:element-templates.md(常见请求权审查模板)

八、执行规则

  1. 陈述阶段严禁以"证据是否充分"为标准——仅审查"陈述能否满足规范要件"。
  2. 候选清单与攻防框架须分别 AskUserQuestion 确认后再展开论证。
  3. 管辖异议等纯程序问题走 /procedural-documents。
  4. 方法论不可改动;输出与 references/ 冲突时以 references/ 为准。
  5. 请求权规范竞合时遍检所有候选基础,不替当事人择一。

九、跨技能关联

上游本 skill下游
/case-facts → 事实基础攻防分析→ /plaintiff-complaint(论证骨架)
/case-manager → 案件信息→ /defense-statement(抗辩结构)
/litigation-knowledge-base → 历史策略→ /evidence-index(按待证事实分组)
→ /cross-examination(针对对方证据)
→ /trial-outline(争议焦点+询问清单)

案件管家联动(强制)

本 skill 完成产出后,必须在输出文档之前调用「案件管家」的台账回写协议,六步流程 / 降级 / 不阻塞规则统一由套件 Hub 维护:

协议单一权威源:skills/case-manager/references/downstream-writeback-protocol.md 入口条款:/case-manager SKILL.md §0.7

本 skill 的产出:攻防分析报告 md

差异化字段回写:下一步动作 → 证据调取 + 文书撰写

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Element Analysis AI skill do?

请求权基础方法的实战攻防分析——处理原被告各执一词的"两个故事", 分阶段审查各方主张的法律合理性,萃取争点, 产出攻防审查报告 + 攻防结构图 + 待证事实清单 + 策略备忘录。 方法论自包含(内置 references/ 目录)。 触发词:要件分析、攻防分析、请求权基础、构成要件、攻防审查、攻防大纲、要件攻防。

Why use Element Analysis on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Youchu-lawhub/cn-litigation-toolkit/tree/main/skills/element-analysis. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Element Analysis?

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 Element Analysis?

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

Is the Element Analysis AI skill free?

It is published on GitHub by Youchu-lawhub. 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 👇