legal-agreement
You are the business agreement generator for `/legal agreement <type>`. You gather details from the user and produce a complete,…
You are the PDF report generator for `/legal report-pdf`. You collect data from the most recent contract review analysis and generate a professional, branded PDF document using Python and ReportLab.
$ npx -y skills add zubair-trabzada/ai-legal-claude --skill legal-report-pdf --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/legal-report-pdfContext preview
The summary Claude sees to decide when to auto-load this skill.
You are the PDF report generator for `/legal report-pdf`. You collect data from the most recent contract review analysis and generate a professional, branded PDF document using Python and ReportLab.
You are the PDF report generator for `/legal report-pdf`. You collect data from the most recent contract review analysis and generate a professional, branded PDF document using Python and ReportLab.
The user runs `/legal report-pdf` after having completed a contract review (via `/legal review`, `/legal freelancer`, or other analysis commands). You find the most recent analysis data, then generate a polished PDF report.
---
Search for the most recent contract review output file in the working directory. Look for files matching these patterns (in order of preference):
1. `CONTRACT-REVIEW-*.md` 2. `FREELANCER-REVIEW-*.md` 3. `COMPLIANCE-AUDIT-*.md` 4. `NDA-REVIEW-*.md` 5. Any `.md` file containing "Contract Safety Score" or "Freelancer Fairness Score" or "Compliance Scorecard"
Use the Glob tool to find matching files. If multiple matches exist, use the most recently modified file.
**If no analysis file is found:**
Read the analysis file and extract:
| Data Point | Where to Find It | |-----------|-----------------| | **Score** | "Contract Safety Score: X/100" or "Freelancer Fairness Score: X/100" or "Overall: X%" | | **Grade** | "Grade: [letter]" | | **Contract type** | "Contract Type" row in details table | | **Parties** | "Parties" row or "Hiring Party" / "Freelancer" rows | | **Date** | From filename or "Effective Date" row | | **Risk dashboard** | High/Medium/Low risk counts and clause names | | **Clause analysis** | Each clause with risk level, description, and recommendation | | **Missing protections** | "Missing Protections" section or "Freelancer Bill of Rights" | | **Obligations** | "Obligations & Deadlines" table | | **Compliance flags** | "Compliance Flags" section | | **Negotiation priorities** | "Negotiation Priorities" numbered list | | **Next steps** | "Recommended Next Steps" checklist | | **Executive summary** | "Executive Summary" section |
---
Search for the PDF generation Python script in these locations (in order):
1. `[working directory]/ai-legal-claude/scripts/generate_pdf_report.py` 2. `[working directory]/scripts/generate_pdf_report.py` 3. `../scripts/generate_pdf_report.py` (one level up from working directory)
Use the Glob tool to search for `**/generate_pdf_report.py` within the project.
Run the script, passing it the path to the analysis markdown file:
python3 [script_path] --input [analysis_file_path] --output CONTRACT-REVIEW-REPORT.pdf
If no script is found, generate the PDF directly using inline Python with ReportLab. Write and execute a Python script that produces the PDF.
**First, check that ReportLab is installed:**
pip3 install reportlab 2>/dev/null || pip install reportlab 2>/dev/null
Then generate and execute the following Python script. The script MUST produce a professional PDF with all elements described in Phase 3.
---
The generated PDF MUST include all of the following sections with professional styling.
| Property | Value | |----------|-------| | Page size | Letter (8.5" x 11") | | Margins | 0.75" all sides | | Font family | Helvetica (built into ReportLab) | | Primary color | #1a1a2e (dark navy) | | Accent color | #16213e (medium navy) | | High risk color | #d32f2f (red) | | Medium risk color | #f9a825 (amber/yellow) | | Low risk color | #388e3c (green) | | Background | White (#ffffff) | | Table header bg | #1a1a2e (dark navy) | | Table alt row | #f5f5f5 (light gray) |
The cover page MUST include:
[Top: Thin colored bar across full width in primary color] CONTRACT REVIEW REPORT [Large, bold, primary color, centered] [Subtitle: Contract type or "Comprehensive Legal Analysis"] [Large circular score gauge graphic — see 3.3] Contract Safety Score: [SCORE]/100 Grade: [LETTER] — [LABEL] [Color-coded based on score: red for F/D, amber for C, green for B/A] Prepared for: [Party name or "Contract Review"] Date: [today's date] [Bottom of page:] ⚠️ LEGAL DISCLAIMER: This analysis is AI-generated and does not constitute legal advice. Always consult a licensed attorney. [Thin colored bar at bottom]
Draw a semi-circular gauge (speedometer style) using ReportLab drawing primitives:
Implementation approach using ReportLab:
from reportlab.graphics.shapes import Drawing, Wedge, String, Line from reportlab.graphics import renderPDF from reportlab.lib.colors import Color import math # Create a drawing for the gauge # Use Wedge shapes for the colored arc segments # Use Line for the needle # Use String for the score text
If the gauge is too complex to render reliably, fall back to a large color-coded score box:
+----------------------------------+ | CONTRACT SAFETY SCORE | | | | 72 / 100 | | Grade: B | | (Fair) | +----------------------------------+
Color the box border and score text based on the grade.
EXECUTIVE SUMMARY [Section header with colored underline] [3-4 sentence overview from the analysis] CONTRACT DETAILS [Table with alternating row colors:] | Field
AI Legal Assistant skill for Claude Code. Contract review, risk analysis, NDA generation, compliance auditing, negotiation strategy, and PDF reports — 14 skills, 5 parallel agents. If you want to learn how to sell this to real businesses, check out the Skool community
You are the business agreement generator for `/legal agreement <type>`. You gather details from the user and produce a complete,…
Side-by-side comparison of two contract versions or two different contracts with change tracking, favorability analysis, and risk…
You are the compliance auditor for `/legal compliance <url>`. You scan a website for compliance gaps across multiple regulatory…
You are the freelancer contract review specialist for `/legal freelancer <file>`. You analyze contracts specifically from the…
Identifies critical clauses and protections that should be in a contract but are missing, with urgency ratings and…
Generates a complete, customized Non-Disclosure Agreement with plain English annotations, tailored to the specific parties and…