I Built an Offline Contract Risk Analyzer That Flags the Clauses That Cost You the Most
Description and use
ClauseGuard is an offline, zero‑dependency contract risk analyzer that flags high‑risk clauses, explains them in plain language, and outputs a risk score, all running locally with only the Python standard library.
Problem
Contracts contain high‑risk clauses that are hard to spot; a 12‑month SaaS contract auto‑renewed and incurred a three‑month early‑termination fee because a 40‑word clause was buried on page 6 of a 9‑page agreement.
Outcome
ClauseGuard identifies 3 high‑risk clauses and 7 cautions in a sample contract, assigns a risk score of 40/100, and produces a self‑contained HTML report for pre‑signing review.
Workflow
- Clone the repository:
git clone https://github.com/Zhiyilang/clauseguard - Navigate into the directory:
cd clauseguard - Run the analyzer on a contract file:
python -m clauseguard.cli examples/sample_contract.txt - Optionally generate an HTML report:
python -m clauseguard.cli examples/sample_contract.txt --html report.html
Evidence
ClauseGuard is an offline, zero‑dependency contract risk analyzer written in pure Python standard library.
You paste contract text in; it flags high‑risk clauses, explains each one in plain language, and produces a risk score
The engine ships with 12 risk detectors covering auto‑renewal, unilateral modification, liability caps, broad indemnity, IP assignment, personal guarantees, non‑competes, arbitration venue, penalty clauses, and more
- Record date: 2026-10-12T11:55:55.379Z