# Legal Due Diligence

> |

- **Type:** Skill
- **Install:** `agentstack add skill-lawmotion-ai-vibe-lawyering-legal-due-diligence`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [LawMotion-AI](https://agentstack.voostack.com/s/lawmotion-ai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [LawMotion-AI](https://github.com/LawMotion-AI)
- **Source:** https://github.com/LawMotion-AI/Vibe-Lawyering/tree/main/agent-skills/legal-due-diligence

## Install

```sh
agentstack add skill-lawmotion-ai-vibe-lawyering-legal-due-diligence
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 法律尽职调查 Skill v1.0

## 目标

为中国律师提供系统化的法律尽职调查底稿编写与报告生成工具。

**核心价值**：
- **调查全面**：10大标准板块、200+检查项，不遗漏重要事项
- **用语规范**：标准法律用语，表述专业严谨
- **两阶段输出**：底稿（律师内部记录）→ 报告（客户交付文件）
- **风险识别**：三级风险评估，系统识别法律风险

---

## 工作流程

```
init 初始化  →  draft 写底稿  →  check 检查  →  report 生成报告
（创建项目）    （逐章撰写）      （完整性）       （底稿→报告）
                   ↺ 循环
```

---

## 四种工作模式

### 模式 1：init（项目初始化）

**触发词**：`初始化尽调项目`、`新建尽调`、`init DD`

**操作步骤**：
1. 运行 `scripts/init_project.py`，在指定路径创建项目目录
2. 生成项目信息文件 `project-info.md`
3. 为10个章节各生成底稿模板文件

**必须获取的输入**：
- `project_path`：项目存放路径
- `target_company`：目标公司全称
- `client_name`：委托人名称

**可选输入**（有默认值）：
- `base_date`：调查基准日（默认当日）
- `purpose`：调查目的（如"股权收购"、"投资入股"）
- `law_firm`：律师事务所名称
- `lawyers`：经办律师姓名（可多个）

**输出**：项目目录结构如下：

```
[项目名称]-DD/
├── project-info.md          # 项目基本信息与进度跟踪
├── working-paper.md         # 完整底稿（10章合一，单一文件）
└── report/
    └── （报告生成后存放于此）
```

---

### 模式 2：draft（撰写底稿）

**触发词**：`写底稿`、`撰写第X章`、`draft`、`分析材料并写入底稿`

**操作步骤**：
1. 读取 [references/section-guide.md](references/section-guide.md) 中对应章节的调查指南
2. 阅读用户提供的调查材料（支持文件路径或粘贴文本）
3. 按底稿六段结构撰写该章节内容
4. 写入项目根目录的 `working-paper.md`（单一底稿文件，定位至对应章节更新）

**必须获取的输入**：
- `chapter`：章节编号（1–10）或章节名称
- `materials`：调查材料（文件路径列表 或 粘贴的文本内容）

**可选输入**：
- `project_path`：项目路径（若上下文中已有则无需重复提供）
- `append`：是否追加模式（默认覆写）

**底稿六段结构**（每章必须包含）：

```markdown
## [编号]. [章节名称]

### [X].1 调查范围与方法
调查范围：[本章调查覆盖的事项]
调查方法：
- [ ] [方法1]
- [ ] [方法2]

### [X].2 已获取材料清单
| 序号 | 材料名称 | 形式 | 日期/期间 | 备注 |
|------|----------|------|-----------|------|

### [X].3 未获取/待补充材料
| 序号 | 材料名称 | 重要程度 | 状态 | 影响说明 |
|------|----------|----------|------|----------|

### [X].4 调查发现
[纯事实记录，引用具体文件，不含意见判断]

### [X].5 风险提示
| 序号 | 风险事项 | 等级 | 事实依据 | 法律依据 | 处理建议 |
|------|----------|------|----------|----------|----------|

### [X].6 律师备忘
[内部工作记录，不进报告]
```

**风险等级标准**：
- 🔴 高：直接影响交易可行性或重大法律后果
- 🟡 中：需关注，可能影响交易条款或需要整改
- 🟢 低：轻微瑕疵，一般不影响交易，建议关注

---

### 模式 3：check（检查底稿）

**触发词**：`检查底稿`、`完整性检查`、`check`、`汇总风险`

**操作步骤**：
1. 读取 `working-paper.md` 全文
2. 逐章检查六段结构完整性
3. 汇总所有风险提示（按等级分类）
4. 统计未获取材料
5. 输出检查报告到对话（不修改底稿）

**输出格式**：

```
## 底稿完整性检查报告

### 各章完成情况
| 章节 | 调查范围 | 材料清单 | 调查发现 | 风险提示 | 状态 |
...

### 风险汇总
🔴 高风险（X项）：...
🟡 中风险（X项）：...
🟢 低风险（X项）：...

### 待补充材料（X项）
...
```

---

### 模式 4：report（生成报告）

**触发词**：`生成报告`、`出报告`、`report`、`底稿转报告`

**操作步骤**：
1. 读取 [references/report-standards.md](references/report-standards.md)（报告写作规范）
2. 读取 [assets/report-template.md](assets/report-template.md)（报告模板）
3. 读取 `working-paper.md`（底稿全文）
4. 按转化逻辑生成报告，保存至 `report/[项目名称]-法律尽职调查报告.md`

**底稿 → 报告的转化逻辑**：
- §1–3 调查范围和材料 → 简化为报告"调查范围" + 附件"文件清单"
- §3 未获取材料 → 转入报告"声明与限定条件"的免责条款
- §4 调查发现 → 转化为报告各章"基本情况"（客户化措辞）
- §5 风险提示 → 转化为报告各章"律师意见" + 结论章"重大风险提示"
- §6 律师备忘 → **完全删除**，不进报告

---

## 参考资源

| 文件 | 用途 | 何时加载 |
|------|------|----------|
| `references/section-guide.md` | 各章节调查要点清单与常见风险 | draft 模式时，仅加载对应章节 |
| `references/report-standards.md` | 报告写作规范、语言风格、格式要求 | report 模式时加载 |
| `assets/working-paper-template.md` | 完整底稿模板（10章×6段） | init 模式时用于生成初始文件 |
| `assets/report-template.md` | 完整报告模板（含声明、结论） | report 模式时用于结构对照 |
| `scripts/init_project.py` | 项目初始化脚本 | init 模式时执行 |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [LawMotion-AI](https://github.com/LawMotion-AI)
- **Source:** [LawMotion-AI/Vibe-Lawyering](https://github.com/LawMotion-AI/Vibe-Lawyering)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lawmotion-ai-vibe-lawyering-legal-due-diligence
- Seller: https://agentstack.voostack.com/s/lawmotion-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
