一键导入
legal-contract
Draft and review legal documents like NDAs, contracts, LOIs, asset purchase agreements, and lease agreements with plain-language explanations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Draft and review legal documents like NDAs, contracts, LOIs, asset purchase agreements, and lease agreements with plain-language explanations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design static ad creatives for social media and display advertising campaigns.
Source and evaluate candidates with job analysis, search strategies, specific candidate profiles, outreach templates, CV screening, and Gmail-based candidate communication.
Find relevant companies and leads for B2B sales with ICP definition and qualification frameworks.
Draft emails, manage calendar scheduling, prepare meeting agendas, track tasks, manage contacts, coordinate travel, and organize productivity
Create brand identity kits with color palettes, typography, logo concepts, brand naming, and brand guidelines.
Perform competitive market analysis with feature comparisons, positioning, and strategic recommendations.
| name | legal-contract |
| description | Draft and review legal documents like NDAs, contracts, LOIs, asset purchase agreements, and lease agreements with plain-language explanations. |
Draft and review common legal documents including NDAs, service agreements, freelancer contracts, lease reviews, Letters of Intent, and M&A transaction documents. Provide plain-language explanations and flag potential issues.
IMPORTANT DISCLAIMER: This provides general information and templates only. It does NOT constitute legal advice. Always consult a qualified attorney for legal matters.
Never draft from scratch. Start from committee-vetted open-source agreements released under CC BY 4.0:
| Source | Documents | Style | Get it |
|---|---|---|---|
| Bonterms | Mutual NDA, Cloud Terms (SaaS), SLA, DPA, PSA, AI Standard Clauses | US; "cover page + standard terms" | github.com/Bonterms |
| Common Paper | Mutual NDA, Cloud Service Agreement, DPA, Design Partner Agreement | US; standards committee of 40+ attorneys | commonpaper.com/standards |
| oneNDA | NDA (777 words), oneDPA | UK/EU; strict variable-only edits | onenda.org |
Workflow: webFetch("https://bonterms.com/forms/mutual-nda/") → extract the standard terms → build a cover page with the user's deal-specific variables (parties, effective date, term, governing law, jurisdiction). Don't modify the body; that's the whole point of standards.
Note: These libraries cover NDAs and SaaS/service agreements well, but do not include M&A documents (LOIs, term sheets, purchase agreements). For those document types, draft using the standard clause structures in the "M&A / Transaction Documents" section below.
When a user needs documents for buying/selling a business, these are the common document types and their standard clause structures:
Standard sections for an LOI:
Key variables to collect from user: buyer name, seller/target name, purchase price, deal structure (asset vs. stock), due diligence period, exclusivity period, closing timeline, earnout terms (if any).
When drafting an NDA for a specific transaction (vs. a general-purpose NDA), include these additional elements:
Standard NDA sections: definition of confidential information, exclusions, receiving party obligations, no license/warranty, return/destruction, term (typically 2 years), remedies (injunctive relief), governing law, miscellaneous (entire agreement, amendments, assignment, severability, waiver, counterparts, notices).
When a transaction requires multiple related documents (e.g., LOI + NDA):
Privacy Policies and Terms of Service are among the most common legal documents a web app needs. They are not contracts between two parties — they are public-facing declarations. Treat them as a separate document type from the contract/NDA/LOI workflow.
For every integration the app uses, include a line in the Privacy Policy. Format:
- **[Provider] ([function]):** [What they receive and why]. [Link to their privacy policy if possible.]
Example:
- **Neon (base de datos):** almacenamiento seguro de sus datos financieros en servidores PostgreSQL.
- **Google Gemini (IA):** genera categorías y análisis. Solo recibe descripciones de transacciones; nunca datos personales identificables.
- **Stripe (pagos):** procesa pagos con tarjeta. NiDO no almacena datos de tarjetas.
- **Replit Auth (autenticación):** gestiona el inicio de sesión vía Google/GitHub.
If the app uses analytics, advertising pixels, or session recording (Hotjar, FullStory, etc.), these MUST be disclosed and typically require explicit consent in GDPR jurisdictions.
For web apps, the best delivery format for Privacy Policy and Terms of Service is routed pages within the app itself, not PDFs or DOCX files. This is the standard for all modern SaaS products.
Pattern:
client/src/pages/Privacy.tsx and client/src/pages/Terms.tsxAppContent:function AppContent() {
const { isLoading, isAuthenticated } = useAuth();
const [location] = useLocation();
// Public legal pages — always accessible, no auth required
if (location === "/privacidad") return <Privacy />;
if (location === "/terminos") return <Terms />;
// Auth guard below
if (isLoading) return <LoadingScreen />;
return isAuthenticated ? <AuthenticatedLayout /> : <Landing />;
}
Page layout pattern:
max-w-3xl mx-auto prose layout, text-sm leading-relaxedAfter creating the pages, always update the footer links in the landing page or marketing page. Footer links that point to href="#" are broken. Replace with href="/privacidad" and href="/terminos", and change the "Contact" link to mailto: rather than another dead hash.
Consistency check after any company name change: If the user changes the legal entity name, search ALL files — not just the legal pages. Invoice templates, billing pages, and email footers often also contain the company name and will need updating too.
Every rendered legal page should display a visible disclaimer. Do not only warn the user in chat — put it on the page itself:
<div className="bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-800 rounded-md px-4 py-3 mb-10 text-sm text-amber-800 dark:text-amber-300">
Este documento es una plantilla informativa y no constituye asesoramiento legal.
Consulte un abogado calificado para asuntos legales específicos.
</div>
When reviewing, search the document text for these exact phrases — each is a known risk pattern:
| Phrase | Why it's dangerous | Suggested fix |
|---|---|---|
"any and all claims" | Unlimited indemnity scope | "claims arising directly from [Party]'s breach of Section X" |
"indemnify, defend, and hold harmless" | "Hold harmless" blocks your counterclaims even if they caused the loss | Strike "and hold harmless"; keep "indemnify and defend" |
"sole discretion" / "absolute discretion" | One party can act arbitrarily (block settlements, reject deliverables) | "consent not to be unreasonably withheld, conditioned, or delayed" |
"including but not limited to" in IP assignment | Open-ended IP grab beyond deliverables | Enumerate specific deliverables; add "excluding pre-existing IP" |
| No liability cap stated | Courts default to unlimited liability | "Aggregate liability capped at fees paid in the 12 months preceding the claim" |
"time is of the essence" | Any delay = material breach | Delete, or limit to payment obligations only |
| Indemnity carved out of liability cap | Your cap doesn't protect you where exposure is highest | "Indemnification obligations are subject to the cap in Section X" |
| Auto-renewal with <30-day opt-out window | Easy to miss; locked in another term | 60–90 day notice window; email notice permitted |
"perpetual" + "irrevocable" license | Can never be revoked even after breach | Term-limited; terminable on material breach |
Indemnity forms (escalating risk): Limited = you cover only your own negligence. Intermediate = everything except their sole negligence. Broad = you cover losses even when caused entirely by them. Flag intermediate and broad as Critical.
AI contract tools run a fixed checklist per document type. For a Service Agreement run these checks and grade each Pass/Flag/Missing:
For a Letter of Intent run these checks:
# Contract Review: [Document Type]
**NOT LEGAL ADVICE — for informational purposes only. Consult an attorney before signing.**
## Summary
[2–3 sentences: what this is, who it favors, biggest concern]
## Critical — Do Not Sign Without Addressing
1. **[Clause §X.Y]**: [quote the exact language]
- **Risk**: [plain English]
- **Suggested redline**: "[replacement text]"
## Warnings — Negotiate If You Have Leverage
## Notes — Standard But Be Aware
## Missing Protections
[clauses that should be here but aren't — e.g., no liability cap, no cure period]
## Overall: [Fair / Favors Counterparty / Consult Attorney Before Signing]
Every drafted contract MUST be delivered as both a PDF and a DOCX file. Clients need PDF for signing and DOCX for redlining — always provide both.
Build the contract as a React web artifact first (source of truth for layout), then export:
PDF via Puppeteer:
Install puppeteer-core in the scripts package: pnpm --filter @workspace/scripts add puppeteer-core
// scripts/src/generate-contract.ts
import puppeteer from 'puppeteer-core';
// Find Chromium — pick the latest version from the list:
// ls /nix/store/*chromium*/bin/chromium | sort -V | tail -1
const CHROMIUM_PATH = "/nix/store/FIND_LATEST_PATH/bin/chromium";
// Use the artifact's actual URL, not localhost
const CONTRACT_URL = `https://${process.env.REPLIT_DEV_DOMAIN}/ARTIFACT-ROUTE`;
const browser = await puppeteer.launch({
executablePath: CHROMIUM_PATH,
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
const page = await browser.newPage();
await page.setViewport({ width: 816, height: 1056 }); // Match page container dimensions
await page.goto(CONTRACT_URL, { waitUntil: 'networkidle0' });
// IMPORTANT: Set document.title for correct PDF metadata title.
// Without this, the PDF viewer title bar shows the HTML <title> from index.html,
// which may be wrong when generating multiple documents from the same app.
await page.evaluate(() => { document.title = "Your Document Title Here"; });
await page.pdf({
path: 'contract.pdf',
format: 'Letter',
printBackground: true,
// IMPORTANT: Use zero margins — the page containers already include internal padding.
// Non-zero Puppeteer margins + fixed-height containers = blank overflow pages.
margin: { top: '0', bottom: '0', left: '0', right: '0' },
});
await browser.close();
Add a script entry in scripts/package.json: "generate-contract": "tsx ./src/generate-contract.ts"
Run via: pnpm --filter @workspace/scripts run generate-contract
DOCX via python-docx:
Python may not be available via pip in the Replit environment. Use nix-shell to get python-docx:
nix-shell -p python3Packages.python-docx --run "python3 scripts/src/generate-contract.py"
# scripts/src/generate-contract.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
# Set default font
style = doc.styles['Normal']
font = style.font
font.name = 'Times New Roman'
font.size = Pt(12)
# Set margins
for section in doc.sections:
section.top_margin = Inches(1)
section.bottom_margin = Inches(1)
section.left_margin = Inches(1.25)
section.right_margin = Inches(1.25)
# Title
title = doc.add_paragraph()
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = title.add_run('DOCUMENT TITLE')
run.bold = True
run.font.size = Pt(18)
# Preamble
doc.add_paragraph(
'This Agreement is entered into as of [DATE] by and between:'
)
# Parties table
table = doc.add_table(rows=1, cols=2)
table.style = 'Table Grid'
# ... populate with party details
# Sections with numbered clauses
heading = doc.add_paragraph()
run = heading.add_run('1. Section Title')
run.bold = True
doc.add_paragraph('Section body text...')
# Signature block
sig_table = doc.add_table(rows=5, cols=2)
# Row 0: labels (BUYER / SELLER)
# Rows 1-4: Signature, Printed Name, Title, Date lines
doc.save('contract.docx')
Use fixed-height page containers that map 1:1 to physical letter pages. This ensures content stays within page boundaries on screen and in PDF output.
Page container constants (letter size at 96 DPI):
PAGE_W = "816px" (8.5 inches)PAGE_H = "1056px" (11 inches)48px top/bottom, 72px left/rightPage container component pattern:
<div
className="page-container mx-auto bg-white shadow-lg print:shadow-none mb-8 print:mb-0 flex flex-col overflow-hidden"
style={{
width: PAGE_W,
height: PAGE_H,
pageBreakAfter: pageNum < TOTAL_PAGES ? "always" : undefined,
breakAfter: pageNum < TOTAL_PAGES ? "page" : undefined,
}}
>
{/* Page header with "Page X of Y" */}
{/* Content area with internal padding */}
</div>
Critical CSS for print/PDF — add to your global stylesheet:
@page {
size: letter;
margin: 0;
}
@media print {
html, body {
margin: 0 !important;
padding: 0 !important;
background: white !important;
}
.page-container {
box-shadow: none !important;
margin: 0 !important;
}
}
Why blank pages happen: If Puppeteer adds its own margins (e.g., margin: { top: "0.5in" }) on top of 1056px containers, each container exceeds the physical page height. The overflow creates a blank page before the next breakAfter: "page" fires. The fix: always use margin: { top: "0", bottom: "0", left: "0", right: "0" } in Puppeteer and @page { margin: 0 } in CSS, since the page containers already include their own internal padding.
Do NOT override height: auto in print media — removing the fixed height lets containers expand beyond one page, defeating the 1:1 page mapping. Keep the fixed height; the CSS page breaks handle pagination.
Outer wrapper must neutralize screen-only styles for print:
<div className="min-h-screen bg-gray-100 py-8 px-4 print:bg-white print:py-0 print:px-0 print:min-h-0">
Viewport must match page width in Puppeteer: page.setViewport({ width: 816, height: 1056 }) so content renders at the correct scale.
Content balancing: Use breakInside: "avoid" on sections and distribute content across pages so no page overflows. Check the rendered layout in the browser at 816px width before generating PDFs.
For reviews (not drafting), output the review analysis directly as text using the Review Output Format above. Do not generate PDF/DOCX for reviews — the review is commentary, not a document.
When generating multiple documents for the same transaction (e.g., LOI + NDA), use a single React artifact with separate routes for each document:
// App.tsx
<Route path="/" component={LOIDocument} />
<Route path="/nda" component={NDADocument} />
Then generate separate PDF/DOCX files for each document by pointing Puppeteer at each route and running a separate python-docx script per document. Present all files together so the user receives the complete package.
IMPORTANT: Since all routes share the same index.html, the HTML <title> tag applies to every document. Each PDF generation script must call page.evaluate(() => { document.title = "Correct Document Title"; }) before page.pdf() to set the correct PDF metadata title. Otherwise the PDF viewer's title bar will show the wrong document name.