Your 72-hour build window

71Hours
:
59Minutes
:
56Seconds
Deploy in 72 Hours

Build Your Underwriting Agent

50 properties. 10 seconds. Less than a dollar. Scored against your exact criteria.

2-3 hrs
Build Time
<$1
Per 50 Properties
99%
Cost Reduction
10 sec
Analysis Time

Six steps. Your rules. < $1 per batch.

Every command. Every configuration. Every API key. Follow this and you'll have a working underwriting agent analyzing real deals by tonight.

01

Install Node.js and create the project

10 min

You need Node.js 18 or higher. Check your version by opening Terminal (Mac) or Command Prompt (Windows) and running:

node --version

If you don't have it or it's below 18, install it from nodejs.org/download . Download the LTS version. Run the installer. That's it.

Now create your project:

mkdir underwriting-agent
cd underwriting-agent
npm init -y
npm install @anthropic-ai/sdk pdf-parse csv-parse dotenv exceljs

What each package does:

0/5
  • @anthropic-ai/sdk - Official Claude API client. Sends property data to Claude for analysis.
  • pdf-parse - Reads PDF files (offering memorandums, appraisals, property reports). Uses the v2 API with PDFParse class.
  • csv-parse - Reads CSV files (rent rolls, financial exports from your PM software).
  • exceljs - Reads Excel files (.xlsx, .xls). Actively maintained, zero security vulnerabilities.
  • dotenv - Loads your API key from a .env file so it's not hardcoded.
⚠️Do NOT use the xlsx (SheetJS) package — it has unpatched high-severity security vulnerabilities. Use exceljs instead.
After this step
Node.js project created with all dependencies installed. Ready to connect to Claude.
02

Get your Anthropic API key

5 min

Go to console.anthropic.com . Create an account if you don't have one.

Navigate to Settings → API Keys . Click Create Key. Name it underwriting-agent. Copy the key.

In your project folder, create a file called .env:

ANTHROPIC_API_KEY=sk-ant-your-key-here

Add credits to your account:

0/3
  • Go to Settings → Billing
  • Add a payment method and load $5. This is enough for ~250-500 property analyses.
  • Each analysis uses Claude Sonnet and costs about $0.01-0.02 per property.
💰Anthropic API: $0.01-0.02 per property analysis. $5 gets you started with hundreds of analyses.
⚠️Never commit your .env file to git. Add .env to your .gitignore.
After this step
Anthropic account funded, API key saved in your .env file. Claude is ready to analyze properties.
03

Write your underwriting criteria document

30 min

Create a file called criteria.md in your project folder. This is the most important file. It's YOUR investment thesis in plain English. Claude will evaluate every property against this document.

Start with this template. Replace every bracketed value with your actual numbers:

# My Underwriting Criteria

## Deal Killers (auto-reject if any are true)
- Location outside: [City/State or list of zip codes]
- Property type not: [SFR / Multi 2-4 / Multi 5+ / Commercial]
- Asking price above: $[MAX PRICE]
- Environmental issues (Phase I required)
- Structural issues requiring > $[AMOUNT] to repair
- [Add your own deal killers]

## Scoring Criteria (0-10 each)
- Cap Rate: Target [X]%+
  (10 = above target, 5 = at target, 0 = below [Y]%)
- Cash-on-Cash Return: Target [X]%+
- Occupancy Rate: Target [X]%+
  (10 = 95%+, 5 = 85%, 0 = below 70%)
- Rent-to-Market Ratio: How far below market?
  (10 = 20%+ below market, 5 = at market, 0 = above market)
- Neighborhood: A/B/C/D
  (10 = A, 7 = B, 4 = C, 0 = D)
- Deferred Maintenance: Relative to purchase price
  (10 = cosmetic only, 5 = moderate, 0 = major systems)
- Value-Add Potential: Can rents increase? Units added?
  (10 = multiple value-add plays, 0 = fully optimized)
- Financing: Seller financing? Assumable loan?
  (10 = seller financing available, 5 = conventional, 0 = hard money only)

## Scoring Weights
- Cap Rate: 20%
- Cash-on-Cash: 15%
- Occupancy: 15%
- Rent Upside: 15%
- Neighborhood: 10%
- Maintenance: 10%
- Value-Add: 10%
- Financing: 5%

## Red Flags (flag but don't auto-reject)
- Property taxes increased > 20% in last 2 years
- Insurance claims history
- Vacancy above 30%
- Negative cash flow at current rents
- Seller owned less than 2 years
- Flood zone or environmental concerns nearby

## Output I Want
For each property:
1. PASS / FAIL / REVIEW
2. Score 0-100 (weighted)
3. Top 3 strengths
4. Top 3 risks
5. Red flags found
6. Estimated rehab cost range
7. Projected Year 1 NOI
8. BUY / PASS / NEEDS_MORE_INFO

Tips for writing great criteria:

0/4
  • Be specific with numbers. "Good cap rate" means nothing. "Cap rate above 7%" is a rule the agent can enforce.
  • Include your ACTUAL deal killers. Think about the last deal you passed on. Why? Put that reason in the document.
  • Weight what matters most to YOU. If cash flow is king and appreciation is a bonus, weight accordingly.
  • This document is living. After your first batch analysis, you'll want to refine it. That's expected.
