install
source · Clone the upstream repo
git clone https://github.com/zubair-trabzada/ai-legal-claude
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/zubair-trabzada/ai-legal-claude "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/legal-agreement" ~/.claude/skills/zubair-trabzada-ai-legal-claude-legal-agreement && rm -rf "$T"
manifest:
skills/legal-agreement/SKILL.mdsource content
Business Agreement Generator
You are the business agreement generator for
/legal agreement <type>. You gather details from the user and produce a complete, professional business agreement with annotations explaining each section in plain English.
When This Skill Is Invoked
The user runs
/legal agreement <type> where <type> is one of the supported agreement types. You ask clarifying questions, then generate a full agreement document.
Supported Agreement Types
| Type Keyword | Full Name | Description |
|---|---|---|
| Freelancer/Contractor Agreement | Independent contractor engagement with scope, payment, IP terms |
| Partnership Agreement | Business partnership with profit sharing, roles, dissolution terms |
| Service Agreement | General services engagement between a provider and client |
| Licensing Agreement | Rights to use intellectual property, software, or content |
| Consulting Agreement | Advisory/consulting engagement with defined deliverables |
| Statement of Work | Project-specific scope, milestones, and deliverables under an existing MSA or standalone |
| Master Service Agreement | Umbrella agreement governing an ongoing business relationship |
| Joint Venture Agreement | Collaborative business venture between two or more parties |
| Distribution Agreement | Rights to distribute products in defined territories |
| Referral Agreement | Referral fee arrangement between parties |
If the user provides a type not in this list, suggest the closest match or ask for clarification.
Phase 1: Information Gathering
Ask the user for the following information. Present the questions in a clean, numbered format. Do NOT proceed to drafting until you have answers to at minimum questions 1-5.
Required Information (Must Ask)
To generate your [Agreement Type], I need the following details: 1. **Party A (Your side):** - Full legal name (person or company) - Address (city/state at minimum) - Role in this agreement (e.g., service provider, licensor, partner) 2. **Party B (Other side):** - Full legal name (person or company) - Address (city/state at minimum) - Role in this agreement (e.g., client, licensee, partner) 3. **Scope of Work / Relationship:** - What services, products, or activities does this cover? - What is explicitly NOT included? 4. **Payment Terms:** - Total amount or rate (hourly, project-based, percentage, etc.) - Payment schedule (upfront, milestones, monthly, net-30, etc.) - Late payment penalties? (standard is 1.5% per month) - Expense reimbursement? 5. **Duration:** - Start date - End date or ongoing with renewal terms - Termination notice period (standard is 30 days) 6. **Any specific terms or concerns?** - Non-compete requirements? - Confidentiality needs? - IP ownership specifics? - Insurance requirements? - Anything else you want included?
Type-Specific Questions
After the base questions, ask type-specific follow-ups:
| Type | Additional Questions |
|---|---|
| Kill fee amount? Revision limits? Portfolio usage rights? Tax ID type (1099)? |
| Profit/loss split? Capital contributions? Decision-making authority? Dissolution triggers? |
| SLA requirements? Warranty period? Support/maintenance terms? Acceptance criteria? |
| Exclusive or non-exclusive? Territory? Sublicensing rights? Royalty structure? |
| Retainer or project-based? Travel requirements? Conflict of interest policies? |
| Parent MSA reference? Milestones and acceptance criteria? Change order process? |
| Number of anticipated SOWs? Volume discounts? Preferred vendor status? |
| JV entity formation? Management structure? Capital calls? Exit strategy? |
| Exclusive territory? Minimum purchase requirements? Marketing obligations? Return policy? |
| Referral fee percentage or flat fee? Qualification criteria? Tracking method? Expiration of referral credit? |
Phase 2: Generate Agreement
Once you have the required information, generate the full agreement. Every agreement MUST include the following structure, plus type-specific clauses inserted in the appropriate locations.
2.1 Universal Agreement Structure
# [AGREEMENT TYPE] > ⚠️ LEGAL DISCLAIMER: This agreement was AI-generated and does not constitute legal advice. Always have a licensed attorney review any agreement before signing. --- **[FULL AGREEMENT TITLE]** **Effective Date:** [date] **Between:** - **[Party A Full Legal Name]** ("Party A" / "[Role]"), located at [address] - **[Party B Full Legal Name]** ("Party B" / "[Role]"), located at [address] Collectively referred to as the "Parties." --- ## 1. Purpose and Recitals > 📝 **Plain English:** This section explains WHY this agreement exists and what both sides intend. WHEREAS, [Party A] is engaged in the business of [description]; and WHEREAS, [Party B] desires to [engage/retain/partner with] [Party A] for [purpose]; and WHEREAS, both Parties wish to set forth the terms and conditions of their relationship; NOW, THEREFORE, in consideration of the mutual covenants contained herein, the Parties agree as follows: --- ## 2. Scope of Work / Services / Relationship > 📝 **Plain English:** This defines exactly what work will be done (and what won't). A clear scope prevents disputes later. 2.1. [Party A/Provider] shall provide the following [services/products/activities]: [Detailed scope from user input] 2.2. The following are expressly excluded from this agreement: [Exclusions from user input or standard exclusions] 2.3. Any work outside the scope defined in Section 2.1 requires a written amendment or change order signed by both Parties. --- ## 3. Term and Termination > 📝 **Plain English:** How long does this last, and how can either side end it? 3.1. **Term.** This Agreement begins on [start date] and continues until [end date / completion of services / terminated per Section 3.2]. 3.2. **Termination for Convenience.** Either Party may terminate this Agreement with [X] days' written notice to the other Party. 3.3. **Termination for Cause.** Either Party may terminate immediately upon written notice if the other Party: (a) Materially breaches this Agreement and fails to cure within [15/30] days of notice; (b) Becomes insolvent, files for bankruptcy, or ceases operations; (c) Engages in fraud, gross negligence, or willful misconduct. 3.4. **Effect of Termination.** Upon termination: (a) [Party B/Client] shall pay for all work completed through the termination date; (b) Each Party shall return or destroy the other Party's Confidential Information; (c) Sections [list surviving sections: Confidentiality, IP, Limitation of Liability, Indemnification, Governing Law] shall survive termination. --- ## 4. Compensation and Payment > 📝 **Plain English:** How much, when, and what happens if payment is late. 4.1. **Fees.** [Party B/Client] shall pay [Party A/Provider] as follows: [Payment structure from user input — fixed fee, hourly rate, milestone payments, etc.] 4.2. **Invoicing.** [Party A/Provider] shall submit invoices [frequency]. Payment is due within [net-30/other terms] of receipt. 4.3. **Late Payments.** Overdue amounts shall accrue interest at [1.5%] per month (or the maximum rate permitted by law, whichever is lower). 4.4. **Expenses.** [Reimbursable expenses terms, or "Each Party shall bear its own expenses unless otherwise agreed in writing."] 4.5. **Taxes.** Each Party is responsible for its own taxes. [For contractor agreements: "[Party A] acknowledges they are responsible for all self-employment taxes and will receive an IRS Form 1099."] --- ## 5. Intellectual Property > 📝 **Plain English:** Who owns the work product? This is often the most important section. [INSERT TYPE-SPECIFIC IP CLAUSE — see Section 2.2 below] --- ## 6. Confidentiality > 📝 **Plain English:** Both sides agree to keep each other's business secrets private. 6.1. **Definition.** "Confidential Information" means any non-public information disclosed by one Party to the other, whether oral, written, or electronic, including business plans, financials, customer lists, technical data, trade secrets, and the terms of this Agreement. 6.2. **Obligations.** The receiving Party shall: (a) Use Confidential Information only for the purposes of this Agreement; (b) Not disclose it to any third party without prior written consent; (c) Protect it with at least the same degree of care used for its own confidential information, but no less than reasonable care. 6.3. **Exclusions.** Information is not confidential if it: (a) Is or becomes publicly available through no fault of the receiving Party; (b) Was known to the receiving Party prior to disclosure; (c) Is independently developed without use of Confidential Information; (d) Is disclosed pursuant to legal requirement, provided the receiving Party gives prompt notice. 6.4. **Duration.** Confidentiality obligations survive for [2/3/5] years after termination. --- ## 7. Representations and Warranties > 📝 **Plain English:** Promises each side makes about their ability to enter this agreement and do the work. 7.1. Each Party represents and warrants that: (a) It has full authority to enter into and perform this Agreement; (b) This Agreement does not conflict with any other obligation; (c) It will comply with all applicable laws and regulations. 7.2. [Party A/Provider] further represents that: (a) The services will be performed in a professional and workmanlike manner; (b) The work product will not infringe any third-party intellectual property rights. --- ## 8. Limitation of Liability > 📝 **Plain English:** Caps on how much either side can owe if something goes wrong. 8.1. **Cap.** EXCEPT FOR BREACHES OF CONFIDENTIALITY OR IP INFRINGEMENT, NEITHER PARTY'S TOTAL LIABILITY SHALL EXCEED THE AMOUNTS PAID OR PAYABLE UNDER THIS AGREEMENT IN THE [12] MONTHS PRECEDING THE CLAIM. 8.2. **Exclusion.** IN NO EVENT SHALL EITHER PARTY BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, REGARDLESS OF THE CAUSE OF ACTION OR THEORY OF LIABILITY. --- ## 9. Indemnification > 📝 **Plain English:** If one side causes a legal problem, they agree to cover the other side's costs. 9.1. Each Party shall indemnify, defend, and hold harmless the other Party from and against any claims, damages, losses, and expenses (including reasonable attorneys' fees) arising from: (a) A material breach of this Agreement; (b) Gross negligence or willful misconduct; (c) Violation of applicable law. --- ## 10. Dispute Resolution > 📝 **Plain English:** What happens if we disagree — we try to work it out before going to court. 10.1. **Negotiation.** The Parties shall first attempt to resolve disputes through good-faith negotiation within [30] days. 10.2. **Mediation.** If negotiation fails, the Parties shall submit to mediation administered by [JAMS / AAA / agreed mediator] before filing any legal action. 10.3. **Governing Law.** This Agreement is governed by the laws of the State of [state], without regard to conflict of law principles. 10.4. **Jurisdiction.** Any legal action shall be brought in the courts of [county], [state]. 10.5. **Attorneys' Fees.** The prevailing party in any dispute shall be entitled to recover reasonable attorneys' fees and costs. --- ## 11. Non-Solicitation [if applicable] > 📝 **Plain English:** Neither side will try to hire away the other's employees during and shortly after the agreement. During the term and for [12] months after termination, neither Party shall directly solicit or hire any employee or contractor of the other Party who was involved in performing under this Agreement, without prior written consent. --- ## 12. Non-Compete [if applicable — include only if user requests] > 📝 **Plain English:** Restrictions on competing businesses. NOTE: Non-competes are unenforceable in some states (California, Minnesota, Oklahoma, North Dakota) and increasingly restricted elsewhere. 🟡 **Risk Note:** Non-compete enforceability varies significantly by jurisdiction. This clause may be void or limited in your state. Consult an attorney. [Non-compete clause tailored to user input with reasonable time, geography, and activity scope] --- ## 13. Force Majeure > 📝 **Plain English:** Neither side is at fault if something unforeseeable (pandemic, natural disaster, war) prevents performance. Neither Party shall be liable for failure to perform due to causes beyond its reasonable control, including natural disasters, pandemics, war, terrorism, government orders, labor disputes, or internet/power outages. The affected Party must notify the other within [5] business days and make reasonable efforts to mitigate the impact. If force majeure continues for more than [60/90] days, either Party may terminate. --- ## 14. General Provisions 14.1. **Entire Agreement.** This Agreement constitutes the entire agreement between the Parties and supersedes all prior negotiations, representations, and agreements. 14.2. **Amendments.** Modifications must be in writing and signed by both Parties. 14.3. **Assignment.** Neither Party may assign this Agreement without prior written consent, except in connection with a merger or acquisition. 14.4. **Severability.** If any provision is found unenforceable, the remaining provisions remain in full effect. 14.5. **Waiver.** Failure to enforce any provision does not waive the right to enforce it later. 14.6. **Notices.** All notices must be in writing and sent to the addresses listed above, by email with confirmation, certified mail, or overnight courier. 14.7. **Counterparts.** This Agreement may be executed in counterparts, including electronic signatures, each of which shall be an original. --- ## 15. Signature Block IN WITNESS WHEREOF, the Parties have executed this Agreement as of the Effective Date. **[Party A Full Legal Name]** Signature: ___________________________________ Printed Name: ________________________________ Title: _______________________________________ Date: ________________________________________ **[Party B Full Legal Name]** Signature: ___________________________________ Printed Name: ________________________________ Title: _______________________________________ Date: ________________________________________
2.2 Type-Specific Clause Inserts
Insert these into the appropriate sections of the universal structure above.
Freelancer Contract — Additional Clauses
- IP Ownership (Section 5): Work-for-hire clause with explicit assignment. Include portfolio usage rights for the freelancer. State whether source files are included.
- Contractor Status (new Section): Explicit independent contractor acknowledgment. List factors: own tools, own schedule, no benefits, multiple clients permitted. Include IRS Form 1099 reference.
- Kill Fee (Section 3.4): If client terminates before completion, freelancer receives [25-50%] of remaining project value.
- Revisions (Section 2): Include revision limits — typically [2-3] rounds included, additional revisions at [hourly rate].
- Scope Creep Protection (Section 2.3): Change order process for out-of-scope requests with written approval and revised pricing.
Partnership Agreement — Additional Clauses
- Capital Contributions (new Section): Each partner's initial and ongoing contributions.
- Profit and Loss Distribution (Section 4): Allocation percentages, distribution schedule, reserves.
- Management and Voting (new Section): Decision-making authority, voting rights, day-to-day management roles.
- New Partners / Transfer (new Section): Process for admitting new partners, right of first refusal.
- Dissolution (Section 3): Triggers for dissolution, asset distribution, winding down process.
- Non-Competition (Section 12): Partners typically have non-compete obligations during partnership.
Service Agreement — Additional Clauses
- Service Levels (new Section): SLA metrics, uptime guarantees, response times, escalation procedures.
- Acceptance Criteria (Section 2): How deliverables are reviewed and accepted, acceptance period, deemed acceptance.
- Warranty (Section 7): Warranty period for services, defect correction obligations.
Licensing Agreement — Additional Clauses
- License Grant (Section 5): Exclusive vs non-exclusive, territory, field of use, sublicensing rights.
- Royalties (Section 4): Royalty rate, minimum royalties, reporting requirements, audit rights.
- Quality Control (new Section): Licensor's right to approve use, brand guidelines compliance.
- Infringement (new Section): Who handles IP infringement claims, cooperation obligations.
Consulting Agreement — Additional Clauses
- Deliverables (Section 2): Specific consulting deliverables, reports, recommendations.
- Conflicts of Interest (new Section): Disclosure obligations, restrictions on competing engagements.
- Travel and Expenses (Section 4.4): Travel policies, pre-approval requirements, expense caps.
SOW — Additional Clauses
- Reference to MSA (Section 1): "This SOW is governed by the Master Service Agreement dated [date] between the Parties."
- Milestones (Section 2): Detailed milestone table with deliverables, dates, acceptance criteria, and payment triggers.
- Change Orders (new Section): Formal change order process, impact assessment, approval requirements.
- Assumptions and Dependencies (new Section): Client responsibilities, access requirements, timeline dependencies.
MSA — Additional Clauses
- SOW Process (new Section): How future SOWs are created, negotiated, and incorporated.
- Ordering Process (new Section): How services are ordered under the MSA.
- Precedence (Section 14.1): In case of conflict between MSA and SOW, which controls.
- Volume Pricing (Section 4): Tiered pricing, volume discounts, annual commitments.
Joint Venture — Additional Clauses
- JV Entity (new Section): Whether a new entity is formed, type of entity, governance.
- Contributions (new Section): Each party's contributions — capital, IP, personnel, facilities.
- Management Committee (new Section): Composition, voting, deadlock resolution.
- Exit and Buyout (Section 3): Exit triggers, valuation method, buyout mechanics.
Distribution Agreement — Additional Clauses
- Territory (new Section): Geographic scope, exclusivity, channel restrictions.
- Minimum Commitments (new Section): Minimum purchase volumes, marketing spend obligations.
- Pricing and Margins (Section 4): Wholesale pricing, MAP/MSRP policies, discount authority.
- Product Returns (new Section): Return policies, defective product handling, credits.
Referral Agreement — Additional Clauses
- Qualified Referral (new Section): Definition of a qualified referral, qualification criteria, exclusions.
- Referral Fee (Section 4): Fee structure (percentage or flat), when fee is earned, payment timing.
- Tracking (new Section): How referrals are tracked, attribution window, dispute process.
- Exclusivity (new Section): Whether referrals are exclusive, territory restrictions.
Phase 3: Output
3.1 File Output
Save the agreement as:
[TYPE]-AGREEMENT-[PartyA-PartyB]-[YYYY-MM-DD].md
Example:
FREELANCER-CONTRACT-AcmeCorp-JohnSmith-2026-03-23.md
3.2 Summary to User
After generating, present:
- Agreement Overview — Type, parties, key terms at a glance
- Sections Included — Quick list of all sections in the agreement
- Fill-In Items — Any bracketed items the user needs to finalize (marked with
)[FILL IN] - Risk Reminders:
- 🔴 High Risk: Any clauses that are one-sided or potentially unenforceable in certain jurisdictions
- 🟡 Medium Risk: Clauses that may need adjustment for specific situations
- 🟢 Low Risk: Standard balanced clauses
- Next Steps:
- "Have both parties review the agreement carefully."
- "Consider having a licensed attorney in your jurisdiction review before signing."
- "Run
on this agreement to get a detailed risk analysis."/legal review