Audit litigation analytics and case outcome prediction systems -- ML outcome models (logistic regression, gradient boosting, neural nets with temporal train/test splits), settlement range modeling (Monte Carlo simulation, comparable case matching, BATNA analysis). Use when reviewing legal-tech code that predicts case outcomes or settlement values, or the user mentions litigation analytics, outcome models, or settlement ranges.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Litigation Predictor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tinh2-litigation-predictor)
---
name: litigation-predictor
description: "Audit litigation analytics and case outcome prediction systems -- ML outcome models (logistic regression, gradient boosting, neural nets with temporal train/test splits), settlement range modeling (Monte Carlo simulation, comparable case matching, BATNA analysis). Use when reviewing legal-tech code that predicts case outcomes or settlement values, or the user mentions litigation analytics, outcome models, or settlement ranges."
version: "2.0.3"
category: analysis
platforms:
- CLAUDE_CODE
---
Audit codebases implementing litigation analytics, case outcome prediction, settlement modeling, cost forecasting and related legal intelligence: model correctness, data pipeline integrity, statistical validity, and operational safeguards. Investigate the whole codebase without asking questions.
SCOPE: $ARGUMENTS (optional): narrow to an area (e.g. "outcome model only", "settlement analysis", "precedent matching engine"); default is the full system.
## PHASE 1: STACK DETECTION & SYSTEM ARCHITECTURE
1. Identify the tech stack from package.json, requirements.txt, go.mod, Cargo.toml, Gemfile, pom.xml, pubspec.yaml: ML/statistics (scikit-learn, XGBoost, LightGBM, TensorFlow, PyTorch, statsmodels, R, custom); data processing (pandas, Spark, Dask, Polars, SQL); NLP (spaCy, NLTK, Hugging Face, LangChain, sentence-transformers, OpenAI); storage (PostgreSQL, MongoDB, Elasticsearch, vector DB, warehouse); visualization (Plotly, D3.js, Chart.js, Matplotlib, custom dashboards).
2. Map the system architecture: Data ingestion layer (court records, docket feeds, case filings, public records); Data processing pipeline (ETL, cleaning, normalization, feature engineering); Prediction models (outcome, settlement, cost, duration); Analysis engines (judge profiling, venue analysis, precedent matching); Tracking systems (statute of limitations, case calendar, deadlines); Reporting/dashboard layer (visualizations, exports, alerts).
3. Build the module inventory:
Columns: Module, Purpose, Key Files, Model Type, Data Sources, Test Coverage.
## PHASE 2: CASE OUTCOME MODELING
MODEL ARCHITECTURE:
- What model type is used? (logistic regression, random forest, gradient boosting, neural network, ensemble, Bayesian network).
- What is the target variable? (win/lose binary, multi-class outcome, probability distribution).
- What features feed the model? Case attributes: case type, jurisdiction, filing date, claim amount; Party attributes: party type (individual, corporation, government), representation quality; Historical data: prior outcomes in similar cases, judge history, venue history; Textual features: complaint language, motion text, legal theories cited.
- Are features documented with their expected impact direction?
TRAINING & VALIDATION:
- What is the training dataset? Size, date range, geographic coverage, case type coverage.
- Is there a train/validation/test split? What are the split ratios?
- Is temporal splitting used? (train on older cases, test on newer -- critical for legal data).
- Cross-validation method: k-fold, stratified k-fold, time-series split.
- Are minority classes handled? (class imbalance for rare outcomes).
MODEL PERFORMANCE:
- What metrics are tracked? (accuracy, precision, recall, F1, AUC-ROC, calibration).
- Are confidence intervals reported on predictions?
- Is there a calibration check? (predicted 70% win rate should match actual 70% win rate).
- Is model performance broken down by: Case type (contract, tort, employment, IP, antitrust); Jurisdiction (federal vs state, specific circuits/districts); Time period (does accuracy degrade for older training data?).
- Is there a model monitoring dashboard for production performance?
MODEL DRIFT:
- Is there drift detection? (feature distribution shifts, prediction distribution shifts).
- How often is the model retrained? (scheduled, triggered by drift, manual).
- Is there a model registry with version history?
- Can the system fall back to a previous model version?
| Model Aspect | Status | Quality | Risk |
|-------------|--------|---------|------|
## PHASE 3: SETTLEMENT ANALYSIS
SETTLEMENT RANGE MODELING:
- How are settlement ranges calculated? Statistical model based on comparable cases; Rule-based (percentage of claimed damages); Monte Carlo simulation; Decision tree analysis.
- What inputs determine the range? (case strength, damages claimed, litigation costs, risk tolerance, time value of money, precedent outcomes).
- Is the output a point estimate, range, or probability distribution?
- Are upper and lower bounds justified by comparable case data?
COMPARABLE CASE MATCHING:
- How are "comparable" cases identified? Feature similarity (case type, jurisdiction, claim amount, legal theories); Text similarity (complaint language, fact patterns); Vector similarity (embeddings of case descriptions).
- How many comparables are used? Is the count configurable?
- Are comparables filtered by recency? (5-year window, 10-year window, configurable).
- Can users override or exclude specific comparables?
SETTLEMENT DECISION SUPPORT:
- Does the system model "settle vs litigate" decision trees?
- Are litigation cost projections factored into settlement recommendations?
- Is time-to-resolution factored in? (present value of future settlement vs current offer).
- Are non-monetary factors tracked? (precedent risk, publicity, business relationship).
- Is there a negotiation strategy module? (opening offer, reservation price, BATNA analysis).
| Settlement Feature | Method | Data Source | Confidence Level | Tested |
|-------------------|--------|------------|-----------------|--------|
## PHASE 4: COST FORECASTING
COST MODEL:
- What cost categories are forecasted? Attorney fees (hourly, contingency, flat fee, blended rate); Court fees (filing, motions, trial); Expert witness costs (retention, testimony, reports); E-discovery costs (collection, processing, review, production); Deposition costs (court reporter, videography, travel); Administrative costs (copying, courier, technology).
- Is the model phase-based? (pre-litigation, discovery, motions, trial, appeal).
- Are costs modeled per-phase with probability of reaching each phase?
FORECASTING METHODOLOGY:
- Is the forecast based on historical actual costs for similar cases?
- Are there staffing models? (estimated hours per phase × blended rate).
- Is there a Monte Carlo simulation for cost ranges?
- Are cost drivers identified? (complexity, number of parties, document volume, geographic spread, opposing counsel aggressiveness).
- Is there a variance analysis? (forecasted vs actual for completed cases).
BUDGET TRACKING:
- Does the system track actual spend against forecast?
- Are there alerts when spend exceeds forecast by a threshold?
- Can forecasts be revised mid-case as new information emerges?
- Is there accrual tracking? (incurred but not yet billed costs).
| Cost Category | Forecast Method | Historical Basis | Accuracy Tracked | Alerts |
|-------------- |----------------|-----------------|-----------------|--------|
## PHASE 5: JUDGE & VENUE ANALYSIS
JUDGE PROFILING:
- What judge attributes are tracked? Demographic data (appointment year, appointing authority, prior career); Case statistics (cases per year, average duration, reversal rate); Outcome patterns (plaintiff win rate by case type, settlement rate); Sentencing/damages patterns (average award, variance, outliers); Procedural tendencies (motion grant rates, discovery scope preferences).
- How is judge data sourced? (court records, public databases, manual entry).
- Is the data current? What is the refresh frequency?
- Are there bias detection safeguards? (the system must not enable discriminatory profiling).
- Is there a confidence indicator based on sample size? (a judge with 5 similar cases vs 500 similar cases).
VENUE ANALYSIS:
- What venue attributes are tracked? Geographic data (court location, circuit, district); Case load statistics (filings per year, average time to trial); Jury demographics and verdict patterns; Local rules and procedural requirements; Transfer and removal patterns.
- Is there a venue comparison feature? (side-by-side comparison for forum selection).
- Are venue recommendations provided? With what criteria?
- Is there a venue risk score?
DATA FRESHNESS:
- How often is judge/venue data updated?
- Is there a staleness indicator? (data last updated X months ago).
- Are retired/reassigned judges handled? (do they persist in analytics?).
- Is there a data quality score per judge/venue profile?
| Analysis Feature | Data Completeness | Refresh Rate | Sample Size Check | Bias Guard |
|-----------------|-------------------|-------------|-------------------|-----------|
## PHASE 6: PRECEDENT MATCHING ENGINE
SEARCH METHODOLOGY:
- How are precedents retrieved? Keyword search (full-text index, Elasticsearch, Solr); Citation graph traversal (following case citations); Semantic search (vector embeddings, similarity scoring); Structured query (case type + jurisdiction + legal issue); Hybrid approach (combining multiple methods).
- What is the precedent corpus? (all federal, state-specific, custom curated, public domain).
- How is the corpus updated? (automated feed, manual additions, API integration).
RELEVANCE RANKING:
- How are results ranked? (BM25, cosine similarity, citation count, recency, authority score).
- Are results filtered by jurisdiction? (binding vs persuasive authority).
- Is there a citation hierarchy? (Supreme Court > Circuit > District > State).
- Can users provide relevance feedback to improve ranking?
- Is there a "distinguish from" feature? (cases that appear similar but were decided differently).
PRECEDENT ANALYSIS:
- Does the system extract key holdings from precedent cases?
- Are holdings mapped to legal issues/elements?
- Is there a timeline view showing how precedent has evolved?
- Are overruled or superseded cases flagged?
- Is there a Shepard's/KeyCite-style treatment indicator?
| Search Method | Corpus Size | Update Frequency | Ranking Quality | Authority Filter |
|-------------- |------------|-----------------|----------------|-----------------|
## PHASE 7: STATUTE OF LIMITATIONS & DEADLINES
STATUTE OF LIMITATIONS TRACKING:
- Are statutes of limitations catalogued by: Claim type (contract, tort, statutory, criminal); Jurisdiction (federal, each state, international); Special rules (discovery rule, tolling, minority, fraud).
- Is the SOL database current? When was it last updated?
- Are tolling events tracked? (defendant absent from jurisdiction, plaintiff minority, fraudulent concealment, contractual tolling agreements).
- Is there an accrual date calculator? (when did the cause of action accrue?).
- Are near-expiry warnings generated? At what intervals?
CASE CALENDAR & DEADLINES:
- Are court-specific deadlines tracked? (answer due dates, discovery cutoffs, motion deadlines).
- Are local rules incorporated? (different courts have different default deadlines).
- Is there integration with court e-filing systems for automatic deadline updates?
- Are business-day vs calendar-day calculations correct?
- Are holiday calendars maintained per jurisdiction?
- Is there conflict detection? (overlapping deadlines across cases).
DAMAGES CALCULATION:
- What damages models are supported? Compensatory (economic: lost profits, medical costs, property damage); Compensatory (non-economic: pain and suffering, emotional distress); Punitive / exemplary damages; Statutory damages (per-violation amounts); Treble damages (antitrust, RICO); Attorney fees (fee-shifting statutes).
- Are damages discounted to present value? (for future damages streams).
- Are damages caps applied per jurisdiction? (tort reform caps, statutory maximums).
- Is there a comparative fault / contributory negligence adjustment?
- Are pre-judgment and post-judgment interest calculated?
| Feature | Jurisdictions Covered | Update Frequency | Edge Cases | Tested |
|---------|----------------------|-----------------|------------|--------|
## PHASE 8: DATA PIPELINE & MODEL INTEGRITY
DATA PIPELINE:
- Is the ingestion pipeline idempotent? (re-running does not create duplicates).
- Are there data quality checks at each pipeline stage?
- Is there schema validation on incoming data?
- Are malformed records quarantined rather than silently dropped?
- Is there lineage tracking? (which source record produced which prediction).
- Is PII handled correctly? (party names, addresses, SSNs in court records).
MODEL INTEGRITY:
- Are model predictions reproducible? (same input always produces same output).
- Is there a model audit log? (which model version produced which prediction).
- Are predictions timestamped and versioned?
- Can predictions be explained? (feature importance, decision path, SHAP values).
- Is there a human override mechanism with audit trail?
- Are there guardrails on extreme predictions? (flag if predicted outcome is outside historical distribution).
STATISTICAL VALIDITY:
- Are sample sizes sufficient for the claims being made?
- Are confidence intervals provided alongside point estimates?
- Is there correction for multiple comparisons? (testing many hypotheses increases false positives).
- Are base rates accounted for? (overall plaintiff win rate affects interpretation).
- Is survivorship bias addressed? (settled cases drop from the outcome dataset).
| Integrity Check | Implemented | Tested | Monitoring |
|----------------|-------------|--------|-----------|
## SELF-HEALING VALIDATION (max 2 iterations)
After producing output, verify: every section has substantive content; every finding cites a file, code location, or data point; recommendations are actionable and evidence-based. If data was insufficient (empty directories, missing configs), note the gaps and try alternative discovery methods.
IF VALIDATION FAILS, re-analyze the deficient areas with expanded search patterns (up to 2 iterations). IF STILL INCOMPLETE, flag the specific gaps and what data would be needed to complete the analysis.
## OUTPUT
Use `references/report-template.md` (fallback: https://raw.githubusercontent.com/tinh2/skills-hub-registry/main/analysis/litigation-predictor/references/report-template.md). Sections: header (stack, scope, models detected, data sources, system maturity score /100); module assessment table (each module: implementation, model and data quality, test coverage, score); findings as LP-NNN with severity, module, `file:line`, issue, impact, fix; model performance (accuracy, AUC-ROC, calibration, drift detection, last retrained); data quality (sources, freshness monitoring, quality checks, PII handling, pipeline idempotency); statistical validity checklist (temporal split, confidence intervals, sample size checks, base rates, survivorship bias, multiple comparisons, calibration); recommendations ranked by impact with effort S/M/L.
DO NOT:
- Evaluate the legal correctness of predictions -- this is a code and model analysis, not legal advice.
- Assume more data always means better predictions -- data quality matters more than quantity.
- Ignore survivorship bias -- cases that settle before trial create a biased outcome dataset.
- Overlook explainability requirements -- legal professionals need to understand why a prediction was made.
- Flag judge profiling features without checking for appropriate bias safeguards.
- Penalize systems for narrow jurisdiction coverage if the scope is intentionally limited.
- Treat model accuracy in isolation -- calibration and reliability matter more than raw accuracy.
NEXT STEPS: `/security-review` (PII handling, access controls on case data), `/load-test` (prediction latency under concurrency), `/test-suite` (accuracy on a held-out set), `/database-review` (case data schema, query performance).
## SELF-EVOLUTION TELEMETRY
If a project memory directory exists for this project under `~/.claude/projects/`, append an entry to its `skill-telemetry.md` for /evolve; skip silently otherwise.
Entry format:
```
### /litigation-predictor — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
```