Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Legal document annotation, versioning, and analysis platform
.claude/skills/brycewang-stanford-opencontracts-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -23% | 0% |
OpenContracts is an open-source platform for legal document annotation, versioning, and analysis. It provides collaborative annotation tools for legal text, version tracking across document drafts, NLP-powered clause extraction, and integration with AI agents via MCP. Designed for legal researchers, law firms, and teams managing large document collections that need structured annotation and analysis.
bash# Docker deployment git clone https://github.com/Open-Source-Legal/OpenContracts.git cd OpenContracts docker-compose up -d # Access at http://localhost:3000
pythonfrom opencontracts import Client client = Client("http://localhost:3000") # Upload documents doc = client.upload( file="contract.pdf", metadata={ "type": "NDA", "parties": ["Company A", "Company B"], "date": "2025-01-15", "jurisdiction": "Delaware", }, ) # Version tracking versions = client.get_versions(doc.id) for v in versions: print(f"v{v.number}: {v.date} — {v.changes_summary}") # Compare versions diff = client.compare_versions(doc.id, v1=1, v2=3) for change in diff.changes: print(f"[{change.type}] Section {change.section}: " f"{change.description}")
python# Create annotation project project = client.create_project( name="NDA Clause Analysis", documents=[doc.id], label_set=[ "confidentiality_scope", "term_duration", "exclusions", "remedies", "governing_law", "dispute_resolution", ], ) # Add annotations client.annotate( document_id=doc.id, annotations=[ { "start": 1250, "end": 1480, "label": "confidentiality_scope", "note": "Broad definition including derivatives", }, { "start": 2100, "end": 2250, "label": "term_duration", "note": "5-year term with auto-renewal", }, ], )
python# Automated clause extraction clauses = client.extract_clauses( doc.id, clause_types=[ "indemnification", "limitation_of_liability", "termination", "force_majeure", "assignment", ], ) for clause in clauses: print(f"\n[{clause.type}] (confidence: {clause.confidence:.2f})") print(f" Location: p.{clause.page}, para {clause.paragraph}") print(f" Text: {clause.text[:100]}...") # Risk assessment risks = client.assess_risks(doc.id) for risk in risks: print(f"[{risk.severity}] {risk.clause}: {risk.description}")
json{ "mcpServers": { "opencontracts": { "command": "npx", "args": ["@opencontracts/mcp-server"], "env": { "OPENCONTRACTS_URL": "http://localhost:3000" } } } }
python# Full-text search across documents results = client.search( query="indemnification unlimited liability", document_types=["NDA", "MSA"], date_range=("2024-01-01", "2025-12-31"), ) # Analytics stats = client.analytics(project_id=project.id) print(f"Documents annotated: {stats.docs_complete}") print(f"Total annotations: {stats.total_annotations}") print(f"Inter-annotator agreement: {stats.agreement:.2f}") print(f"Most common clause: {stats.top_clauses[0]}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 16,029 | 9,839 | -39% | 1 | 1 | 0% | 3,248 | 2,853 | -12% | 0 | 0 | — |
case-02 | fail→pass | 22,807 | 6,001 | -74% | 1 | 1 | 0% | 4,595 | 2,375 | -48% | 0 | 0 | — |
case-03 | fail→pass | 14,640 | 6,173 | -58% | 1 | 1 | 0% | 2,643 | 2,393 | -9% | 0 | 0 | — |
case-04 | pass→pass | 10,513 | 3,335 | -68% | 1 | 1 | 0% | 1,599 | 1,663 | +4% | 0 | 0 | — |
case-05 | pass→pass | 13,071 | 3,579 | -73% | 1 | 1 | 0% | 2,051 | 1,735 | -15% | 0 | 0 | — |
case-06 | fail→pass | 7,624 | 2,991 | -61% | 1 | 1 | 0% | 1,100 | 1,619 | +47% | 0 | 0 | — |
case-07 | fail→pass | 14,247 | 4,202 | -71% | 1 | 1 | 0% | 2,397 | 1,840 | -23% | 0 | 0 | — |
case-08 | fail→pass | 15,204 | 12,777 | -16% | 1 | 1 | 0% | 2,156 | 3,241 | +50% | 0 | 0 | — |
case-09 | fail→pass | 12,449 | 3,337 | -73% | 1 | 1 | 0% | 1,839 | 1,671 | -9% | 0 | 0 | — |
case-10 | pass→pass | 12,513 | 5,231 | -58% | 1 | 1 | 0% | 2,193 | 2,075 | -5% | 0 | 0 | — |
case-11 | fail→pass | 11,826 | 3,942 | -67% | 1 | 1 | 0% | 1,897 | 1,813 | -4% | 0 | 0 | — |
case-12 | fail→pass | 8,676 | 2,355 | -73% | 1 | 1 | 0% | 1,405 | 1,523 | +8% | 0 | 0 | — |
case-13 | pass→pass | 9,636 | 1,655 | -83% | 1 | 1 | 0% | 1,696 | 1,418 | -16% | 0 | 0 | — |
case-14 | fail→fail | 10,936 | 1,977 | -82% | 1 | 1 | 0% | 1,876 | 1,416 | -25% | 0 | 0 | — |
case-15 | fail→pass | 16,107 | 3,430 | -79% | 1 | 1 | 0% | 2,712 | 1,734 | -36% | 0 | 0 | — |
case-16 | fail→pass | 7,379 | 2,917 | -60% | 1 | 1 | 0% | 1,153 | 1,591 | +38% | 0 | 0 | — |
case-17 | fail→pass | 11,173 | 3,287 | -71% | 1 | 1 | 0% | 1,742 | 1,694 | -3% | 0 | 0 | — |
case-18 | fail→pass | 13,727 | 4,087 | -70% | 1 | 1 | 0% | 2,584 | 1,807 | -30% | 0 | 0 | — |
case-19 | fail→pass | 12,674 | 4,791 | -62% | 1 | 1 | 0% | 1,820 | 1,924 | +6% | 0 | 0 | — |
case-20 | pass→pass | 13,335 | 11,669 | -12% | 1 | 1 | 0% | 2,393 | 3,430 | +43% | 0 | 0 | — |
case-21 | pass→pass | 18,018 | 13,228 | -27% | 1 | 1 | 0% | 3,298 | 3,476 | +5% | 0 | 0 | — |
case-22 | pass→pass | 4,239 | 5,615 | +32% | 1 | 1 | 0% | 770 | 2,079 | +170% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.