When should you use it?
- Abstracting a stack of leases for a property manager or acquisition
- CPA firms reviewing lease terms for lease accounting
- Building a key-terms register for vendor contracts
Not for: Legal interpretation of clauses
What do you need, and what do you get?
You need
- Agreements as PDF or text
- The list of terms you need
- An API key and Python for the full notebook
You get
- Key-terms summary per document, organized by section
How does it work, step by step?
- Open the notebookOpen it on GitHub, or clone the repository and run it in Jupyter or Colab.
- Add an API keyThe notebook calls the model API; set the key as an environment variable, never in the notebook.
- Swap in your dataReplace the example data with a small, anonymized sample of your own.
- Check the resultsCompare outputs against what a person would have produced before using it on real work.
The prompt
Our adapted version, written to work in Claude. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Summarize this agreement into key terms. Sections: parties; property or subject; term (start, end, renewal); money (rent or fees, increases, deposit); responsibilities; consent and notices; special provisions; {extra_terms}. Use bullet points under each section, give the page or clause for each figure, and write 'Not specified' where the document is silent. Agreement: {agreement_text}
The original workflow is published by Anthropic on GitHub (anthropics/claude-cookbooks). Open it there to install or import it; the prompt above is our own adaptation.
What can go wrong?
- Check every date and amount against the document; summaries can drop a digit.
- Scanned leases need good text extraction first.
Our take
Lease and contract abstraction is slow, repetitive and billable, which makes it a good fit for a structured summary that a person then checks. What the notebook adds over a quick 'summarize this' is structure: a fixed list of sections, an explicit 'not specified' for missing terms, and methods for checking quality. The 'not specified' rule matters most, because an abstract that silently skips a missing renewal clause is worse than none. In our dry run on a sample 14-page commercial sublease, our prompt extracted parties, premises, a 36-month term, rent with a 3% annual increase, the deposit, maintenance split and notice addresses, and marked the renewal option as not specified, which was correct. Have someone tick each figure against the page number before the abstract goes into a register. For a portfolio, keep every abstract in the same format so you can compare terms across leases, such as notice periods and renewal dates, in a single table.
Where the time goes back: Abstracting a lease drops from an hour of reading to a check of a structured draft.
FAQ
Can it handle a 60-page lease?
Is this legal advice?
Source and credit
This playbook is based on work by Anthropic. We summarize it and link to it and write our own adapted prompt.
- Original
- Summarization guide · anthropics/claude-cookbooks
- Creator
- Anthropic
- Published on
- GitHub (anthropics/claude-cookbooks)
- Original date
- Aug 7, 2024
- License
- MIT
- Originally for
- Claude
- AI dry run
- Oct 20, 2026: passed. Dry-run tested by our AI test agent on sample input. Page/clause cited per figure; missing term marked.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
The original is licensed under the MIT License (Copyright (c) 2023 Anthropic). Modified: our adapted prompt and summary are our own wording; the original is unchanged at the source link.
Are you the creator? Claim or correct this page.