Community研究与数据分析github.com

liusite66-dev/compare-contract-risk-migration-skill

Agent Skill:比较2至5版中国商事合同,语义对齐条款并生成可追溯的XLSX风险迁移报告。

compare-contract-risk-migration-skill 是什么?

compare-contract-risk-migration-skill is a Claude Code agent skill that agent Skill:比较2至5版中国商事合同,语义对齐条款并生成可追溯的XLSX风险迁移报告。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add liusite66-dev/compare-contract-risk-migration-skill

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

/compare-contract-risk-migration-skill

Compare 2–5 versions of Chinese general-purpose commercial contracts that the user has explicitly ordered, and generate a traceable risk migration XLSX.

Safety Gate

Before reading any contract, state whether the current environment is local or a cloud-based agent. In a cloud environment, you must explicitly inform the user that the contract will be read by the cloud model and obtain their confirmation for this session. Do not preview, convert, or hash the contract without confirmation. It is recommended to first redact trade secrets and personal information.

Workflow

  1. Obtain from the user the explicit version order, analysis stance (buyer/seller/neutral), contract name, and attachment affiliation. Do not sort by filename or modification time on behalf of the user.
  2. Prompt the user to connect to legally authorized databases such as PKULaw, Wolters Kluwer (Wolters Kluwer), Yuandian Legal Intelligence, or other regulatory database MCP/API. If none is provided or all calls fail, use official public sources from the National People's Congress, the State Council, the Supreme People's Court, regulatory agencies, and similar bodies.
  3. Run python3 scripts/run_pipeline.py prepare .... Use version_label=file_path for each --version parameter; use --attachment version_label=file_path for attachments.
  4. Read contract-bundle.json and its temporary Markdown. Read references/analysis-schema.md for the required output contract, and read references/risk-rules.md for deterministic risk floors.
  5. First extract clauses by contract components and clause levels, then combine title, number, definition, cross-references, text similarity, and context to establish a stable clause_id. Low-confidence or multi-candidate matches must be marked as Needs manual confirmation.
  6. Identify additions, deletions, modifications, moves, splits, merges, and restorations between adjacent versions. Format-only changes are listed separately; cross-reference failures caused by renumbering are substantive risks.
  7. The risk migration status can only be: New risk, Risk increased, Risk reduced, Risk transferred, Risk eliminated, Risk continued, Risk recurring, Pending confirmation. The risk level can only be: High, Medium, Low. When a deterministic rule floor is triggered, do not downgrade the level.
  8. Retrieve information only for high-risk changes, suspected mandatory regulatory issues, and matters that require determining legal effects. Read references/source-policy.md for MCP/public fallback and provenance requirements. When sources conflict, keep them in parallel and mark them as needing manual confirmation.
  9. Output modification direction and negotiation points, do not generate full replacement clauses. After generating JSON that complies with the analysis contract, run python3 scripts/run_pipeline.py report ... --cleanup.
  10. Only report to the user the output path, risk migration statistics, high-risk items, and pending matches; remind the user that the XLSX still contains trade secrets.

Boundaries

  • Applicable to general-purpose commercial contracts such as sales, services, licensing, SaaS, and NDAs.
  • For specialized contracts such as labor, investment and financing, M&A, construction, finance, and cross-border, only perform text migration and advise the user to seek specialized review.
  • Do not modify original contracts, do not generate redlined DOCX, and do not judge signature authenticity, effectiveness status, or full compliance of unchanged clauses.
  • Do not save account credentials, passwords, cookies, tokens, or MCP authentication information. Do not use model memory as a definitive legal basis.
  • If neither network nor MCP is available, continue version comparison and clearly mark the unchecked scope in the report.

Gotchas

  • MarkItDown does not guarantee stable original page numbers for PDF/DOCX; when positioning is unstable, write "page number needs manual confirmation."
  • Clause renumbering, movement, splitting, and merging cannot be judged solely by line-by-line diff.
  • The user-specified version order is the sole source of ordering; file timestamps are only recorded, not used for sorting.
  • This skill only reviews risks arising from changes; it is not equivalent to a full contract review.

相关技能