Contract audit stream

From CSlawyer1985/legal-skillhub · View interactive version

Contract audit stream is an AI agent skill from the GitHub repository CSlawyer1985/legal-skillhub. 使用合同审核流式接口(SSE)批量审核合同(链接或文件上传),甲/乙方视角可选,需携带 api_key;部署域名 https://dyinsight.cn,接口 /api/v1/skills/contract/audit。Triggers on phrases like "审核合同", "audit contract", "合同流式审核", "调用 contract-audit-stream".

How to use this skill

Skill file

调用线上后端 POST https://dyinsight.cn/api/v1/skills/contract/audit,开启 SSE 流返回进度与结果。两种输入方式二选一:链接 JSON 或 文件 multipart。

核心要点

请求格式

方式一:JSON(链接)

方式二:Multipart(文件上传)

校验约束(与后端实现一致)

SSE 返回

id: ...:1
event: message
data: {"stream_id":"...","content":"开始审核",...}

id: ...:6
event: message
data: {"stream_id":"...","content":"{\"order_name\":\"房屋租赁合同\",\"order_status\":\"success\",\"order_contract_perspective\":\"PARTY_YI\",\"order_contract_file_path\":[\"https://...\"],\"audit_result\":[...]}","is_finish":true,...}

错误示例:

event: error
data: {"code":"FILE_TYPE_NOT_ALLOWED","message":"仅支持图片格式: jpg/jpeg/png/gif/webp/bmp"}

常见错误还包括文件数量/大小超限、api_key 无效、积分不足。

生产调用示例(推荐)

JSON(链接)

curl -N -s -X POST "https://dyinsight.cn/api/v1/skills/contract/audit" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "contract_perspective": "PARTY_JIA",
    "file_urls": "https://example.com/contract.pdf"
  }'

Multipart(文件上传,含多文件示例)

curl -N -s -X POST "https://dyinsight.cn/api/v1/skills/contract/audit" \
  -F "api_key=YOUR_API_KEY" \
  -F "contract_perspective=PARTY_YI" \
  -F "files=@/path/to/file1.png" \
  -F "files=@/path/to/file2.png"

提示词建议(对话式产品)

配置与调用前置检查 (Pre-flight Check)

目录

contract-audit-stream/
├── README.md
├── SKILL.md
└── config.json
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.