TIM SCHROEDER
Work / CMA Report Generator
Real-estate reporting tool

CMA Report Generator

A private tool that turns an agent's own MLS comp export into a branded comparative market analysis, with the pricing math shown and every judgement call flagged for review.

Private tool · used for real seller CMAsJul–Sep 2026
First page of a sample comparative market analysis for a fictional home at 100 Example Lane, Sampletown, showing a suggested price range, a point estimate, market price per square foot and the subject property's detailsSample report · fictional data, not a real property

The problem

A good CMA takes hours of copying comps, doing adjustment math by hand and formatting a report. Shortcuts produce comps that look close on paper but that no buyer would actually compare.

Who it's for

Tim and his brokerage, preparing a price opinion for a seller before a listing appointment.

Where AI is used

Claude Code wrote all of the code. A Claude Code skill runs the steps for one address and writes a short note on each comp from its full listing record. The prices and adjustments come from code, not from a model.

Built with

  • Node.js
  • Playwright
  • Headless Chrome
  • poppler
  • OpenStreetMap
  • Claude Code
01 · The problem

Pricing a home is judgement, buried in busywork

Before a listing appointment an agent pulls recent sales, picks the closest matches, adjusts each one for differences in size, age, beds, baths and pool, and turns it all into something a seller can read.

Most of that time goes on copying and arithmetic. The judgement that matters, which sales a real buyer would actually compare, gets the least time.

  • Picking comps on distance and size alone gives statistically close sales that buyers would never cross-shop.
  • Hand-done adjustment math is slow and hard for a seller to follow or check.
  • Sellers arrive having already seen the online estimates, and a report that ignores them puts the agent on the defensive.
  • Distressed or pre-arranged sales either disappear from the report, which raises questions, or drag the number down, which misleads.

Why custom software

MLS and CMA products build a report, but they do not encode Tim's own comp rules, show each adjustment line by line, or handle an awkward sale by showing it while leaving it out of the math. A small private tool could do exactly that, and keep licensed MLS data on his own machine.

02 · The solution

From one address to a report the seller can check

Tim exports the comparable sales from his own MLS account. The tool ranks them by his rules, adjusts each one in plain view, and prints a branded report as HTML and PDF.

Comps chosen by Tim's rules

Same-subdivision sales rank first. Closings within 90 days and homes within 15% of the subject's living area are preferred, and the tool widens one rule at a time only when too few sales qualify, saying so in the report.

Every adjustment itemized

Each comp shows its sold price, each dollar adjustment with its reason, and the adjusted value. The range is the middle half of the adjusted values, with a price-per-square-foot cross-check.

Shown, but not counted

A distressed or never-marketed sale can stay in the report with its photo and notes while being kept out of the price range. It carries a badge, a struck-through value and the stated reason.

Public online estimates, side by side

Reports list the automated estimates sellers have already seen, with each one's stated range, and says plainly when a source does not publish the comps behind its number.

Review flags for what the data cannot see

Condition, lot quality and seller concessions are not in the export, so every comp carries an explicit review flag. Non-standard sale terms and older closings are flagged too.

AI

A one-command workflow with notes

A Claude Code skill runs the steps for one address and writes a short note on each comp from its full listing record: lot, pool, days on market and how the sale actually closed.

03 · My role

What I did. What the AI did.

I set the pricing method, the data rules and the bar for a report I would hand a seller. Claude Code, an AI coding agent, wrote all of the code.

Tim · human judgement

I owned

  • Wrote the CMA standard the tool encodes: the comp hierarchy, the 90-day and 15% size rules, arm's-length sales only, and buyer perception over statistics.
  • Set the hard rule that the MLS is read-only: search, view and export, nothing else. I log in myself, one property at a time.
  • Chose not to buy a paid MLS data feed, and to keep raw exports and listing photos on my own machine and out of the repository.
  • Required every report to carry the public online estimates with their ranges, and to say when a source does not disclose its comps.
  • Confirmed that comp photos belong in a client-facing CMA.
  • Review each report before it goes out: which comps a real buyer would compare, and which sales should be shown but not counted.
Claude Code · AI implementation

AI did

  • Wrote all of the code: the export parser, the adjustment engine, the report templates, the read-only comp pull and the photo extractor.
  • Turned my method into the selection rules and the tunable settings file.
  • Found and fixed the bugs described below, and checked each fix by rendering a real report and comparing the numbers.
  • Runs the workflow through a Claude Code skill: records the subject's facts, pulls the comps, writes a note on each comp from its listing record, gathers the online estimates and hands me the PDF with a short summary.

I own the method and the judgement calls on each house. The agent writes the code and does the legwork, and nothing reaches a seller until I have reviewed it.

04 · How I built it with AI

From idea to production.

