Founder Legal Copilot
A legal intelligence system for startup founders. Covers 27 legal deliverables across 5 startup phases — from incorporation to exit — using RAG-grounded analysis on verified legal templates from YC, NVCA, and Orrick.
Disclaimer: This skill produces educational legal analysis and document drafts. It is not a substitute for advice from a licensed attorney. Always have a qualified lawyer review documents before signing.
When to Use
Use this skill when a founder needs to:
- - Generate a SAFE note for a pre-seed round quickly and accurately
- Review a contract for hidden risks before signing
- Run a legal health check before a fundraise or acquisition conversation
- Conduct lightweight due diligence on a counterparty, acquirer, or key hire
Do not use this skill for:
- - Court filings or litigation strategy
- Tax advice (refer to a CPA)
- Employment disputes in progress
- Regulated industries (fintech licenses, healthcare HIPAA specifics, securities broker-dealer)
Prerequisites
Environment Variables
Copy .env.example to .env and populate:
CODEBLOCK0
Required keys:
| Variable | Purpose |
|---|
| INLINECODE2 | Primary inference (GLM-5 via Friendly.ai) |
| INLINECODE3 |
RAG-grounded contract analysis |
|
APIFY_API_TOKEN | Live SEC/corporate records scraping |
|
REDIS_URL | Persistent deal memory across sessions |
|
ELEVENLABS_API_KEY | Voice narration (optional) |
|
CIVIC_CLIENT_ID | Auth and PII scrubbing |
OpenClaw Plugins
Install required plugins before running:
CODEBLOCK1
Workflow
Feature 1: SAFE Generator
Generates a complete, execution-ready Simple Agreement for Future Equity based on the YC Post-Money SAFE template (2018 revision).
Input:
CODEBLOCK2
Steps:
- 1. Skill validates entity type (must be Delaware C-Corp for standard SAFE)
- Contextual AI grounds the generation against the YC template library
- Parameters are injected into INLINECODE8
- Risk flags are surfaced: unusual caps, missing pro-rata, MFN conflicts
- Output is rendered as a complete markdown document ready for PDF export
- Session data is stored in Redis for future reference (deal history)
Output: Complete SAFE document + risk summary + recommended next steps
Common flags:
- -
--mfn: Most Favored Nation clause (standard for first checks) - INLINECODE10 : Pro-rata rights in next round
- INLINECODE11 : Discount rate (0-30%; typical: 15-20%)
Feature 2: Contract Reviewer
Analyzes any contract for founder-hostile terms. Compares against YC, NVCA, and Orrick baseline templates.
Input:
CODEBLOCK3
Steps:
- 1. Document is parsed and chunked
- Civic plugin scrubs any PII before sending to inference
- Contextual AI compares against standard templates (Cooley GO, Orrick)
- Eight risk dimensions are scored independently
- Output JSON includes risk level, flagged clauses, and plain-English explanations
- Recommendations prioritized by severity (red > yellow > green)
Risk dimensions analyzed:
- - Liability caps and indemnification scope
- Termination triggers and notice periods
- IP ownership and work-for-hire language
- Non-compete and non-solicitation scope
- Governing law and jurisdiction
- Arbitration vs. litigation election
- Assignment rights (change of control)
- Representations and warranties
Output format:
{
"risk_level": "yellow",
"score": 68,
"flags": [...],
"recommendations": [...],
"confidence": 0.91
}
Feature 3: Legal Health Check
Runs a 25-item legal checklist against the founder's described company state. Produces a scored report with prioritized remediation steps.
Input:
CODEBLOCK5
The skill will interactively ask about each item, or accept a pre-filled JSON:
CODEBLOCK6
Checklist categories:
- - Entity and formation (items 1-5)
- Founder agreements and equity (items 6-10)
- IP protection (items 11-14)
- Compliance and governance (items 15-20)
- Fundraising readiness (items 21-25)
Scoring:
- - Each item: 0-4 points
- Total: /100
- Bands: Critical (0-40), Needs Work (41-60), Good (61-80), Excellent (81-100)
Output: Scored report, prioritized to-do list, estimated attorney cost to remediate each gap
Feature 4: Due Diligence
Pulls live corporate data via Apify MCP (SEC EDGAR, state records, bankruptcy databases) and produces a structured diligence report.
Input:
CODEBLOCK7
Steps:
- 1. Apify scrapes SEC EDGAR for any public filings
- State corporation database queried for active status, officers, registered agent
- Bankruptcy and UCC lien databases checked
- Tax lien records reviewed
- All findings compiled into structured report with red flag prioritization
- Redis stores the report for follow-up sessions
Data sources used:
- - SEC EDGAR full-text search
- Delaware Division of Corporations
- PACER bankruptcy records (via Apify)
- UCC filing databases
Output: Structured diligence report with findings, red flags (sorted by severity), and recommended follow-up actions
Patterns
Deal Memory (Redis)
Every SAFE generated and contract reviewed is stored in the Redis memory plugin with the deal name as the key. To recall a previous deal:
CODEBLOCK8
This enables multi-session deal tracking without re-uploading documents.
Multilingual Output
All four features support output in English, Spanish, Portuguese, and Mandarin:
CODEBLOCK9
Batch Mode
Review multiple contracts in a single session:
CODEBLOCK10
Voice Narration
Any report can be narrated via ElevenLabs for accessibility or async review:
CODEBLOCK11
Troubleshooting
"Contextual AI rate limit exceeded"
The RAG analysis endpoint has a per-minute limit. Add --no-rag to fall back to base model analysis (lower accuracy):
CODEBLOCK12
"Apify actor timeout"
SEC EDGAR and state database scrapes can time out on heavily loaded actors. Retry with --timeout 120:
CODEBLOCK13
"Redis connection refused"
Check REDIS_URL in .env. For local development, run:
CODEBLOCK14
"SAFE generation failed: invalid entity type"
SAFEs require a Delaware C-Corp. If the company is an LLC or S-Corp, the skill will halt and recommend conversion before fundraising.
"Civic PII scrub removed too much content"
Adjust the scrub sensitivity in skill/config.json under civic.sensitivity. Default is medium. Set to low for internal-only analysis where PII retention is acceptable.
Legal Sources
All templates and analysis are grounded against verified sources. See skill/data/sources.json for the complete list. Primary references:
创始人法律助手
面向初创公司创始人的法律智能系统。涵盖从公司设立到退出的5个创业阶段共27项法律交付物,基于对YC、NVCA和Orrick已验证法律模板的RAG分析。
免责声明: 本技能提供教育性法律分析和文件草稿,不能替代持证律师的专业建议。签署文件前务必请合格律师审阅。
适用场景
当创始人需要以下帮助时使用本技能:
- - 快速准确地生成种子轮前SAFE票据
- 签署前审查合同中的隐藏风险
- 在融资或收购谈判前进行法律健康检查
- 对交易对手、收购方或关键员工进行轻量级尽职调查
请勿将本技能用于:
- - 法院诉讼或诉讼策略
- 税务建议(请咨询注册会计师)
- 正在进行的劳动争议
- 受监管行业(金融科技牌照、医疗HIPAA细则、证券经纪商)
前置条件
环境变量
复制.env.example为.env并填写:
bash
cp .env.example .env
所需密钥:
| 变量 | 用途 |
|---|
| FRIENDLIAIAPIKEY | 主要推理(通过Friendly.ai的GLM-5) |
| CONTEXTUALAIAPI_KEY |
RAG合同分析 |
| APIFY
APITOKEN | 实时SEC/公司记录抓取 |
| REDIS_URL | 跨会话持久化交易记忆 |
| ELEVENLABS
APIKEY | 语音叙述(可选) |
| CIVIC
CLIENTID | 认证与PII脱敏 |
OpenClaw插件
运行前安装所需插件:
bash
openclaw plugin install redis-agent-memory
openclaw plugin install civic-nexus
openclaw mcp add apify https://mcp.apify.com
工作流程
功能1:SAFE生成器
基于YC投后SAFE模板(2018修订版)生成完整、可执行的未来股权简单协议。
输入:
/safe-generator
--amount 500000
--valuation-cap 8000000
--discount 20
--mfn true
--pro-rata true
--company Acme Corp(特拉华州C-Corp)
--investor 红杉Scout基金
步骤:
- 1. 技能验证实体类型(标准SAFE必须为特拉华州C-Corp)
- Contextual AI基于YC模板库进行生成
- 参数注入templates/safe-post-money.md
- 风险标记:异常估值上限、缺少按比例分配、MFN冲突
- 输出为完整Markdown文档,可导出PDF
- 会话数据存储于Redis供后续参考(交易历史)
输出: 完整SAFE文档 + 风险摘要 + 建议后续步骤
常用标记:
- - --mfn:最惠国条款(首轮投资标准条款)
- --pro-rata:下一轮按比例分配权
- --discount:折扣率(0-30%;典型值:15-20%)
功能2:合同审查器
分析任何合同中不利于创始人的条款,与YC、NVCA和Orrick基准模板进行对比。
输入:
/contract-review --file contract.pdf
或直接管道输入文本
/contract-review --text $(cat term-sheet.md)
步骤:
- 1. 文档解析并分块
- Civic插件在发送推理前脱敏所有PII
- Contextual AI与标准模板(Cooley GO、Orrick)对比
- 八个风险维度独立评分
- 输出JSON包含风险等级、标记条款和通俗解释
- 按严重程度排序建议(红色 > 黄色 > 绿色)
分析的风险维度:
- - 责任上限与赔偿范围
- 终止触发条件与通知期限
- 知识产权归属与雇佣作品条款
- 竞业禁止与禁止招揽范围
- 管辖法律与司法管辖权
- 仲裁与诉讼选择
- 转让权(控制权变更)
- 陈述与保证
输出格式:
json
{
risk_level: yellow,
score: 68,
flags: [...],
recommendations: [...],
confidence: 0.91
}
功能3:法律健康检查
针对创始人描述的公司状态执行25项法律检查清单,生成评分报告及优先整改步骤。
输入:
/health-check --stage seed --jurisdiction delaware
技能将交互式询问每个项目,或接受预填JSON:
/health-check --answers health-answers.json
检查清单类别:
- - 实体与设立(第1-5项)
- 创始人协议与股权(第6-10项)
- 知识产权保护(第11-14项)
- 合规与治理(第15-20项)
- 融资准备(第21-25项)
评分:
- - 每项:0-4分
- 总分:/100
- 等级:危急(0-40)、需改进(41-60)、良好(61-80)、优秀(81-100)
输出: 评分报告、优先待办清单、每项差距的预估律师费用
功能4:尽职调查
通过Apify MCP(SEC EDGAR、州记录、破产数据库)拉取实时公司数据,生成结构化尽职调查报告。
输入:
/due-diligence
--entity Acme Corp
--state 特拉华州
--ein 12-3456789
--type acquirer
步骤:
- 1. Apify抓取SEC EDGAR的公开文件
- 查询州公司数据库获取活跃状态、高管、注册代理人
- 检查破产和UCC留置权数据库
- 审查税务留置权记录
- 所有发现汇总为结构化报告,按风险标记优先级排序
- Redis存储报告供后续会话使用
使用的数据源:
- - SEC EDGAR全文搜索
- 特拉华州公司部
- PACER破产记录(通过Apify)
- UCC备案数据库
输出: 结构化尽职调查报告,包含发现、风险标记(按严重程度排序)和建议后续行动
模式
交易记忆(Redis)
每个生成的SAFE和审查的合同均以交易名称为键存储在Redis记忆插件中。要调取之前交易:
/recall-deal --name Acme A轮
实现多会话交易追踪,无需重新上传文档。
多语言输出
所有四个功能支持英语、西班牙语、葡萄牙语和中文输出:
/safe-generator ... --lang pt
/contract-review ... --lang es
批量模式
单次会话审查多个合同:
/contract-review --batch contracts/ --output reports/
语音叙述
任何报告均可通过ElevenLabs进行语音叙述,便于无障碍或异步审阅:
/health-check ... --voice --voice-id rachel
故障排除
Contextual AI速率限制超限
RAG分析端点有每分钟限制。添加--no-rag回退到基础模型分析(精度较低):
/contract-review --file contract.pdf --no-rag
Apify actor超时
SEC EDGAR和州数据库抓取在负载较重时可能超时。使用--timeout 120重试:
/due-diligence ... --timeout 120
Redis连接拒绝
检查.env中的REDIS_URL。本地开发运行:
bash
docker run -d -p 6379:6379 redis:alpine
SAFE生成失败:无效实体类型
SAFE需要特拉华州C-Corp。如果公司是LLC或S-Corp,技能将停止并建议在融资前进行转换。
Civic PII脱敏移除过多内容
在skill/config.json的civic.sensitivity下调整脱敏灵敏度。默认为medium。内部分析可设为low以保留PII。
法律来源
所有模板和分析均基于已验证来源。完整列表见skill/data/sources.json。主要参考: