precedent-finder

Search past deal clauses by text or clause type and return matches with similarity scores.

Updated Jan 13, 2026
One-click install
npx skills add https://github.com/aech-ai/aech-cli-legal --skill precedent-finder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: precedent-finder
Source: https://github.com/aech-ai/aech-cli-legal/tree/main/aech_cli_legal/skills/precedent-finder
Command: npx skills add https://github.com/aech-ai/aech-cli-legal --skill precedent-finder

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Find precedent clauses from past deals. This tool helps legal teams quickly locate similar language used in prior deals to ensure consistency and support negotiations.

Core Features & Use Cases

  • Semantic search for precedent clauses by text or clause type.
  • Context retrieval for matched provisions to review surrounding language and intent.
  • Import/export or copy of selected clauses into current documents for faster drafting.

Quick Start

Use the precedent-finder to retrieve similar clauses with a simple command:

  • python scripts/search_precedent.py "indemnification" --top-k 5
  • python scripts/show_context.py --clause-id "deal123_section5.2" --context-lines 20

Frequently Asked Questions about precedent-finder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find precedent clauses from past deals?

Find precedent clauses by searching a clause database using text input, file input, or clause-type queries. Results return matched provisions with deal names, dates, and similarity scores to support negotiations and ensure consistency.

How do I retrieve surrounding context for a matched precedent clause?

Retrieve context for a matched precedent clause using the context retrieval script. You provide a specific clause identifier and specify the number of context lines, returning the surrounding language and intent from the original deal document.

Can I search for precedent provisions by clause type or specific text?

Yes, semantic search supports finding precedent provisions by clause type or specific text input. You can query the database directly with terms like indemnification, returning top matched clauses ranked by similarity scores.

Does precedent search require any external dependencies or tools?

Precedent search relies on Python scripts and the aech-cli-legal workflow to execute queries and present results. No additional external dependencies are required beyond this environment to search and retrieve matched provisions.

What is the best way to compare similar language across prior deals?

The best way to compare similar language across prior deals is using semantic search to retrieve multiple matched provisions. You can review returned deal names, dates, and similarity scores, then retrieve surrounding context for each match.

How do I import matched precedent clauses into current documents?

Import or copy selected precedent clauses into current documents for faster drafting. After searching and reviewing the context of matched provisions, you can transfer the retrieved language directly into your active files.