The git history runs from 22 July to 3 September 2026. Every one of the 23 commits was co-authored by Claude.

  1. Jul 2026 · Engine

    Parser, adjustment engine and branded report

    The first commit read the MLS comp export, adjusted each sale toward the subject and printed a branded HTML and PDF report.

    commit 4be6102 (22 Jul 2026)
  2. Jul 2026 · Method

    Tim's CMA standard written into code

    Same-subdivision-first ranking, the 90-day and 15% size gates, time adjustment for older sales, and review flags for anything the export cannot verify.

    commit 970b41a (22 Jul 2026)
  3. Jul 2026 · Data

    Read-only comp pull from Tim's own session

    A browser script runs the search and export in Tim's own logged-in MLS session, read-only. Its output was checked against a manual export.

    commits 4717dd1, 9f7f495 (22 Jul 2026)
  4. Jul 2026 · Client-ready

    Logo, photos and comp notes

    Reports gained a subject photo, one photo per sold comp and a written note on each comp. Raw exports and photos were taken out of version control as licensed data.

    commit 15f91c7 (25 Jul 2026)
  5. Aug 2026 · Accuracy

    Photo fix, page layout and shown-not-counted

    A photo bug that could put the wrong house beside a comp was fixed. Each comp got its own table so nothing strands at a page break, and a sale can now be shown but left out of the range.

    commits b05d0aa, db4af6b, 2c41600 (12 Aug 2026)
  6. Aug 2026 · Presentation

    Honest market stats and a presentation format

    The market snapshot was bounded to the window its heading names. Canceled listings were added as reference, and a second format adds a cover, a map and one page per listing.

    commits 58e8148, f6bece9, 7379f01 (20 Aug 2026)
  7. Sep 2026 · Refinement

    Seller credits shown as money that changed hands

    The presentation format gained a seller-credit and net-to-seller column, because a closing credit is not an adjustment and the gross price overstated two sales.

    commit 97e50ae (3 Sep 2026)
05 · Technologies

What it runs on, and why.

Every item here is in the project's code or configuration. I chose and connected them; AI coding agents wrote the code that uses them.

Report generator

Node.js
Parses the export, selects and adjusts comps, and fills the HTML templates. The generator uses only Node's built-in modules.
HTML and CSS templates
The branded report, sized to the 739px printable width of a Letter page
Headless Chrome
Prints the HTML report to PDF
OpenStreetMap and Esri tiles
The basemap for the comp map, with attribution printed on the page

Data in

MLS comp export (CSV)
The comparable sales, exported from Tim's own MLS account. It stays on his machine.
Playwright
Runs the read-only search and export in Tim's own logged-in session. It is the only third-party package.
poppler pdfimages
Extracts listing photos from a PDF report Tim downloads, one page at a time
Subject file (JSON)
The subject's verified facts, comp curation, comp notes and the public online estimates

AI

Claude Code
Wrote all of the code, and runs the one-address workflow through a skill
06 · System architecture

How the pieces fit.

Tim's own MLS export and a small subject file go in. Plain code selects and adjusts the comps, and a template prints the branded report.

CMA Report Generator architectureTim's own MLS export and a small subject file go in. Plain code selects and adjusts the comps, and a template prints the branded report./cma addressown loginexportrowscompswritesestimatesfacts, curationvaluationprintTimLogged in to his own MLSMLS sessionRead-only search + exportComp exportCSV, kept localAdjustment engineSelection rules + configClaude Code skillOne address at a timeSubject fileFacts, curation, notesParserNormalizes the exportReport rendererHTML templatePublic estimatesOnline AVMs + rangesPDFHeadless Chrome
InterfaceApp / serverAI serviceData / storageExternal serviceScheduled job
Technical detail for engineers
  • Selection runs in tiers: 15% size and 90 days first, then 180 days, then 25% size, relaxing one gate at a time and only while fewer than the minimum comps qualify. The report states which gate was widened.
  • Size adjustments use half of the market's median sold price per square foot by default, a buyer-paid figure rather than replacement cost. Year-built adjustments are capped at 5% of the sale price. All values live in one settings file and can be overridden per property for thin luxury or waterfront markets.
  • Three curation controls do different jobs: a whitelist narrows the comp grid only, an exclusion list removes a sale from the market statistics too, and shown-not-counted keeps a sale visible but out of the range. The engine refuses to build a report if every comp is excluded.
  • Images are embedded as data URIs because the PDF is printed from a local file, where anything not embedded prints blank. A missing photo falls back to a labelled placeholder.
  • Raw exports, subject files and listing photos are excluded from git as licensed data. Only a documented example subject file is tracked.
  • There is no automated test suite. Fixes were checked by rendering real reports and comparing comp counts, market statistics and valuations before and after.
07 · Challenges

Problems worth telling you about.

Real incidents from the project's history, each with how it was found, fixed and checked.

CHALLENGE 01

Photos that could land on the wrong house

Listing photos are pulled out of a PDF report, and the photo for each page is matched to a listing by position. The first extractor sometimes cut images short.

VERIFIEDOn a real seven-listing export, all seven photos came out byte-identical to a hand-extracted reference set, and all three failure paths exit with a specific message.
Why it was hard, what I decided, how AI helped
Why it was hard
It searched the raw PDF for the byte marker that ends a JPEG, but that marker can also appear inside the image data. A short fragment fell under the size filter and was dropped, so every later photo shifted onto the wrong listing, with no error.
My approach
I treated it as a client-facing risk: the wrong house beside a comp in a seller's report is worse than a missing photo.
How AI helped
Claude Code replaced the extractor with poppler's pdfimages, run one page at a time so the page-to-listing mapping never depends on file numbering. It added guards that stop instead of guessing.
The decision
Fail loudly. The run stops if the page count does not match the listing count, if a page has more than one photo, or if a saved image does not decode.
Evidence
commit b05d0aa (12 Aug 2026)
CHALLENGE 02

