realtor-cma-kit
Build a defensible price opinion for a listing — feed in the subject property plus comparable sales (sqft, beds, baths, sold price, distance, sold date) and it applies per-comp adjustments ($/sqft delta, bedroom/bathroom adjustments, distance-weighted averaging) and outputs an adjusted price opinion with a range, plus an optional self-contained branded HTML CMA report. Use when preparing a listing presentation or pricing a property.
$ skillbank install realtor-cma-kit@1.0.0 # pins exactly 1.0.0 · README + changelog included
Realtor CMA Kit
Overview
A comparative market analysis is the agent's core pricing work product: take 3–6 recent sales, adjust each for how it differs from the subject property, and land on a number you can defend at the kitchen table. This skill does the arithmetic — square-footage deltas at a configurable $/sqft, bedroom and bathroom adjustments, distance-decayed weighting — and prints an adjusted price opinion with a range. With --html it also writes a self-contained branded HTML report (subject summary, comp table with per-comp adjustments, opinion) you can send to the seller.
No dependencies, standard library only. All data stays local — nothing is uploaded.
Installation
1. Copy the realtor-cma-kit/ directory anywhere convenient. 2. Make the script executable (Unix):
chmod +x scripts/cma.py
3. Prepare your input JSON (see Configuration).
No pip install needed.
Configuration
The input file is a JSON object with subject and comps:
{
"subject": {"address": "1428 Maple Grove Ln, Allentown, PA 18104",
"sqft": 2100, "beds": 4, "baths": 2.5},
"comps": [
{"address": "1410 Maple Grove Ln", "sold_price": 385000,
"sqft": 2050, "beds": 4, "baths": 2.5,
"distance_miles": 0.3, "sold_date": "2026-08-15"}
]
}
Adjustment rates default to $150/sqft, $8,000/bed, $5,000/bath with weight = 1/(1 + miles × 0.5); override with --per-sqft, --per-bed, --per-bath, --decay-per-mile. Read references/comp-selection-rules.md for how to pick comps (recency, proximity, similarity) before you run the numbers.
Inputs
| Argument | Required | Description | |----------|----------|-------------| | --input | yes | JSON file with subject + comps. | | --html | no | Path to write the branded HTML CMA report. | | --per-sqft | no | $/sqft adjustment (default 150). | | --per-bed | no | $/bedroom adjustment (default 8000). | | --per-bath | no | $/bathroom adjustment (default 5000). | | --decay-per-mile | no | Distance weight decay (default 0.5). |
Worked example
cma.json (1 subject + 4 comps, tested):
$ ./scripts/cma.py --input cma.json --html cma-report.html
Subject: 1428 Maple Grove Ln, Allentown, PA 18104 (2,100 sqft, 4 bd / 2.5 ba)
Comp Sold Adjusted Weight
------------------------------------------------------------
1410 Maple Grove Ln $385,000 $392,500 0.87
88 Oakwood Dr $399,000 $381,500 0.74
512 Willow Ct $372,000 $400,500 0.65
2037 Cedar Ave $390,000 $389,500 0.80
------------------------------------------------------------
Adjusted price opinion: $390,737
Range: $384,249 - $397,225
HTML report written to cma-report.html
Comp math, e.g. 1410 Maple Grove Ln: +50 sqft × $150 = +$7,500, so $385,000 → $392,500. The opinion is the distance-weighted mean; the range is ± the weighted standard deviation. The HTML report contains the full adjustment table and can be opened in any browser.
Version history
Changelog — realtor-cma-kit
1.0.0 — 2026-09-27
- Initial release:
scripts/cma.py(stdlib-only,--helpsupported), SKILL.md with all five required sections, references playbook, MIT license.