After this step
A complete criteria.md file with your deal killers, scoring weights, red flags, and output format. This is the brain of your underwriting agent.
04

Organize your property files

15 min

Create a folder called properties in your project. Drop your property reports into it.

underwriting-agent/
  .env
  criteria.md
  analyze.js          (will be created by Claude Code)
  properties/
    123-main-st.pdf   (offering memorandum)
    456-oak-ave.csv   (rent roll export)
    789-elm.xlsx      (broker's pro forma)
    deal-pipeline.csv (multiple properties in one file)

Supported file types:

0/4
  • PDF - Offering memorandums, appraisals, broker packages, inspection reports. The agent extracts all text and analyzes it.
  • CSV - Rent rolls, financial exports, property lists. Each row can be a unit or a property.
  • Excel (.xlsx) - Pro formas, broker spreadsheets, financial models. The agent reads all sheets.
  • Text (.txt) - Plain text property descriptions, MLS exports, notes.

How to get property reports:

0/5
  • LoopNet: loopnet.com - Download offering memorandums directly from listings.
  • Crexi: crexi.com - Commercial listings with downloadable packages.
  • Your broker: Ask for the full due diligence package in PDF format.
  • Your PM software: Export rent rolls as CSV from AppFolio (appfolio.com ), Buildium (buildium.com ), or RentManager.
  • County records: Pull tax records, sales history, and zoning from your county assessor's website.
⚠️The agent is only as good as the data you feed it. Garbage in = garbage out. Make sure your property reports have actual numbers (rent amounts, expenses, occupancy), not just marketing fluff.
After this step
A properties/ folder with your deals ready to analyze. PDFs, CSVs, and Excel files organized and loaded.
05

Generate and run the analysis script

20 min

Scroll down to unlock the full prompt below. Then follow these three steps:

0/3
  • Step A: Open claude.ai (free tier works) or install Claude Code in your terminal.
  • Step B: Copy the entire prompt from the section below this walkthrough. Paste it into Claude. Hit enter.
  • Step C: Claude will generate a complete analyze.js file. Copy that file into your underwriting-agent/ folder.
💡If you're using Claude Code in your terminal, just cd into your project folder first. Claude Code will create the file directly — no copy-paste needed.

What the generated script does:

0/7
  • Reads every file in your properties/ folder
  • Extracts text from PDFs (using PDFParse v2), parses CSVs, and reads Excel files with exceljs
  • Sends each property's data to Claude Sonnet with your criteria
  • Processes up to 5 properties simultaneously (parallel, with rate limiting)
  • Returns a JSON analysis for each: score, strengths, risks, red flags, recommendation
  • Outputs results.json (full data) and summary.csv (ranked spreadsheet)
  • Prints a ranked summary to your terminal

Running it:

# Analyze all properties in the folder
node analyze.js ./properties/

# Output will look like:
# ✓ Analyzed 47 properties in 12.3 seconds
# Cost: $0.72
#
# RECOMMENDED (8):
#  1. 123 Main St — Score: 91 — BUY
#  2. 456 Oak Ave — Score: 87 — BUY
#  ...
#
# REVIEW (12):
#  9. 789 Elm St — Score: 68 — NEEDS_MORE_INFO
#  ...
#
# PASS (27):
#  21. 101 Pine Rd — Score: 34 — PASS
#  ...
#
# Results saved to results.json and summary.csv

Open summary.csv in Excel or Google Sheets to see your ranked pipeline with all scores, flags, and recommendations in a sortable table.

06

Refine your criteria and build a weekly workflow

Ongoing

After your first batch, review the results critically:

0/4
  • Check the top 5 scored properties: Do you agree with the ranking? Would you actually pursue #1? If not, adjust your scoring weights.
  • Check the "PASS" properties: Did it reject anything you'd actually want? If so, your deal killers might be too strict.
  • Check for "NEEDS_MORE_INFO": These are properties where the agent couldn't find enough data. You either need better source documents or need to tell the agent what to assume when data is missing.
  • Check red flags: Is the agent catching things you'd catch? Missing things you'd catch? Update the red flags section in criteria.md.

Build your weekly analysis routine:

0/5
  • Every Monday: download new listings from LoopNet/Crexi/your broker into the properties/ folder
  • Run node analyze.js ./properties/
  • Open the summary CSV. Focus only on BUY and REVIEW properties.
  • Make offers on the top-scored properties. You've already done the initial underwriting.
  • Time spent: 10 minutes. Properties analyzed: 50+. Cost: less than a dollar.

Advanced: automate the pipeline

  • Set up a Zapier or n8n workflow that watches your email for broker packages, saves attachments to a Google Drive folder, and runs the analysis automatically.
  • Have the results emailed to you every morning: "3 new properties analyzed overnight. 1 BUY recommendation."
💰Total cost: ~$5/mo for a weekly 50-property analysis habit. That's 200+ properties analyzed per month for the price of a coffee.

Get the complete Underwriting Agent prompt

Drop your info to unlock the full Claude Code prompt. Ready to copy and paste.
Choose wisely. One playbook per person.

# Underwriting Agent — Claude Code Build Prompt # Analyze 50 property reports in 10 seconds for < $1 # # Stack: Claude API + Node.js + pdf-parse v2 + csv-parse + exceljs # Estimated build time: 2-3 hours # Cost per analysis: < $0.02 per property ...