Introduction¶
In legal and business contract reviews, a common scenario involves multiple versions of the same contract being circulated. Email attachments, text extracted from scanned documents, and revised drafts returned by counterparties are often overlaid. Manually comparing these paragraph by paragraph is not only slow but also prone to overlooking changes in amounts, terms, or liability for breach. While general diff tools can highlight literal changes, they often lack a hierarchical distinction between “key clauses,” “general clauses,” and “formatting adjustments.” Furthermore, they are not convenient for directly generating explanations to send to the counterparty for confirmation.
Below, we introduce the SkillHub community skill: “Contract Diff Comparison” (@user_70c2f807/contract-diff-comparison). It constrains Agent behavior via a standard SKILL.md: given two contract texts, it performs alignment of additions, deletions, and modifications, provides a graded summary, and generates a draft confirmation letter if needed. The skill is marked as requires_api_key=false and does not depend on any additional API keys.
What is This¶
“Contract Diff Comparison” is an Agent Skill designed for Office Efficiency (SkillHub category office-efficiency). Its coordinates are @user_70c2f807/contract-diff-comparison, currently at version 1.0.0. It is sourced from the community and published by user_70c2f807.
In short: upload or paste the texts of the original version and the modified version. The Agent executes a paragraph-by-paragraph comparison according to the skill instructions and outputs a structured difference report. It does not provide legal consultation or judgments on the legality of clauses; it only describes text-level differences.
Official Access:
- SkillHub Page: https://www.skillhub.cn/skills/user_70c2f807/contract-diff-comparison
- API Resource Identifier: https://api.skillhub.cn/user_70c2f807/contract-diff-comparison
Core Functions¶
The following capabilities are derived from the SKILL.md instructions within the skill package, executed by the Agent step-by-step during conversation.
- Dual-Text Comparison: Aligns two texts, marking additions, deletions, and modifications at the same position; allows confirming the comparison direction (A→B or B→A).
- Grading and Classification: Divides changes into key clauses (e.g., amounts, terms, liabilities, liquidated damages, intellectual property), general clauses, and formatting adjustments (punctuation, numbering, spacing, etc.).
- Key Data Recognition: Highlights changes in fields such as amounts, dates, and percentages within the differences. Key changes may include impact descriptions (e.g., ratio changes) but do not constitute legal evaluations.
- Filtering and Statistics: Supports narrowing down results by chapter, type, or dimension (e.g., viewing only amounts and dates), and tallies the number of changes.
- Diff Confirmation Letter: When requested by the user, generates a confirmation email template to send to the counterparty based on the comparison results.
- Triggers and Boundaries: Applicable when users mention intents like contract comparison, contract differences, version comparison,
contract diff, etc.; not used for contract drafting, contract review, legal consultation, or contract signing scenarios.
Installation and Activation¶
Install SkillHub CLI¶
If the CLI is not yet installed, you can first check the version:
command -v skillhub && skillhub --version
If not installed, follow the SkillHub official installation documentation (full installation or CLI only):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
See instructions at: https://skillhub.cn/install/skillhub.md
Install This Skill¶
During installation, you must use --dir to point to the actual skills directory used by your current Agent. Otherwise, it will default to installing in ./skills/, and the Agent may not be able to load it.
skillhub install contract-diff-comparison --namespace user_70c2f807 --dir <your skills directory>
Common client skills paths (excerpted from SkillHub installation documentation; subject to your local configuration):
| Client | skills Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
Alternatively, you can hand the prompt below to an AI that supports Skill installation and have it complete the installation according to the official instructions:
Please install `@user_70c2f807/contract-diff-comparison` according to https://skillhub.cn/install/skillhub.md.
After installation, restart or refresh the Agent as required by your client to enable the skill.
Typical Usage¶
The “Quick Start” section in the skill description provides a reproducible dialogue pattern. The core is to gather the two texts first, then let the Agent execute the four-step process defined in SKILL.md (Receive Text → Diff Analysis → Grading/Classification → Output Report).
1. Initiate Comparison
User: Help me compare two contracts.
→ Agent: Please provide the content of the original and modified versions respectively.
2. Provide Dual Version Content
Paste the original and modified versions into the dialogue (or explain the correspondence of the two attachments) and indicate which is the baseline version if necessary.
3. Narrow Focus
User: Which are the changes to key clauses?
→ Filter for modifications related to amounts, terms, liabilities, liquidated damages, etc.
User: Only look at changes in amounts and dates.
→ Filter differences by specified dimensions.
4. Generate External Confirmation Materials
User: Help me generate a diff confirmation letter.
→ Generate email template based on the difference results.
The report is output in Markdown structure by default (including sections for key/general/formatting changes and comparison tables), which can be copied to Feishu Docs, Notion, or Word. The skill FAQ explains: PDFs and Word documents need to be converted to text before pasting; a single comparison is recommended to be no more than 5000 words. For super-long contracts, comparisons should be done in chapters multiple times.
Applicable Scenarios & Notes¶
Who it is for
- Legal, business, and project management professionals who need to quickly verify changes between two versions of the same contract.
- Teams already working in environments supporting Skills (like Cursor, Claude Code, Codex) who wish to drive the comparison process using unified prompts.
Limitations and Pitfalls
| Item | Description |
|---|---|
| Input Count | Must provide both the original and modified versions; comparison is impossible with only one file. |
| Legal Effect | Only describes text differences; does not replace legal review. |
| File Format | Plain text and Markdown are preferred; PDF/Word must be exported as text first. |
| Length | Single use recommended not exceeding 5000 words; otherwise, split by chapters. |
| Multiple Versions | For three or more versions, pairwise comparison is recommended (e.g., A vs B first, then B vs C). |
| Misuse | Not suitable for code diff, writing contracts from scratch, or expecting the Agent to make compliance risk rulings. |
The error handling table in the skill instructions covers scenarios such as “only one provided,” “content is identical,” “differences are too large, suspected not to be the same contract,” and “text too long.” The Agent will respond according to the prompts within the table.
Privacy-related note (from skill documentation): Uploaded content is not stored, and data is not retained after comparison; when real company names or amounts are involved, it is recommended to desensitize the data before pasting.
Conclusion¶
“Contract Diff Comparison” breaks down the comparison of two contract versions into a repeatable Agent workflow: aligning additions and deletions, layering by criticality, optional confirmation letters, and explicitly avoiding legal judgment. If you frequently verify clauses amidst multiple rounds of revisions, you can install @user_70c2f807/contract-diff-comparison on SkillHub and use fixed trigger words to launch this workflow directly.
- SkillHub: https://www.skillhub.cn/skills/user_70c2f807/contract-diff-comparison
- Coordinates:
@user_70c2f807/contract-diff-comparison, Version 1.0.0 (Community Source; page shows a rating of 100000; download count is subject to SkillHub real-time statistics. The download count recorded at the time of writing was 1865).