The sale that is evidence, but not of value

Some closings are real but say little about value: a seller in foreclosure, or a pre-arranged transfer. Leaving them out invites the question of why the house next door is missing, and counting them drags the estimate down.

VERIFIEDOn a real report with one comp marked: six comps shown, five counted, and the market snapshot unchanged at 98 sales, 95% sale-to-list and 35 median days on market.
Why it was hard, what I decided, how AI helped
Why it was hard
The existing exclusion control also removed the sale from the market statistics, quietly changing the snapshot. Neither hiding nor counting the sale was honest.
My approach
I wanted the sale in front of the seller with the reason stated, but out of the arithmetic.
How AI helped
Claude Code added a shown-not-counted setting that keeps the comp's photo, notes and adjustments but leaves its value out of the range. It renders a badge, a struck-through value and the reason, and names the comp in the methodology.
The decision
Narrow only the math, never the market statistics. One consequence is worth knowing: leaving out the lowest comp raises the estimate, so the report becomes more aggressive, not more cautious.
Evidence
commit 2c41600 (12 Aug 2026)
CHALLENGE 03

A market snapshot that counted the wrong window

The snapshot heading said "last N months", but the numbers behind it used every sale in the export. Exports are often pulled wider than the analysis window.

VERIFIEDOn one real report the 12-month pool dropped from 98 sales to 60 and inventory moved from 3.3 to 3.6 months. A report whose export already matched its window came out identical.
Why it was hard, what I decided, how AI helped
Why it was hard
Nothing looked wrong. The sale count was simply too high, and because months of inventory divides by the labelled window, inventory was understated too.
My approach
A label is a promise to the seller, so the numbers had to match the heading.
How AI helped
Claude Code bounded the market pool to the same window the heading uses, and checked that no comp selection changed.
The decision
Fix the data to match the label rather than relabel the data, since comp selection already used that window.
Evidence
commit 58e8148 (20 Aug 2026)
08 · Results

What is true today.

The tool is in private use. It has produced reports for seven properties, and its key behaviours are described in the commit history and checked against real reports.

23
commits, 22 Jul – 3 Sep 2026
Source: git log, stellar-cma repo, 2 Nov 2026
23 of 23
commits co-authored by Claude
Source: Co-Authored-By trailers in git log, 2 Nov 2026
7
properties analysed, across 14 report builds
Source: output/ report folders, excluding the demo, 2 Nov 2026
2
report formats: adjusted analysis and presentation CMA
Source: src/cma.js and src/cma-full.js
90 days · ±15%
default comp gates for recency and living area
Source: config/adjustments.json
1,688
lines of code: 9 source modules and 2 templates
Source: wc -l src/ templates/, 2 Nov 2026
  • Used for real seller CMAs, including a report rebuilt in September on a second agent's hand-picked comp list.
  • Every report shows the range, the point estimate, each itemized adjustment, the method, and a statement that it is not an appraisal.
  • Every sold comp carries an explicit flag to verify condition, lot and concessions, because the export cannot see them.
  • MLS data is used read-only, one property at a time, from Tim's own login. There is no bulk scraping, no scheduled pull and no paid data feed.
  • Raw exports and listing photos are kept out of the repository and never redistributed.
09 · Lessons

What this project taught me.

  1. A silent shift is worse than a crash. The photo bug threw no error, so the fix was to stop on any mismatch rather than guess.
  2. A heading is a promise. If the snapshot says "last 12 months", every number under it has to come from those 12 months.
  3. Show the awkward evidence, and say why it does not count. Hiding a sale invites doubt, and counting a distressed one misleads.
  4. Choose the data route that respects the licence. Working from my own login, one property at a time, was enough, so no paid feed or bulk pull was needed.
10 · Demo

See a sample report

Real reports contain licensed MLS data and real homes, so this tour uses a report the tool generated from invented data: a fictional subject and fictional comps.

Guided tour · fictional sample data, not a real report
  1. First page of the sample report with the suggested price range, point estimate and the fictional subject property's details
    STEP 1 OF 3

    The answer first

    Page one leads with the suggested range, the point estimate and the market price per square foot, then the subject's verified facts.

  2. A fictional comp marked Not counted in valuation with a struck-through adjusted value
    STEP 2 OF 3

    Every adjustment in view

    Each comp lists its adjustments with the reason. This one is shown for context but left out of the range, and the reason is printed beside it.

  3. Sample online estimates table above a market snapshot of five statistics
    STEP 3 OF 3

    Online estimates and the market

    The estimates sellers have already seen sit beside the comp evidence, followed by a snapshot of the local market.

Let's talk about
what you need built.

Open to AI roles: full-time, contract or consulting. I build AI products, internal tools and automations with AI coding agents.