tabular-document-review
Extract structured data from multiple documents into comparison matrix with citations. Use for bulk document review.
What this skill does
> **⚠️ EXPERIMENTAL** — This skill is provided for educational and informational purposes only. It does NOT constitute legal advice. All responsibility for usage rests with the user. Consult qualified legal professionals before acting on any output.
# Tabular Document Review Skill
## Overview
Production-ready toolkit for extracting structured data from multiple legal documents into a comparison matrix with citations. Supports user-defined extraction columns, parallel processing with up to 10 agents, confidence scoring, and output in markdown table or structured JSON. Designed for legal teams performing bulk contract review, NDA comparison, employment agreement analysis, and lease review.
## Table of Contents
- [Tools](#tools)
- [Reference Guides](#reference-guides)
- [Workflows](#workflows)
- [Extraction Scenarios](#extraction-scenarios)
- [Troubleshooting](#troubleshooting)
- [Success Criteria](#success-criteria)
- [Scope & Limitations](#scope--limitations)
- [Anti-Patterns](#anti-patterns)
- [Tool Reference](#tool-reference)
## Tools
### 1. Document Discovery (`scripts/document_discovery.py`)
Scan a directory for legal documents and generate an inventory manifest.
```bash
python scripts/document_discovery.py /path/to/contracts
python scripts/document_discovery.py /path/to/ndas --types pdf,docx --json
python scripts/document_discovery.py /path/to/leases --types pdf,docx,txt,md --min-size 1024
```
### 2. Extraction Aggregator (`scripts/extraction_aggregator.py`)
Aggregate multiple extraction result JSONs into a unified comparison matrix.
```bash
python scripts/extraction_aggregator.py \
--results extraction_1.json extraction_2.json extraction_3.json
python scripts/extraction_aggregator.py \
--results-dir ./extraction_results/ --json
python scripts/extraction_aggregator.py \
--results-dir ./extraction_results/ \
--format markdown \
--output review_matrix.md
python scripts/extraction_aggregator.py \
--results extraction_1.json extraction_2.json \
--columns "Parties,Effective Date,Term,Governing Law"
```
## Reference Guides
| Reference | Purpose |
|-----------|---------|
| `references/extraction_methodology.md` | Document extraction best practices, JSON schema, agent prompts |
| `references/common_extraction_columns.md` | Pre-defined column sets for contracts, NDAs, employment, leases |
## Workflows
### 5-Step Document Review Pipeline
| Step | Action | Tool | Output |
|------|--------|------|--------|
| 1. Gather Requirements | Define document folder, output filename, columns to extract | Manual | Column list, file path |
| 2. Discover Documents | Scan directory for target documents | `document_discovery.py` | Document manifest JSON |
| 3. Process Documents | Extract values per column with citations (parallel agents) | AI agents (external) | Per-document extraction JSONs |
| 4. Collect Results | Aggregate extraction JSONs into unified matrix | `extraction_aggregator.py` | Consolidated matrix |
| 5. Generate Output | Export as markdown table or structured JSON | `extraction_aggregator.py` | Final deliverable |
### Parallel Processing Strategy
| Agents | Documents per Agent | Use When |
|--------|-------------------|----------|
| 1 | All | 1-5 documents |
| 2-3 | ceil(N/agents) | 6-15 documents |
| 4-6 | ceil(N/agents) | 16-40 documents |
| 7-10 | ceil(N/agents) | 41-100 documents |
| 10 (max) | ceil(N/10) | 100+ documents |
### Agent Prompt Template
Each agent receives a prompt structured as:
```
You are reviewing {count} legal documents. For each document, extract the
following columns:
{column_definitions}
For each value extracted:
1. Provide the exact value found
2. Include the page number (PDF) or section/paragraph (DOCX/MD)
3. Rate your confidence: HIGH (exact match), MEDIUM (inferred), LOW (uncertain)
4. If not found, record "NOT FOUND" with confidence LOW
Output as JSON per the extraction schema.
```
### Confidence Scoring
| Level | Color Code | Definition |
|-------|-----------|------------|
| HIGH | Green | Exact value found with clear citation |
| MEDIUM | Yellow | Value inferred from context; multiple possible interpretations |
| LOW | Red / Not Found | Value uncertain or not found in document |
### Output Format
**Sheet 1: Document Review**
| Document | Parties | Effective Date | Term | Governing Law | ... |
|----------|---------|---------------|------|---------------|-----|
| contract_a.pdf | Acme / Beta [p.1] | 2026-01-15 [p.2] | 3 years [p.3] | Delaware [p.12] | ... |
| contract_b.pdf | Gamma / Delta [p.1] | NOT FOUND | 2 years [p.4] | New York [p.10] | ... |
**Sheet 2: Summary**
| Metric | Value |
|--------|-------|
| Documents processed | 25 |
| Columns extracted | 8 |
| Average confidence | 87% |
| Not found rate | 12% |
## Extraction Scenarios
### Contract Review
| Column | What to Extract |
|--------|----------------|
| Parties | All contracting parties with full legal names |
| Effective Date | Contract effective or execution date |
| Term | Duration of the agreement |
| Renewal | Auto-renewal terms and notice period |
| Governing Law | Jurisdiction governing the agreement |
| Liability Cap | Maximum liability amount or formula |
| Indemnification | Indemnification obligations and scope |
| IP Ownership | Intellectual property ownership provisions |
| Termination Rights | Termination triggers and notice requirements |
| Data Protection | Data protection or privacy obligations |
### NDA Review
| Column | What to Extract |
|--------|----------------|
| Parties | Disclosing and receiving parties |
| Type | Mutual or one-way |
| Definition Scope | How "confidential information" is defined |
| Exceptions | Standard exceptions to confidentiality |
| Term | Duration of confidentiality obligations |
| Survival | Survival period after termination |
| Return/Destruction | Obligations on termination |
| Remedies | Available remedies for breach |
## Troubleshooting
| Problem | Cause | Solution |
|---------|-------|----------|
| Discovery finds 0 documents | Wrong path or file types | Verify path exists; check `--types` matches actual file extensions |
| Extraction JSONs have wrong schema | Agent prompt incomplete | Use the extraction schema from `extraction_methodology.md` |
| Aggregator shows conflicts | Multiple values for same cell | Review source documents; aggregator marks conflicts for manual review |
| High "NOT FOUND" rate | Columns too specific for document type | Use column definitions from `common_extraction_columns.md`; broaden definitions |
| Confidence all LOW | Agent unable to locate values | Check column definitions are specific enough; verify document is readable |
| Aggregator crashes on large set | Too many result files loaded at once | Process in batches of 50 results; use `--columns` to limit output width |
| Markdown table misaligned | Long values or special characters | Use `--format json` for machine processing; truncate long values |
| Missing citations | Agent did not include page/section references | Reinforce citation requirement in agent prompt; check extraction schema |
## Success Criteria
- **Extraction Coverage**: 90%+ of defined columns populated across all documents
- **Confidence Distribution**: 70%+ of extractions rated HIGH confidence
- **Citation Accuracy**: Every extracted value includes verifiable page/section citation
- **Processing Speed**: 50+ documents processed within 30 minutes using parallel agents
- **Matrix Completeness**: Final matrix includes all documents and all columns with no orphan rows
## Scope & Limitations
**This skill covers:**
- Document inventory and discovery across PDF, DOCX, TXT, and MD formats
- Aggregation of extraction results from parallel agent processing into unified matrix
- Pre-defined column sets for contracts, NDAs, employment agreements, and leases
- Confidence scoring and conflict detection for extracted values
- Markdown and JSON output formats
**This skill does NOT cover:**
- Actual document parsing or tRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.