# How the Legal Plugin Assists with Contract Review: The Claude 8-Step Pipeline

> Discover how the legal plugin automates contract review with an 8-step pipeline. It classifies risks, suggests redlines, and speeds up legal workflows.

- Repository: [Anthropic/knowledge-work-plugins](https://github.com/anthropics/knowledge-work-plugins)
- Tags: how-to-guide
- Published: 2026-06-01

---

**The legal plugin automates contract review through a deterministic eight-step workflow that ingests documents, applies organization-specific playbooks, classifies risks using a GREEN/YELLOW/RED system, and generates actionable redline suggestions with optional CLM routing.**

The `anthropics/knowledge-work-plugins` repository provides a production-ready legal plugin that transforms unstructured contract analysis into a repeatable, playbook-driven process. By leveraging declarative skill definitions and deterministic classification logic, the plugin assists legal teams with standardized contract review while maintaining strict guardrails that require qualified attorney oversight.

## The Eight-Step Contract Review Workflow

The legal plugin's core capability resides in [`legal/skills/review-contract/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/review-contract/SKILL.md), which defines the `/review-contract` command. When invoked, the plugin executes a deterministic pipeline that processes contracts from ingestion to output generation.

### Step 1: Multi-Format Contract Ingestion

The workflow accepts contracts through three input methods:
- **File upload**: Direct document attachment
- **URL retrieval**: Public or authenticated contract links
- **Pasted text**: Raw contract text for rapid analysis

This flexibility ensures the legal plugin can assist with contract review regardless of how the document is sourced.

### Step 2: Context Collection

Before analysis begins, the skill prompts for critical contextual parameters:
- **Party role**: Whether the user represents the customer or vendor side
- **Review deadline**: Timeline constraints affecting prioritization
- **Focus areas**: Specific clauses requiring heightened scrutiny
- **Deal background**: Commercial context influencing risk tolerance

### Step 3: Playbook Loading and Validation

The plugin searches for [`legal.local.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal.local.md) (or organization-specific playbook files) to load standard contractual positions. If no playbook exists, the skill offers to create one or falls back to generic commercial standards. This playbook-driven approach ensures the legal plugin assists with contract review according to your organization's predefined risk thresholds and preferred language.

### Step 4: Clause-by-Clause Matrix Analysis

The skill iterates through a predefined matrix of high-risk clause categories defined in [`SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/SKILL.md):
- **Limitation of Liability**
- **Indemnification**
- **Intellectual Property Rights**
- **Data Protection and Privacy**
- **Termination and Survival**
- **Representations and Warranties**
- **Governing Law and Venue**

Each clause is analyzed against the loaded playbook to identify deviations from standard positions.

### Step 5: Three-Tier Risk Classification

The plugin classifies every deviation using a standardized traffic-light system:
- **GREEN**: Acceptable as drafted; aligns with playbook
- **YELLOW**: Negotiable; deviates from ideal but manageable
- **RED**: Escalate; critical risk requiring immediate attention or fallback positions

Classification rules and concrete examples are enumerated in the "Flag Deviations" section of [`legal/skills/review-contract/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/review-contract/SKILL.md).

### Step 6: Structured Redline Generation

For YELLOW and RED classifications, the plugin generates formatted redline suggestions following the template defined in "Redline Generation Best Practices":
- **Clause**: Specific contract section
- **Current language**: Exact problematic text
- **Proposed redline**: Markup-ready replacement language
- **Rationale**: Business and legal justification
- **Priority**: Must-have vs. should-have
- **Fallback**: Concession language if primary position fails

### Step 7: Business Impact Summarization

The workflow synthesizes findings into a strategic overview including:
- Overall risk rating for the transaction
- Top-three critical issues requiring immediate action
- Negotiation strategy with tiered priorities
- Timeline considerations based on the review deadline

### Step 8: Optional CLM Routing

If a Contract Lifecycle Management connector is configured in [`legal/CONNECTORS.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/CONNECTORS.md), the plugin can automatically route the completed review to the appropriate approval workflow (e.g., Standard Approval → Legal → Senior Counsel).

## Architecture and Key Source Files

The legal plugin in `anthropics/knowledge-work-plugins` uses a declarative architecture where skills are defined in Markdown files parsed by the runtime.

### Plugin Manifest and Skill Definition

The [`legal/.claude-plugin/plugin.json`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/.claude-plugin/plugin.json) file registers the namespace and version, while [`legal/skills/review-contract/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/review-contract/SKILL.md) serves as both documentation and execution blueprint. This declarative approach enables new legal workflows (such as NDAs or vendor checks) by adding new [`SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/SKILL.md) files without code changes.

### The Playbook System

The playbook loader (implicit in step 3) expects markdown files like [`legal.local.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal.local.md) that encode:
- Standard liability caps and carve-outs
- Preferred indemnification language
- Acceptable confidentiality terms
- Data processing requirements

When the legal plugin assists with contract review, it compares contract language against these thresholds to drive the classification logic.

### Safety Guardrails and Legal Disclaimers

Every output includes explicit disclaimers reminding users that the analysis is **not legal advice** and must be vetted by qualified counsel. These "Important" notices are embedded throughout [`SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/SKILL.md) and appear in the final output template to ensure compliance with unauthorized practice of law regulations.

## Practical Usage Examples

### Invoking the Review Command

```text
/review-contract https://example.com/contracts/saas-agreement.pdf

```

The plugin will prompt for missing context (side, deadline, focus areas) if not supplied via command arguments.

### Sample Redline Output Format

When the legal plugin assists with contract review, it generates structured markdown ready for attorney review:

```markdown

## Contract Review Summary

**Document**: SaaS-Agreement.pdf  
**Parties**: Acme Corp (Customer) – Cloudify Ltd. (Vendor)  
**Your Side**: Customer  
**Deadline**: 2026-07-01  
**Review Basis**: Playbook  

## Key Findings

- **RED** – Uncapped liability in Section 10 (Risk of unlimited exposure).  
- **YELLOW** – Indemnification limited to $250k (below playbook $500k).  
- **GREEN** – Confidentiality term of 3 years (matches playbook).

## Clause-by-Clause Analysis

### Limitation of Liability – RED

**Contract says**: "Neither party shall have any liability for any direct, indirect, or consequential damages."  
**Playbook position**: Cap at 12 months of fees, carve-out for breach of confidentiality.  
**Deviation**: Unlimited exclusion of consequential damages.  
**Business impact**: Potential exposure to unlimited damages.  
**Redline suggestion**:

```

**Clause**: Limitation of Liability  
**Current language**: "Neither party shall have any liability for any direct, indirect, or consequential damages."  
**Proposed redline**: "Liability of either party shall be limited to the greater of (i) twelve (12) months of fees payable under this Agreement, or (ii) $1,000,000, except for (a) breach of confidentiality, (b) willful misconduct, or (c) infringement of third-party IP."  
**Rationale**: Aligns risk with typical SaaS benchmarks.  
**Priority**: Must-have  
**Fallback**: Reduce cap to 6 months of fees if counter-party objects.  

```

## Negotiation Strategy

- **Tier 1 (Must-Haves)**: Remove unlimited liability, obtain data-protection addendum.  
- **Tier 2 (Should-Haves)**: Negotiate higher indemnification cap.  
- **Tier 3 (Nice-to-Haves)**: Shorten notice period for termination.

> **Important**: This analysis is for informational purposes only and must be reviewed by qualified legal counsel before any decision is made.

```

### Related Legal Skills

The repository includes complementary skills defined in separate [`SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/SKILL.md) files:
- **[`legal/skills/triage-nda/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/triage-nda/SKILL.md)**: Rapid NDA assessment using the same GREEN/YELLOW/RED classification
- **[`legal/skills/vendor-check/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/vendor-check/SKILL.md)**: Surfaces existing vendor agreement status and relationship history

## Summary

- The legal plugin in `anthropics/knowledge-work-plugins` provides an eight-step deterministic workflow for contract review defined in [`legal/skills/review-contract/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/review-contract/SKILL.md).
- **Playbook-driven analysis** loads [`legal.local.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal.local.md) to compare contracts against organizational standards, falling back to generic commercial standards if no custom playbook exists.
- **Three-tier risk classification** (GREEN/YELLOW/RED) standardizes deviation severity, while structured redline generation provides attorney-ready negotiation language with rationale and fallback positions.
- **CLM integration** via [`legal/CONNECTORS.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/CONNECTORS.md) enables automatic routing to approval workflows, transforming the plugin into an end-to-end legal operations tool.
- Built-in safety guardrails require explicit qualified counsel review, ensuring the tool assists rather than replaces legal judgment.

## Frequently Asked Questions

### How does the legal plugin handle contracts without existing playbooks?

When no [`legal.local.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal.local.md) file is detected, the skill automatically offers to guide users through playbook creation or defaults to generic commercial standards accepted across most SaaS and vendor agreements. This ensures the legal plugin can assist with contract review immediately while encouraging organizations to codify their specific risk tolerances over time.

### What contract formats does the review-contract skill support?

According to the skill definition in [`legal/skills/review-contract/SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/skills/review-contract/SKILL.md), the workflow accepts file uploads (PDF, DOCX, TXT), URL-based retrieval, and pasted plain text. The plugin normalizes all inputs into a standard text representation before performing clause-by-clause analysis against the risk matrix.

### Is the legal plugin's contract analysis considered legal advice?

No. The source code embeds explicit disclaimers throughout the output template stating that the analysis is **for informational purposes only** and must be reviewed by qualified legal counsel. These guardrails appear in the "Important" sections of [`SKILL.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/SKILL.md) and the final output to ensure compliance with regulations governing the unauthorized practice of law.

### Can the legal plugin integrate with existing Contract Lifecycle Management systems?

Yes. If configured in [`legal/CONNECTORS.md`](https://github.com/anthropics/knowledge-work-plugins/blob/main/legal/CONNECTORS.md), the eighth step of the workflow can route completed reviews to connected CLM platforms (such as HubSpot, DocuSign CLM, or custom systems). The plugin suggests specific approval workflows (e.g., Standard Approval → Legal → Senior Counsel) based on the risk profile identified during classification.