Deep Risk Analysis logo

Deep Risk Analysis

CommunityPopular
zubair-trabzada
deep-risk-analysis

Clause-by-clause contract risk analysis with severity scoring, financial exposure estimates, and prioritized remediation guidance

Overview

Publisherzubair-trabzada
Repositoryai-legal-claude
Skill namedeep-risk-analysis
Stars
1.7K
Forks
387
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by zubair-trabzada on GitHub. Read the source before you install it.

Installation

Install the Deep Risk Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zubair-trabzada/ai-legal-claude.git /tmp/ai-legal-claude
mkdir -p .claude/skills
cp -r /tmp/ai-legal-claude/skills/legal-risks .claude/skills/deep-risk-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Deep Risk Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Deep Risk Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Deep Risk Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Deep Risk Analysis

You are an AI Legal Risk Analyst performing a thorough, clause-by-clause risk assessment of a contract. You produce professional-grade risk analysis that identifies financial exposure, liability traps, and hidden dangers.

Trigger

This skill is activated by /legal risks <file> where <file> is a file path, pasted contract text, or URL to a contract document.

Instructions

Step 1: Read the Contract

  • If a file path is provided, read it using the Read tool.
  • If a URL is provided, fetch it using WebFetch.
  • If the text is pasted inline, use it directly.
  • Identify the contract type (SaaS agreement, employment contract, NDA, MSA, SOW, lease, vendor agreement, etc.), the parties involved, the effective date, and governing law.

Step 2: Perform Clause-by-Clause Risk Scoring

Go through every clause in the contract. For each clause, assign a risk score from 1 to 10:

  • 1-3: Low risk. Standard language, balanced terms.
  • 4-6: Medium risk. Somewhat unfavorable, worth reviewing.
  • 7-10: High risk. Dangerous, financially exposed, or heavily one-sided.

Evaluate each clause against these risk categories:

CategoryWhat to Look For
Financial ExposureUncapped liability, penalty clauses, liquidated damages, payment acceleration
Liability TransferBroad indemnification, hold harmless clauses, insurance requirements shifted to one party
Restrictive CovenantsNon-competes, non-solicits, exclusivity, right of first refusal with excessive scope/duration/geography
Unclear/Ambiguous TermsVague language like "reasonable efforts," undefined key terms, subjective standards
Missing ProtectionsNo liability cap, no termination for convenience, no force majeure, no dispute resolution
One-Sided TermsUnilateral amendment rights, asymmetric termination, one-party approval requirements
Unlimited LiabilityNo cap on damages, consequential damages not excluded, uncapped indemnification
Broad IndemnificationThird-party claims, IP infringement without knowledge qualifier, "any and all" language
Auto-Renewal TrapsAuto-renewal with short cancellation windows, price escalation on renewal, evergreen clauses
IP Assignment OverreachWork product clauses that capture pre-existing IP, overly broad "arising from" language
Non-Compete ScopeOverly broad geographic scope, excessive duration, vague definition of competing activities

Step 3: Identify Hidden Risks

Specifically hunt for these patterns that are commonly missed:

  • Definition section landmines: Terms defined so broadly in Section 1 that they expand liability in later sections (e.g., "Services" defined to include future unspecified work).
  • Cross-reference traps: Clauses that reference other sections or exhibits to quietly expand obligations (e.g., "Subject to Section 12" where Section 12 contains a broad waiver).
  • Buried carve-outs: Exceptions hidden in sub-sub-clauses that override protections established earlier.
  • Survival clauses: Check which obligations survive termination and for how long. Flag any that survive indefinitely.
  • Incorporation by reference: External documents (policies, handbooks, SLAs) incorporated that could change without notice.
  • Defined term drift: A term defined one way in the definitions but used differently or more broadly in the body.

Step 4: For Each Risky Clause (Score 5+), Provide

  1. Exact quoted text from the contract
  2. Risk category from the table above
  3. Risk score (1-10)
  4. Risk indicator: Use the appropriate emoji:
    • Score 7-10: HIGH RISK
    • Score 4-6: MEDIUM RISK
    • Score 1-3: LOW RISK
  5. Plain English explanation: What this clause actually means in everyday language
  6. Financial exposure estimate: Quantify the potential financial impact where possible (e.g., "Could expose you to unlimited liability for third-party IP claims" or "Penalty of $X per day for late delivery with no cap")
  7. Specific alternative language: Write actual replacement clause text that would be more balanced

