Drop a contract, get answers. lawclaw rips through PDFs, spots risky clauses, diffs redlines, checks citations, and searches thousands of discovery docs—locally, so nothing leaves your machine. Built
by @jagadeeshmurali-coder
Drop a contract, get answers. lawclaw rips through PDFs, spots risky clauses, diffs redlines, checks citations, and searches thousands of discovery docs—loca...
clawhub install lawclaw📖 About This Skill
name: lawclaw description: Drop a contract, get answers. lawclaw rips through PDFs, spots risky clauses, diffs redlines, checks citations, and searches thousands of discovery docs—locally, so nothing leaves your machine. Built for attorneys and paralegals who bill by the hour and can't waste one. homepage: https://github.com/legal-tools/lawclaw metadata: {"clawdbot":{"emoji":"⚖️","requires":{"bins":["pdftotext","diff","grep","pandoc"]},"install":[{"id":"brew-poppler","kind":"brew","formula":"poppler","bins":["pdftotext"],"label":"Install pdftotext (brew)"},{"id":"brew-pandoc","kind":"brew","formula":"pandoc","bins":["pandoc"],"label":"Install pandoc (brew)"}]}}
lawclaw
Drop a contract, get answers.
lawclaw tears through legal documents the way you wish your associates would—fast, thorough, and without missing the indemnification clause buried on page 47. It extracts text from PDFs, flags key clauses, generates redline comparisons, validates citations, and searches entire discovery sets for the one sentence that wins your case.
Everything runs locally on your machine. No uploads, no third-party servers, no risk to attorney-client privilege. Just you, your terminal, and a very sharp claw.
Who it's for: Attorneys, paralegals, and legal ops teams doing contract review, litigation support, due diligence, e-discovery, or brief-writing.
What it replaces: Hours of Ctrl+F across dozens of PDFs.
Core Capabilities
Document Analysis
pdftotext grep -i "indemnification\|liability\|warranty" contract.txtwc -w document.txtpdfinfo Contract Clause Extraction Use grep with regex to find common clauses:
grep -i "indemnif\|hold harmless" contract.txtgrep -i "terminat\|cancellation" contract.txt -A 3grep -i "confidential\|proprietary\|NDA" contract.txt -A 3grep -i "force majeure\|act of god" contract.txt -A 3grep -i "jurisdiction\|venue\|governing law" contract.txt -A 2grep -i "arbitration\|dispute resolution" contract.txt -A 3grep -i "non-compete\|noncompete\|restrictive covenant" contract.txt -A 3grep -i "assign\|transfer\|delegate" contract.txt -A 2Redline / Comparison
diff -u original.txt revised.txt > redline.diffdiff -y original.txt revised.txt | lesswdiff original.txt revised.txt > changes.txtpandoc contract.docx -t plain -o contract.txtCitation and Reference Checking
grep -E "[0-9]+ [A-Z]\.[A-Za-z0-9.]+ [0-9]+" brief.txtgrep -E "[0-9]+ U\.S\.C\. § [0-9]+" document.txtgrep -E "[0-9]+ C\.F\.R\. § [0-9]+" document.txtgrep -E "\[[0-9]+\]" brief.txtgrep -E "[A-Z][a-z]+, [0-9]+ [A-Z]\." brief.txtDocument Organization
find . -name "*.pdf" -type fgrep -r "key term" ./discovery/find . -name "*.pdf" -mtime -7 -lsfor f in *.pdf; do mv "$f" "Exhibit_${f}"; doneDiscovery Support
pdfinfo document.pdf | grep Pagesfor f in *.pdf; do pdftotext "$f" "${f%.pdf}.txt"; donels -lh *.pdf > production_log.txtgrep -r "PROD[0-9]\{6\}" ./documents/Due Diligence
grep -i "material adverse\|intellectual property\|pending litigation" diligence/*.txtgrep -E "[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}" contract.txtgrep -E "\$[0-9,]+(\.[0-9]{2})?" agreement.txtgrep -E "WHEREAS|Party|Seller|Buyer|Lessor|Lessee" contract.txtDeposition / Transcript Analysis
grep -i "Q\." deposition.txt | grep -i "keyword"grep "A\." deposition.txt -A 2wc -l transcript.txtPrivilege Log Support
find ./documents -type f -exec ls -lh {} \; > privilege_log.csvgrep -ri "attorney-client\|work product" ./emails/grep -rli "attorney-client" ./emails/ > privileged_files.txtCommon Workflows
Contract Review Checklist
1. Extract text: pdftotext contract.pdf contract.txt
2. Scan key clauses:
- grep -i "limitation of liability" contract.txt
- grep -i "indemnification" contract.txt
- grep -i "termination" contract.txt
- grep -i "confidentiality" contract.txt
- grep -i "governing law" contract.txt
3. Extract monetary terms: grep -E "\$[0-9,]+" contract.txt
4. Flag deadlines: grep -i "within [0-9]+ days\|business days\|calendar days" contract.txt
Redline Workflow
1. Convert both versions: pandoc original.docx -t plain -o original.txt && pandoc revised.docx -t plain -o revised.txt
2. Generate diff: diff -u original.txt revised.txt > changes.diff
3. Side-by-side: diff -y original.txt revised.txt | less
Discovery Review
1. Extract all PDFs: for pdf in discovery/*.pdf; do pdftotext "$pdf" "${pdf%.pdf}.txt"; done
2. Search across all docs: grep -ri "responsive term" discovery/*.txt
3. Generate document index: ls -lh discovery/*.pdf > document_index.txt
Due Diligence Package Review
1. Extract all docs: find diligence/ -name "*.pdf" -exec pdftotext {} \;
2. Search for red flags: grep -ri "litigation\|breach\|default\|bankruptcy" diligence/*.txt
3. Extract unique dates: grep -Eroh "[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}" diligence/*.txt | sort -u
Brief / Motion Citation Check
1. Extract citations: grep -E "[0-9]+ [A-Z]\.[A-Za-z0-9.]+ [0-9]+" brief.txt
2. Cross-reference ToA: diff <(grep -oE "[0-9]+ [A-Z]\.\S+ [0-9]+" brief.txt | sort -u) <(sort toa.txt)
Notes
pandoc before analysiswdiff for word-level comparison: install via brew install wdiffgog skill for Google Workspace integration (Drive, Gmail, Sheets)tesseract: brew install tesseractSecurity & Ethics Reminders
📋 Tips & Best Practices
pandoc before analysiswdiff for word-level comparison: install via brew install wdiffgog skill for Google Workspace integration (Drive, Gmail, Sheets)tesseract: brew install tesseract