skills/43-wentorai-research-plugins/skills/domains/law/opencontracts-guide/SKILL.md
Legal document annotation, versioning, and analysis platform
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research opencontracts-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
# Docker deployment
git clone https://github.com/Open-Source-Legal/OpenContracts.git
cd OpenContracts
docker-compose up -d
# Access at http://localhost:3000
from 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}")
# 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",
},
],
)
# 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}")
{
"mcpServers": {
"opencontracts": {
"command": "npx",
"args": ["@opencontracts/mcp-server"],
"env": {
"OPENCONTRACTS_URL": "http://localhost:3000"
}
}
}
}
# 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]}")
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.