Legal review

From aAAaqwq/AGI-Super-Team · View interactive version

Legal review is an AI agent skill from the GitHub repository aAAaqwq/AGI-Super-Team. Review legal documents (NDA, contracts, agreements) for sensitive clauses, risks, and red flags

How to use this skill

Skill file

Legal Document Review

Analyze legal documents for sensitive clauses, risks, unfavorable terms, and red flags. Provides structured review with risk assessment and recommendations.

When to use

Dependencies

How to execute

Step 1: Extract document text

If the document is a DOCX file, extract text:

from docx import Document
doc = Document('path/to/file.docx')
# Handle both paragraph-based and table-based layouts
text_parts = []
for p in doc.paragraphs:
    if p.text.strip():
        text_parts.append(p.text)
for table in doc.tables:
    for row in table.rows:
        for cell in row.cells:
            if cell.text.strip():
                text_parts.append(cell.text)

If PDF, use the Read tool directly (it supports PDFs).

Step 2: Analyze document

Perform structured analysis covering ALL of the following areas:

A. Document Overview
B. Sensitive Clauses Detection

Scan for and flag these categories with severity levels:

| Category | What to look for | Severity |

|----------|-----------------|----------|

| Non-compete / Non-solicitation | Restrictions on working with competitors, hiring employees | HIGH |

| Unlimited liability | No cap on damages, indemnification without limits | HIGH |

| Unilateral termination | One party can terminate freely, other cannot | HIGH |

| IP assignment | Broad IP transfer clauses, work-for-hire beyond scope | HIGH |

| Penalty clauses | Financial penalties for breach, liquidated damages | HIGH |

| Governing law mismatch | Law of unfamiliar jurisdiction, unfavorable forum | MEDIUM |

| Confidentiality duration | Unusually long (>5 years) or perpetual obligations | MEDIUM |

| Auto-renewal / Lock-in | Automatic extension, difficult exit terms | MEDIUM |

| Data processing | Personal data obligations, GDPR/privacy compliance | MEDIUM |

| Audit rights | Right to audit your systems, records, premises | MEDIUM |

| Force majeure | Missing or one-sided force majeure clause | LOW |

| Notice requirements | Unreasonable notice periods, specific delivery methods | LOW |

| Amendment process | Unilateral right to modify terms | MEDIUM |

| Waiver of jury trial | Waiving right to jury trial or class action | LOW |

| Survival clauses | Obligations that survive termination and their duration | LOW |

C. Asymmetry Analysis

Check whether obligations are mutual or one-sided:

D. Missing Clauses

Flag important clauses that are ABSENT:

E. Language Red Flags

Flag vague or overly broad language:

Step 3: Generate report

Output a structured report:

## LEGAL DOCUMENT REVIEW

### Document Info
- Type: [NDA/Contract/etc.]
- Parties: [Party A] <-> [Party B]
- Date: [effective date]
- Duration: [term]
- Governing Law: [jurisdiction]

### Risk Summary
- Overall Risk Level: [LOW / MEDIUM / HIGH / CRITICAL]
- HIGH risks found: [count]
- MEDIUM risks found: [count]

### Sensitive Clauses Found

#### [HIGH] [Category Name]
- Clause: [quote or reference]
- Risk: [what this means for you]
- Recommendation: [what to negotiate or change]

#### [MEDIUM] [Category Name]
...

### Asymmetry Issues
- [list of imbalanced terms]

### Missing Protections
- [list of absent but recommended clauses]

### Recommendations
1. [Prioritized list of changes to request before signing]

Parameters

| Parameter | Description | Default |

|-----------|-------------|---------|

| file_path | Path to the document (DOCX, PDF, or TXT) | required |

| party | Which party you represent (for perspective) | auto-detect from context |

| focus | Specific areas to focus on (e.g., "IP", "liability") | all areas |

Examples

Example 1: Review NDA before signing

User: "Review this NDA from Client G"

-> Extract DOCX, run full analysis, output structured report

Example 2: Focus on specific concerns

User: "Check this contract for IP risks"

-> Run analysis with focus on IP assignment, work-for-hire, licensing clauses

Limitations

Related skills

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.