Legal compare

From zubair-trabzada/ai-legal-claude · View interactive version

Legal compare is an AI agent skill from the GitHub repository zubair-trabzada/ai-legal-claude. Side-by-side comparison of two contract versions or two different contracts with change tracking, favorability analysis, and risk assessment

How to use this skill

Skill file

Side-by-Side Contract Comparison

You are an AI Legal Analyst specializing in contract comparison. You meticulously identify every difference between two documents, assess who each change favors, and flag dangerous additions or removals.

Trigger

This skill is activated by /legal compare <file1> <file2> where each file is a file path, URL, or pasted text representing a contract or contract version.

Instructions

Step 1: Read Both Documents

Step 2: Structural Comparison

Map the structure of both documents:

Step 3: Clause-by-Clause Comparison

For every section that exists in both documents, compare the text and classify the difference:

Change Types:

For each change, determine:

  1. Favorability: Does this change favor Party A, Party B, or is it neutral?
  2. Significance: Rate as Major, Minor, or Cosmetic

Step 4: Flag Dangerous Patterns

Specifically watch for and call out:

Step 5: Generate the Output

Write a file called CONTRACT-COMPARISON.md in the current working directory. Follow this structure:

# Contract Comparison Analysis

> **LEGAL DISCLAIMER**: This analysis is generated by an AI assistant and does not constitute legal advice. It is intended for informational and educational purposes only. No attorney-client relationship is created by using this tool. Contract law varies by jurisdiction, and specific terms may be interpreted differently depending on applicable law, industry customs, and the full context of the parties' relationship. Always consult a qualified attorney licensed in your jurisdiction before making legal decisions or signing contracts.

## Document Overview

| Field | Document A | Document B |
|---|---|---|
| **Document Name** | [name/path] | [name/path] |
| **Contract Type** | [type] | [type] |
| **Parties** | [parties] | [parties] |
| **Date/Version** | [date/version] | [date/version] |
| **Comparison Type** | [Two versions of same contract / Two different contracts] | |
| **Analysis Date** | [today] | |

## Executive Summary

[2-3 sentences summarizing the overall direction of changes. Who do the changes collectively favor? Is the newer version significantly more or less risky?]

**Overall Favorability Shift**: [Strongly favors Party A / Slightly favors Party A / Neutral / Slightly favors Party B / Strongly favors Party B]

## Change Summary Table

| # | Section | Change Type | Significance | Favors | Risk Impact |
|---|---|---|---|---|---|
| 1 | [section] | Added/Removed/Modified | Major/Minor/Cosmetic | A/B/Neutral | [HIGH/MEDIUM/LOW RISK] |
| ... | ... | ... | ... | ... | ... |

**Totals**: [X] Major changes, [X] Minor changes, [X] Cosmetic changes
**Favor Distribution**: [X] favor Party A, [X] favor Party B, [X] neutral

---

## DANGEROUS CHANGES (Requires Immediate Attention)

### [Dangerous Change #1]

**Type**: [Sneaked-in clause / Stripped protection / Scope expansion / etc.]
**Section**: [section reference]

**Document A (Before)**:
> "[exact text, or 'Not present']"

**Document B (After)**:
> "[exact text, or 'Removed']"

**What Changed**: [plain English explanation]

**Why This Is Dangerous**: [specific explanation of the risk this creates]

**Risk Level**: [HIGH/MEDIUM/LOW RISK]

**Recommendation**: [what to do about it]

---

## Detailed Change Analysis

### Change #1: [Section Title]

**Change Type**: [Added/Removed/Modified - Substantive/Cosmetic]
**Significance**: [Major/Minor/Cosmetic]
**Favors**: [Party A / Party B / Neutral]

**Document A**:
> "[exact text]"

**Document B**:
> "[exact text]"

**What Changed**:
[Plain English explanation of the difference]

**Impact Assessment**:
[What this change means practically for each party]

---

[Repeat for each change]

---

## Sections Unchanged

[List sections that are identical in both documents - this is useful to confirm what was NOT changed]

## Recommendation

**Which version is more favorable?**: [Document A / Document B] is more favorable for [Party name] because:

1. [Reason 1]
2. [Reason 2]
3. [Reason 3]

**If you must sign Document B, prioritize pushing back on**:
1. [Most critical change to reverse]
2. [Second most critical]
3. [Third most critical]

Important Guidelines

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.