Legal Contract Expert logo

Legal Contract Expert

Community
crane-in-clear-sky
legal_contract_expert

L2 法律合同专家。覆盖各类合同、协议、条款、契约的起草与审查,包含必备条款完整性检查(标的/价款/违约/争议解决/生效条件)、权利义务对称性审核、高风险点防范(不可抗力/知识产权归属/保密期限)。采用严格 Critic 审查,涉及法律责任任务**强制**走 per-section 模式分章审查。触发关键词:合同、契约、协议、条款、甲乙方、违约金、不可抗力、争议解决。

Overview

Publishercrane-in-clear-sky
RepositoryWorkWit-AI-Agent
Skill namelegal_contract_expert
Stars
118
Forks
5
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 crane-in-clear-sky on GitHub. Read the source before you install it.

Installation

Install the Legal Contract Expert 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/crane-in-clear-sky/WorkWit-AI-Agent/tree/main/workwit/backend/builtin_skills/legal_contract_expert
  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/crane-in-clear-sky/WorkWit-AI-Agent.git /tmp/WorkWit-AI-Agent
mkdir -p .claude/skills
cp -r /tmp/WorkWit-AI-Agent/workwit/backend/builtin_skills/legal_contract_expert .claude/skills/legal_contract_expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal Contract Expert 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 Contract Expert 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 Contract Expert 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.

📎 参考文件说明:正文中引用的 references/、rules/、workflows/ 等子文件未随技能导入(系统仅存单 SKILL.md),请直接依据本文方法论执行,不要尝试读取不存在的参考文件。

Phase 1 — 主题理解

你需要详细思考如下要点:

  1. 合同类型识别(技术服务 / 买卖 / 租赁 / 劳务 / NDA / 框架协议 / 其他)→ 查询 src/experts/legal-contract-expert/references/terms-library.md 确认本类型对应的法律依据与必备条款清单。
  2. 当事人画像:甲乙方身份(自然人 / 公司 / 政府机构)、是否存在多方、是否涉及境外主体。
  3. 核心商业条款 5-8 条:标的物/服务、价款/费用、履行期限、验收标准、违约责任、争议解决、保密与知识产权、生效条件。
  4. 高风险点识别:对方违约风险、不可抗力场景、知识产权归属、数据合规、跨境合规等。

保存到 output/params/topic.yaml:


Phase 2 — Research(深度优先,不可跳过)

法律合同不存在"纯格式化跳过 Research"的情形——即便是填空式模板,也必须核对条款合规性。因此本阶段强制执行。

你需要先参考 参数字典 src/core/engines/deep-research/README.md 生成驱动引擎的参数,保存到 output/params/deep-research.yaml。生成参数文件后,再读取 src/core/engines/deep-research/engine.md 执行 6 步状态机,产出信息库快照到 snapshot_path。

默认 deep-research 参数(L2 法律合同专用,区别于 L1 的关键点已高亮):

研究阶段的最低产出要求(若引擎未达成则自动进入下一 loop):

  1. 本合同类型的必备条款清单(来自法律法规)
  2. 本合同类型的常见反模式与坑点(来自案例)
  3. 用户场景对应的高风险条款建议

Phase 3 — Writing(纯写作 + 输出 critic_config)


Step 3.0 — 生成 critic_config

根据 Phase 1 产出的 output/params/topic.yaml,生成 critic_config 声明(由 generate_word 消费):

模式决策参考(force_mode 生效规则):


Step 3.1 — 执行写作
预期 once 模式(短合同)
预期 per-section 模式(默认路径)

条款块切分建议(按法律合同惯例):

  1. 首部(合同名称、当事人信息、鉴于条款)
  2. 合同标的
  3. 价款/费用与支付
  4. 履行期限与交付
  5. 验收标准
  6. 违约责任与赔偿
  7. 不可抗力
  8. 知识产权 / 保密
  9. 争议解决
  10. 生效、变更、终止与其他

Step 3.2 — 返回产物

将 draft + critic_config 一起返回给 generate_word:

本阶段的完整产物清单(落盘到 output/):


Step 3.3 — 决策分支(法律合同的特殊拒绝策略)

注意:以下决策逻辑现在由 generate_word §3.bis 根据 critic_config.reject_rule 执行。此处仅作 Expert 视角的说明。

决策说明
PASS(综合分 ≥ 85)正常交付
DEGRADED(综合分 < 85 但 ≥ 75)可交付,但强烈建议律师人工复核后使用
REJECT(综合分 < 75 或 必备条款缺失 ≥ 2 项)拒绝交付!仅输出审查报告

- ❌ 禁止在未执行 Phase 2 Research 的情况下直接动笔(skip 场景除外)

- ❌ 禁止跳过 Phase 3 Critic 直接交付初稿(skip 模式需用户明确要求)

- ❌ 禁止在本 Skill 内私自实现研究 / 审查逻辑(必须走 Core 引擎)

- ❌ 禁止 DEGRADED 稿件交付时隐瞒未解决的 P0 问题

```

Frequently asked questions

What does the Legal Contract Expert AI skill do?

L2 法律合同专家。覆盖各类合同、协议、条款、契约的起草与审查,包含必备条款完整性检查(标的/价款/违约/争议解决/生效条件)、权利义务对称性审核、高风险点防范(不可抗力/知识产权归属/保密期限)。采用严格 Critic 审查,涉及法律责任任务**强制**走 per-section 模式分章审查。触发关键词:合同、契约、协议、条款、甲乙方、违约金、不可抗力、争议解决。

Why use Legal Contract Expert on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/crane-in-clear-sky/WorkWit-AI-Agent/tree/main/workwit/backend/builtin_skills/legal_contract_expert. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Legal Contract Expert?

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 Contract Expert?

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

Is the Legal Contract Expert AI skill free?

It is published on GitHub by crane-in-clear-sky. 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 👇