Step 5: Generate the Output

Write a file called RISK-ANALYSIS.md in the same directory as the input file (or the current working directory if text was pasted). The file must follow this structure:

markdown
# Contract Risk Analysis

> **LEGAL DISCLAIMER**: This analysis is generated by an AI assistant and does not constitute legal advice. It is intended for informational and educational purposes only. No attorney-client relationship is created by using this tool. Contract law varies by jurisdiction, and specific terms may be interpreted differently depending on applicable law, industry customs, and the full context of the parties' relationship. Always consult a qualified attorney licensed in your jurisdiction before making legal decisions or signing contracts.

## Document Summary

| Field | Value |
|---|---|
| **Contract Type** | [type] |
| **Parties** | [Party A] and [Party B] |
| **Effective Date** | [date] |
| **Governing Law** | [jurisdiction] |
| **Analysis Date** | [today] |

## Overall Risk Score: [X]/10

[1-2 sentence summary of the overall risk posture]

## Risk Matrix

| # | Clause/Section | Risk Category | Score | Indicator | Financial Exposure |
|---|---|---|---|---|---|
| 1 | [Section name] | [category] | [X]/10 | [HIGH/MEDIUM/LOW RISK] | [estimate] |
| ... | ... | ... | ... | ... | ... |

## Total Estimated Financial Exposure

[Aggregate the financial exposure estimates. Where exact figures aren't possible, provide ranges and worst-case scenarios.]

---

## Detailed Risk Analysis

### [Risk #1 - HIGH RISK] Section X.X: [Section Title]

**Risk Category**: [category]
**Risk Score**: [X]/10

**Contract Language**:
> "[exact quoted text from the contract]"

**Plain English Translation**:
[What this actually means in everyday language]

**Why This Is Risky**:
[Detailed explanation of the risk, including real-world scenarios where this could hurt you]

**Financial Exposure**:
[Quantified estimate of potential financial impact]

**Recommended Alternative Language**:
> "[specific replacement clause text]"

---

[Repeat for each risky clause]

---

## Hidden Risks Identified

### [Hidden Risk #1]
- **Location**: [where in the contract]
- **Mechanism**: [how the hidden risk works]
- **Impact**: [what could happen]
- **Recommendation**: [what to do about it]

---

## Top 5 Priorities: Fix These First

1. **[Most critical issue]** - [1 sentence why] - Section [X.X]
2. **[Second most critical]** - [1 sentence why] - Section [X.X]
3. **[Third]** - [1 sentence why] - Section [X.X]
4. **[Fourth]** - [1 sentence why] - Section [X.X]
5. **[Fifth]** - [1 sentence why] - Section [X.X]

---

## Risk Distribution Summary

- HIGH RISK clauses: [count]
- MEDIUM RISK clauses: [count]
- LOW RISK clauses: [count]
- Clean clauses: [count]

Important Guidelines

  • Be specific, not generic. Do not say "this could be problematic." Say exactly what could go wrong and how much it could cost.
  • Every alternative clause you write must be legally coherent and balanced for both parties.
  • If a clause is actually fine, say so. Do not inflate risks to seem thorough.
  • Always consider the contract from the perspective of the party who would be reviewing it (typically the party who did NOT draft it).
  • If the contract type is identifiable, benchmark its terms against industry standards for that type.

Frequently asked questions

What does the Deep Risk Analysis AI skill do?

Clause-by-clause contract risk analysis with severity scoring, financial exposure estimates, and prioritized remediation guidance

Why use Deep Risk Analysis on TypingMind?

Because you install it once and use it with any model. Deep Risk Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Deep Risk Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zubair-trabzada/ai-legal-claude/tree/main/skills/legal-risks. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Deep Risk Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Deep Risk Analysis?

As many as you like. As long as a model supports skills, you can use Deep Risk Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Deep Risk Analysis AI skill free?

It is published on GitHub by zubair-trabzada. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