诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
文档
contract-red-flag-scanner
试用Use when signing or reviewing any contract you haven't fully read — apartment lease, employment offer, Terms of Service, gym/phone subscription, freelancer agreement — and before paying a lawyer for a first pass: scans plain-text contract text for 20+ high-risk clause patterns (auto-renewal traps, arbitration and class-action waivers, one-sided termination penalties, liability caps, unilateral amendment rights, non-competes, fee schedules), infers the contract type, produces a risk-ranked findings report with plain-language explanations and the exact questions to ask the other side, plus a missing-clause checklist of protections that SHOULD be present but aren't.
它能做什么
Almost nobody reads the contracts they sign. Studies of ToS agreements estimate that actually reading all the agreements an average person clicks through would take 76 work-days a year — so people sign apartment leases with auto-renewal traps, employment offers with hidden non-competes, and subscri…
技能文档
Contract Red Flag Scanner
Overview
Almost nobody reads the contracts they sign. Studies of ToS agreements estimate that actually reading all the agreements an average person clicks through would take 76 work-days a year — so people sign apartment leases with auto-renewal traps, employment offers with hidden non-competes, and subscriptions with one-sided cancellation penalties. The consequences are real money: eviction for breaking a lease early, fees that compound monthly, rights silently signed away to arbitration.
This skill is a first-pass triage layer between you and the fine print. It does not replace a lawyer — it tells you whether you need one, and exactly what to ask. It scans plain contract text (paste, OCR output, or a .txt export) for a curated library of high-risk clause patterns, infers the contract type (lease / employment / ToS / service subscription), and outputs:
- Risk-ranked findings — HIGH / MEDIUM / LOW, each with the matched contract language, a plain-English explanation of what it means, and the concrete question to ask before signing.
- A scrutiny score (0–100) summarizing how adversarial the document is.
- A missing-clause checklist — protections that a fair contract of this type should contain (e.g., a lease without a habitability/repair clause, a subscription without a cancellation mechanism).
- A printable question list for the landlord / HR / vendor conversation.
Everything runs offline on pure stdlib Python — no contract text ever leaves the machine.
When to Use
- Apartment / house lease before signing — the #1 use case: early-termination penalties, deposit terms, auto-renewal, entry rights.
- Job offer or employment agreement — non-compete, non-solicit, IP assignment scope, at-will vs cause termination.
- Any subscription with a term commitment — gyms, phone plans, SaaS, solar leases: auto-renewal windows and cancellation fees.
- Freelance / contractor agreements — indemnification, kill fees, payment terms, work-for-hire scope.
- Terms of Service diffs that matter (platforms you depend on for income) — unilateral amendment, liability caps.
- Before paying a lawyer — arrive with a targeted question list instead of a blank page; lawyers bill by the hour you save.
- Don't use for: criminal matters, immigration, anything already in litigation — get a real attorney. Don't treat the absence of flags as legal clearance; the scanner is pattern-based, not a legal opinion.
How It Works
- Extract text — copy-paste the contract, or OCR a scanned PDF (
pymupdf,marker). Save as.txt. - Detect contract type — keyword scoring (landlord/tenant/premises → lease; employee/employer → employment; user agreement/terms → ToS; membership/monthly → subscription).
- Scan clause patterns — 20+ detectors, each a set of regexes with a base severity, an explanation, and a follow-up question. Detectors normalize whitespace and match case-insensitively.
- Rank and score — findings sort by severity; the scrutiny score weights HIGH=10, MEDIUM=4, LOW=1, capped at 100.
- Check for missing protections — per contract type, a list of clauses a balanced contract should contain; report any that are absent.
- Review the question list — every finding maps to one concrete question to ask before signing.
Commands
# Scan a lease (paste or export the text first)
python3 scripts/contract_scanner.py scan references/sample-lease.txt
# JSON output for programmatic use / agent pipelines
python3 scripts/contract_scanner.py scan contract.txt --json
# Force a contract type when detection is wrong
python3 scripts/contract_scanner.py scan offer.txt --type employment
# List all detectors and what they look for
python3 scripts/contract_scanner.py list-detectors
# Exit codes: 0 = clean-ish, 2 = HIGH findings present (usable in CI/hooks)
Example Session
$ python3 scripts/contract_scanner.py scan references/sample-lease.txt
CONTRACT TYPE: lease (confidence 0.86)
SCRUTINY SCORE: 47/100 — 2 HIGH, 3 MEDIUM, 1 LOW findings
[HIGH] AUTO-RENEWAL WITH STRICT NOTICE WINDOW
Matched: "shall automatically renew for successive twelve (12) month
terms unless Tenant provides written notice not less than sixty (60)
days prior to the end of the term"
Plain language: If you forget to send written notice exactly 60 days
out, you are locked in for another FULL year — not month-to-month.
Ask: "Can we make this renew month-to-month after the first term,
or reduce the notice window to 30 days?"
[HIGH] EARLY TERMINATION PENALTY — ALL REMAINING RENT
...
[MEDIUM] LATE FEE — FLAT PLUS DAILY ACCRETION
...
MISSING-CLAUSE CHECKLIST (lease):
[ ] Habitability / landlord repair obligation — NOT FOUND
[ ] Security deposit return deadline — NOT FOUND
[ ] Entry notice requirement — NOT FOUND
QUESTION LIST FOR THE OTHER SIDE:
1. Can renewal go month-to-month, or notice drop to 30 days?
...
Detector Library (abridged)
| Category | Detectors | Typical severity |
|---|---|---|
| Renewal & exit traps | auto-renewal notice windows, early-termination rent acceleration, cancellation fees, non-refundable prepayment | HIGH / MEDIUM |
| Rights waivers | binding arbitration, class-action waiver, jury trial waiver, severability of those waivers | HIGH |
| One-sided economics | late fees + daily accretion, unilateral price change, one-sided attorney fees, indemnification of the other party | MEDIUM |
| Scope creep | non-compete, non-solicit, broad IP assignment, unilateral amendment ("we may change these terms") | HIGH / MEDIUM |
| Operational | entry without notice, as-is condition, governing law far from you, assignment of the agreement without your consent | LOW / MEDIUM |
Full list: python3 scripts/contract_scanner.py list-detectors, documented in references/clause-guide.md.
Workflow for an Agent
- Get the contract text (paste, email attachment, OCR of scanned PDF).
- Save to a file, run
scan. If type detection looks wrong, re-run with--type. - Present findings to the user ranked, with the matched language quoted — never paraphrase away the actual contract wording; that wording is the evidence.
- Present the missing-clause checklist — absence of protection is often worse than a present-but-bad clause.
- Produce the question list as a copy-paste block for the user's email/conversation.
- If HIGH findings ≥ 2 or scrutiny score ≥ 60, recommend a lawyer review for those specific clauses (cheaper than full review).
Common Pitfalls
- Treating scanner output as legal advice. It is triage. A clean scan is not clearance; some traps are phrased in unmatchable legalese.
- Scanning a partial document. Schedules, exhibits, and "attachment A" fee tables often hold the worst terms. Extract the ENTIRE document.
- OCR garbage in, garbage out. Broken text causes false negatives (missed clauses), which are worse than false positives. Check the
.txtfor completeness first. - Ignoring the missing-clause checklist. Users fixate on what's flagged; what's ABSENT (no repair obligation, no deposit deadline) is where landlords win disputes.
- Signing anyway because "everything has these clauses." Arbitration clauses, 60-day notice windows, and rent acceleration are all negotiable before signature. After, never.
- Wrong contract type inference on short documents. A 1-paragraph addendum may misclassify; use
--type.
Verification Checklist
- Contract text extracted completely (all pages, schedules, exhibits)
-
scanran without errors and detected the right contract type - Findings presented with quoted matched language, not just labels
- Missing-clause checklist shown alongside findings
- Question list delivered as a copy-paste block
- If HIGH ≥ 2 or score ≥ 60: lawyer-review recommendation stated explicitly
相关技能
在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
为自然搜索排名提供站点审计、内容撰写与竞品分析。
voronindenis5 的更多技能
浏览全部技能Pryamoy Russkiy (Straight Russian) — AI assistant that tells it like it is. Direct answers, no fluff, occasional profanity. Specializes in honest analysis, t...
Prepare salary negotiations with a structured toolkit: market-rate anchoring math, walk-away floor calculation, total-compensation evaluation (equity, bonuses, benefits), negotiation scripts for offers, raises, and counter-offers, and BATNA analysis. Use when the user has a job offer, is preparing a raise conversation, wants to know if their pay is competitive, or needs scripts and a strategy for negotiating compensation.
Use when your calendar is eating your week and you want to know exactly where the time goes, when planning recurring meetings for a team, before proposing a new recurring meeting, when someone says 'we should sync weekly' and you want data, or when auditing which meetings to kill — imports ICS calendar files, measures meeting hours per week/person/meeting-series (including double-bookings and fragmentation), computes focus-time destruction from meeting placement, scores the true cost of each series (hours × attendees × frequency), flags specific meetings to kill/shorten/make-async using explicit rules, and simulates the recovered hours before anyone has to argue about it.
Audit password vault exports (Bitwarden, 1Password, KeePass, Chrome, Firefox) for reuse, weakness, staleness, breach exposure, and 2FA gaps without ever storing or transmitting a plaintext password. Use when the user asks to audit passwords, check password strength/reuse, review vault health, or verify whether credentials appeared in breaches.
Turn flat resume bullets ('Responsible for X') into quantified STAR-method achievement narratives, score resumes against job descriptions for ATS keyword coverage and weak-phrase hazards, and expand each bullet into interview-ready stories with likely follow-up questions. Use when the user is writing or updating a resume/CV, preparing bullets for a job application, tailoring a resume to a specific job posting, or preparing interview stories from their experience.
Agent self-awareness of cognitive states — context fatigue, attention drift, memory debt, confidence erosion, and skill staleness. Detect, report, and mitigate degrading conditions before they cause failures.