Contract Review
Overview
Analyze legal contracts and agreements to identify risks, missing clauses, unfavorable terms, and compliance issues. This skill reads contract documents, categorizes clauses, flags potential problems, and produces a structured risk report with actionable recommendations.
Instructions
When a user asks you to review, analyze, or check a contract, follow these steps:
Step 1: Load and parse the contract
Read the contract file. Supported formats include PDF, DOCX, TXT, and Markdown.
For PDF files, extract text using pdfplumber:
import pdfplumber
def load_contract(pdf_path):
full_text = ""
with pdfplumber.open(pdf_path) as pdf:
for page in pdf.pages:
text = page.extract_text()
if text:
full_text += text + "\n\n"
return full_text
For DOCX files, use python-docx:
from docx import Document
def load_docx(docx_path):
doc = Document(docx_path)
return "\n\n".join([p.text for p in doc.paragraphs if p.text.strip()])
Step 2: Identify the contract type
Determine the contract type from the content:
- Employment contract: Look for salary, benefits, termination, non-compete clauses
- NDA / Confidentiality agreement: Look for confidential information definitions, duration, exceptions
- Service agreement / SaaS: Look for SLA, liability caps, data handling, termination for convenience
- Vendor / Supplier agreement: Look for delivery terms, payment terms, warranties, indemnification
Step 3: Extract and categorize key clauses
Identify and extract these critical sections:
- Parties: Who is involved, are they correctly identified
- Term and termination: Duration, renewal terms, termination conditions, notice periods
- Payment terms: Amounts, schedule, late payment penalties, currency
- Liability and indemnification: Liability caps, mutual vs one-sided indemnification
- Confidentiality: Scope of confidential information, duration, exceptions
- Non-compete / Non-solicitation: Geographic scope, duration, reasonableness
- Intellectual property: Ownership, assignment, licensing rights
- Dispute resolution: Jurisdiction, arbitration vs litigation, governing law
- Force majeure: Events covered, notice requirements
- Data protection: GDPR compliance, data processing terms, breach notification
Step 4: Perform risk analysis
For each clause, assess:
- Risk level: High, Medium, or Low
- Issue: What is problematic or missing
- Recommendation: Specific change or addition to suggest
Flag these common red flags:
- One-sided indemnification without caps
- Automatic renewal without opt-out notice period
- Non-compete clauses exceeding 12 months or unreasonable geographic scope
- Missing limitation of liability
- Vague termination conditions
- No data protection or breach notification terms
- Missing force majeure clause
- Unclear IP ownership assignment
Step 5: Generate the review report
Produce a structured report with:
- Contract summary (type, parties, effective date, term)
- Clause-by-clause analysis with risk ratings
- Missing clauses that should be added
- Top recommendations ranked by priority
- Overall risk score (Low / Medium / High / Critical)
Examples
Example 1: Review an employment contract
User request: "Review my employment contract at ~/contracts/offer.pdf for any red flags"
Actions taken:
- Extract text from offer.pdf
- Identify as employment contract
- Analyze each clause for risks
- Flag issues found
Output:
CONTRACT REVIEW REPORT
======================
Type: Employment Contract
Parties: Jane Doe (Employee) <-> Acme Corp (Employer)
Term: Indefinite, starting March 1, 2025
RISK ANALYSIS:
-------------------------------------------------
| Clause | Risk | Issue |
|---------------------|--------|------------------------------------------|
| Non-compete | HIGH | 24-month duration, nationwide scope |
| Termination | MEDIUM | No severance terms specified |
| IP Assignment | HIGH | Covers all work, including personal projects |
| Benefits | LOW | Standard package, clearly defined |
| Confidentiality | LOW | Reasonable scope and 2-year duration |
MISSING CLAUSES:
- No remote work policy or location flexibility terms
- No bonus or equity vesting schedule details
TOP RECOMMENDATIONS:
1. Negotiate non-compete down to 6-12 months with limited geography
2. Add carve-out for personal projects in IP assignment clause
3. Request explicit severance terms (e.g., 2 weeks per year of service)
OVERALL RISK: HIGH - Address non-compete and IP clauses before signing
Example 2: Audit a SaaS service agreement
User request: "Check this vendor agreement for our SaaS tool. Flag anything we should push back on."
Actions taken:
- Parse the service agreement
- Check for standard SaaS contract terms
- Compare against best practices for data protection and SLAs
Output:
CONTRACT REVIEW REPORT
======================
Type: SaaS Service Agreement
Parties: Your Company <-> CloudTool Inc.
Term: 12 months, auto-renews
RISK ANALYSIS:
-------------------------------------------------
| Clause | Risk | Issue |
|---------------------|----------|----------------------------------------|
| SLA / Uptime | HIGH | No uptime guarantee or credits defined |
| Data Processing | HIGH | No DPA or GDPR compliance language |
| Liability Cap | MEDIUM | Capped at 1 month of fees (very low) |
| Termination | MEDIUM | 90-day notice required to cancel |
| Auto-renewal | LOW | 30-day opt-out window before renewal |
TOP RECOMMENDATIONS:
1. Require a 99.9% uptime SLA with service credits
2. Add a Data Processing Agreement as an appendix
3. Negotiate liability cap to at least 12 months of fees
4. Reduce cancellation notice to 30 days
Guidelines
- Always specify that this is an AI-assisted review and not legal advice. Recommend the user consult a lawyer for final decisions.
- Present risks in order of severity (High first) so the most important issues are seen immediately.
- When clauses are ambiguous, flag them as risks rather than assuming favorable interpretation.
- For multi-party contracts, analyze obligations and risks from the perspective of the user's party.
- If the contract references external documents (exhibits, schedules, addenda), note which ones are missing from the review.
- Compare terms against standard market practices for the contract type when assessing reasonableness.
- Keep the report concise. Use tables for clause analysis and bullet points for recommendations.
1---2name: contract-review3description: Analyze contracts for risks, check completeness, and provide actionable recommendations. Use when a user asks to review a contract, check an agreement for red flags, analyze contract terms, find risky clauses, review an NDA, evaluate a service agreement, or audit employment contract terms. Supports employment contracts, NDAs, service agreements, and vendor contracts.4license: Apache-2.05---67# Contract Review89## Overview1011Analyze legal contracts and agreements to identify risks, missing clauses, unfavorable terms, and compliance issues. This skill reads contract documents, categorizes clauses, flags potential problems, and produces a structured risk report with actionable recommendations.1213## Instructions1415When a user asks you to review, analyze, or check a contract, follow these steps:1617### Step 1: Load and parse the contract1819Read the contract file. Supported formats include PDF, DOCX, TXT, and Markdown.2021For PDF files, extract text using pdfplumber:2223```python24import pdfplumber2526def load_contract(pdf_path):27 full_text = ""28 with pdfplumber.open(pdf_path) as pdf:29 for page in pdf.pages:30 text = page.extract_text()31 if text:32 full_text += text + "\n\n"33 return full_text34```3536For DOCX files, use python-docx:3738```python39from docx import Document4041def load_docx(docx_path):42 doc = Document(docx_path)43 return "\n\n".join([p.text for p in doc.paragraphs if p.text.strip()])44```4546### Step 2: Identify the contract type4748Determine the contract type from the content:49- **Employment contract**: Look for salary, benefits, termination, non-compete clauses50- **NDA / Confidentiality agreement**: Look for confidential information definitions, duration, exceptions51- **Service agreement / SaaS**: Look for SLA, liability caps, data handling, termination for convenience52- **Vendor / Supplier agreement**: Look for delivery terms, payment terms, warranties, indemnification5354### Step 3: Extract and categorize key clauses5556Identify and extract these critical sections:571. **Parties**: Who is involved, are they correctly identified582. **Term and termination**: Duration, renewal terms, termination conditions, notice periods593. **Payment terms**: Amounts, schedule, late payment penalties, currency604. **Liability and indemnification**: Liability caps, mutual vs one-sided indemnification615. **Confidentiality**: Scope of confidential information, duration, exceptions626. **Non-compete / Non-solicitation**: Geographic scope, duration, reasonableness637. **Intellectual property**: Ownership, assignment, licensing rights648. **Dispute resolution**: Jurisdiction, arbitration vs litigation, governing law659. **Force majeure**: Events covered, notice requirements6610. **Data protection**: GDPR compliance, data processing terms, breach notification6768### Step 4: Perform risk analysis6970For each clause, assess:71- **Risk level**: High, Medium, or Low72- **Issue**: What is problematic or missing73- **Recommendation**: Specific change or addition to suggest7475Flag these common red flags:76- One-sided indemnification without caps77- Automatic renewal without opt-out notice period78- Non-compete clauses exceeding 12 months or unreasonable geographic scope79- Missing limitation of liability80- Vague termination conditions81- No data protection or breach notification terms82- Missing force majeure clause83- Unclear IP ownership assignment8485### Step 5: Generate the review report8687Produce a structured report with:881. Contract summary (type, parties, effective date, term)892. Clause-by-clause analysis with risk ratings903. Missing clauses that should be added914. Top recommendations ranked by priority925. Overall risk score (Low / Medium / High / Critical)9394## Examples9596### Example 1: Review an employment contract9798**User request:** "Review my employment contract at ~/contracts/offer.pdf for any red flags"99100**Actions taken:**1011. Extract text from offer.pdf1022. Identify as employment contract1033. Analyze each clause for risks1044. Flag issues found105106**Output:**107```108CONTRACT REVIEW REPORT109======================110Type: Employment Contract111Parties: Jane Doe (Employee) <-> Acme Corp (Employer)112Term: Indefinite, starting March 1, 2025113114RISK ANALYSIS:115-------------------------------------------------116| Clause | Risk | Issue |117|---------------------|--------|------------------------------------------|118| Non-compete | HIGH | 24-month duration, nationwide scope |119| Termination | MEDIUM | No severance terms specified |120| IP Assignment | HIGH | Covers all work, including personal projects |121| Benefits | LOW | Standard package, clearly defined |122| Confidentiality | LOW | Reasonable scope and 2-year duration |123124MISSING CLAUSES:125- No remote work policy or location flexibility terms126- No bonus or equity vesting schedule details127128TOP RECOMMENDATIONS:1291. Negotiate non-compete down to 6-12 months with limited geography1302. Add carve-out for personal projects in IP assignment clause1313. Request explicit severance terms (e.g., 2 weeks per year of service)132133OVERALL RISK: HIGH - Address non-compete and IP clauses before signing134```135136### Example 2: Audit a SaaS service agreement137138**User request:** "Check this vendor agreement for our SaaS tool. Flag anything we should push back on."139140**Actions taken:**1411. Parse the service agreement1422. Check for standard SaaS contract terms1433. Compare against best practices for data protection and SLAs144145**Output:**146```147CONTRACT REVIEW REPORT148======================149Type: SaaS Service Agreement150Parties: Your Company <-> CloudTool Inc.151Term: 12 months, auto-renews152153RISK ANALYSIS:154-------------------------------------------------155| Clause | Risk | Issue |156|---------------------|----------|----------------------------------------|157| SLA / Uptime | HIGH | No uptime guarantee or credits defined |158| Data Processing | HIGH | No DPA or GDPR compliance language |159| Liability Cap | MEDIUM | Capped at 1 month of fees (very low) |160| Termination | MEDIUM | 90-day notice required to cancel |161| Auto-renewal | LOW | 30-day opt-out window before renewal |162163TOP RECOMMENDATIONS:1641. Require a 99.9% uptime SLA with service credits1652. Add a Data Processing Agreement as an appendix1663. Negotiate liability cap to at least 12 months of fees1674. Reduce cancellation notice to 30 days168```169170## Guidelines171172- Always specify that this is an AI-assisted review and not legal advice. Recommend the user consult a lawyer for final decisions.173- Present risks in order of severity (High first) so the most important issues are seen immediately.174- When clauses are ambiguous, flag them as risks rather than assuming favorable interpretation.175- For multi-party contracts, analyze obligations and risks from the perspective of the user's party.176- If the contract references external documents (exhibits, schedules, addenda), note which ones are missing from the review.177- Compare terms against standard market practices for the contract type when assessing reasonableness.178- Keep the report concise. Use tables for clause analysis and bullet points for recommendations.