contract-analyzer

contract-analyzer is a skill for Claude Code from Swih/mistral-mcp. It costs 44 tokens per session (1,016 once invoked), scanned A, original, MIT.

A document-analysis workflow for reading contracts in PDF or scanned form, extracting their clauses, and assigning risk scores. OCR means converting text in scans or images into machine-readable text.

In plain words
What is it for?
Use it when a user provides a contract PDF or public PDF URL and wants its clauses, obligations, important terms, and potential risks extracted in a structured format.
Why use it?
It removes the need to read scanned contract pages manually or connect separate text-recognition and analysis services. It returns structured information about obligations, risks, and key terms.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the mistral-mcp plugin — 11 skills shipped together

Good fit Use it when a user provides a contract PDF or public PDF URL and wants its clauses, obligations, important terms, and potential risks extracted in a structured format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/swih/mistral-mcp/contract-analyzer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Swih/mistral-mcp --skill contract-analyzer
Clone the repo
git clone --depth 1 https://github.com/Swih/mistral-mcp

Made for: Claude Code.

Or install mistral-mcp, the plugin that ships this one along with the rest of its 11 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for contract-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/swih/mistral-mcp/contract-analyzer.svg)](https://agentmods.dev/skills/swih/mistral-mcp/contract-analyzer)
Your own site
<a href="https://agentmods.dev/skills/swih/mistral-mcp/contract-analyzer"><img src="https://agentmods.dev/badge/skills/swih/mistral-mcp/contract-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,016 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01016
Opus 5 $0.00022 $0.00508
Sonnet 5 $0.00009 $0.00203
Haiku 4.5 $0.00004 $0.00102

Measured 7d ago against content hash c6573ba44088, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

contract-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-plugin/skills/contract-analyzer/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Contract analyzer

Extracts and risk-rates contract clauses from a PDF or scanned document using Mistral's native document AI. No third-party OCR dependency.

Profile requirements:

  • mistral_ocr + mistral_chat — available in core profile (default)
  • files_upload (to upload a local PDF) — requires MISTRAL_MCP_PROFILE=full
  • If the user provides a public URL, this skill runs entirely on the core profile

EU data residency: both mistral_ocr and mistral_chat stay within Mistral's EU infrastructure when the API key is an EU-region key.

Steps

Step 1 — Get the document

Ask the user for one of:

  • A public URL (direct link to the PDF) — works with core profile
  • A local file path → upload with files_upload (requires MISTRAL_MCP_PROFILE=full), note the returned file_id

Step 2 — OCR the contract

Call mistral_ocr with document_annotation_format: "markdown" for structured extraction:

{
  "document": {
    "type": "document_url",
    "documentUrl": "<URL from step 1>"
  },
  "document_annotation_format": "markdown"
}

If using a file upload: "type": "document_id", "documentId": "<file_id>" instead.

Concatenate structuredContent.pages[*].markdown across all pages.

Step 3 — Extract structured clauses

Pass the concatenated OCR text to mistral_chat with mistral-large-latest and a json_schema response format:

{
  "model": "mistral-large-latest",
  "temperature": 0,
  "response_format": {
    "type": "json_schema",
    "json_schema": {
      "name": "contract_analysis",
      "strict": true,
      "schema": {
        "type": "object",
        "properties": {
          "parties": { "type": "array", "items": { "type": "string" } },
          "effective_date": { "type": "string" },
          "duration": { "type": "string" },
          "governing_law": { "type": "string" },
          "clauses": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": { "type": "string" },
                "summary": { "type": "string" },
                "risk_level": {
                  "type": "string",
                  "enum": ["low", "medium", "high", "critical"]
                },
                "risk_reason": { "type": "string" }
              },
              "required": ["title", "summary", "risk_level", "risk_reason"]
            }
          },
          "overall_risk": {
            "type": "string",
            "enum": ["low", "medium", "high", "critical"]
          },
          "missing_protections": {
            "type": "array",
            "items": { "type": "string" }
          }
        },
        "required": ["parties", "clauses", "overall_risk"]
      }
    }
  },
  "messages": [
    {
      "role": "user",
      "content": "<OCR text>\n\nExtract all clauses from the contract above. For each clause, provide a title, one-sentence summary, and risk level (low/medium/high/critical) with the reason. Apply these risk escalation rules: termination-for-convenience → at least medium; unlimited liability → critical; IP assignment to other party → high; non-compete > 12 months → high; automatic renewal without notice → medium; governing law in foreign jurisdiction → medium."
    }
  ]
}

Read the full file on GitHub · 121 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 121 lines · 44 tokens per session scan A c6573ba44088

Subscribe to this mod's changes

contract-analyzer is a skill published in the GitHub repository Swih/mistral-mcp (15 stars, last pushed 9d ago), licensed MIT. It adds 44 tokens to every session and 1,016 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

meta-pdf-reformat-pipeline

Modernize a legacy PDF: structural extraction → natural-language rewrite of problem pages → audit summary → re-merge into the final PDF.

opensquilla/opensquilla · 35 tokens

audit-export

Export the full CocoAudit trail as a stakeholder-ready compliance document.

Snowflake-Labs/cocoplus · 15 tokens

official-doc

Produce a 31C official document (board resolution, formal notice, letter of position, certificate of authority) using the locked corporate template. Authoritative voice, declarative language, reference numbering, and official seal block. Renders to PDF + DOCX. Trigger when the user says "board resolution", "formal…

mishahanin/heading-os · 98 tokens

partnership-doc

Produce a 31C partnership document (MOU, Letter of Intent, or term sheet) using the locked corporate template. Legal-adjacent document defining mutual obligations, governance, territory, exclusivity, and confidentiality between 31 Concept and a counterparty. Renders to PDF + DOCX. Trigger when the user says "MOU"…

mishahanin/heading-os · 116 tokens

procure-quotazioni

Genera in serie procure alle liti (art. 83 c.p.c.) e lettere di quotazione compensi D.M. 55/2014 in DOCX per posizioni di recupero crediti, partendo da un Excel di posizioni o dai dati forniti, con rilevamento della fase processuale (monitorio, esecuzione forzata, opposizione a decreto ingiuntivo). Usa quando l'utente…

capazme/mcp-legal-it · 181 tokens

kamy

Generate production-ready PDFs (invoices, receipts, contracts, reports, brochures) from Handlebars templates or raw HTML using the Kamy API, and send them for e-signature with optional OTP identity verification, sender-chosen placement, auto-reminders, and a downloadable Certificate of Completion audit trail. Use…

Kamy-Development/kamy-plugin · 102 tokens