Teach Claude to read county rent data

A skill teaches Claude how to read county rents and what to say they can't tell you, then runs the script itself.

Every time you ask Claude about rents, you probably add the same briefing: compare percent changes, not dollars; these are asking rents; don't guess at causes; say which month the data ends. Skip it once and the answer drifts. A skill moves that briefing into a folder Claude reads on its own, next to the script it runs. This post builds one for county rents, using Zillow's free file.

Why a skill and not a longer prompt

In the last posts we built a rent agent, then put its tools behind an MCP server. A server gives Claude the data. It doesn't tell Claude how to read it, so the judgment still lives in your head and your prompts.

A skill is a folder with a SKILL.md file and whatever scripts it needs. Claude sees only the skill's name and one-line description at the start of a session. When your question matches, it loads the rest and follows it, including running the script. That makes it cheap to keep around: the long instructions cost nothing until a rent question shows up.

Two things keep it honest. Language models are bad at arithmetic, so the script computes every figure and the skill tells Claude to quote only those. And the skill spells out what the data can't say, which is the part people forget to ask for.

What goes in the skill

The whole SKILL.md fits on a screen. The description is the part that matters most, since it's how Claude decides whether to use the skill at all, so it says when to reach for it.

SKILL.md
---
name: rent-analysis
description: Compare county rents in any US state using Zillow's ZORI file. Use when asked how rents in a county are moving, how two counties compare, or whether to raise or hold rent. Runs rent_report.py, then explains what the index measures and what it can't tell you.
---
# Reading county rent data
Run `python rent_report.py STATE "County" ["County" ...]` from this folder (needs pandas). Quote only numbers from its JSON, never your own math, and name the `as_of` month.
## What the index measures
ZORI is Zillow's smoothed index of asking rents on listed homes and apartments. It is not what sitting tenants pay.
## How to compare
- Compare `yoy_pct`, not dollars. County rent levels differ for reasons unrelated to momentum.
- Read `yoy_pct` next to `vs_peak_pct` and `peak_month`: a county can be up on the year and still below its peak.
- Use `state_median_yoy_pct` and `yoy_rank` for context. Within a point of the median is "in line", not a story.
## What to say it can't tell
It can't tell your tenant's rent, your unit's rent, bedroom or neighborhood differences, vacancy, or why rents moved. Label any cause as a guess. If a county is in `not_found`, say so; don't substitute a neighbor.
End with one practical step: check comps near your property before changing a lease.

Take the comparison rule. As of September 2026, Palm Beach County's rent index sits at $2,673 and Lee County's at $1,827. That gap is real, and it says nothing about which market is moving. The percent change over the last year does, which is why the skill points Claude there first.

The "can't tell" section does the same job for caveats. Without it, a model asked "why are Lee rents soft?" will happily offer a story about supply or storms. With it, Claude says the file shows what happened, not why.

The script does the math

rent_report.py downloads Zillow's county CSV, builds one table per state in pandas, and prints JSON. The core is a single frame:

    table = pd.DataFrame(
        {
            "rent": in_state[latest].round(0),
            "yoy_dollars": (in_state[latest] - in_state[year_ago]).round(0),
            "yoy_pct": (100 * (in_state[latest] / in_state[year_ago] - 1)).round(2),
            "vs_peak_pct": (100 * (in_state[latest] / in_state.max(axis=1) - 1)).round(2),
            "peak_month": in_state.idxmax(axis=1).str[:7],
        }
    )

The year-ago column is found by calendar month, not by position, so a gap in the file raises an error instead of quietly comparing the wrong months. A county with no rent for the latest month drops out and comes back under not_found, and the skill tells Claude to say so rather than swap in a neighbor. That's how the gaps in Zillow's coverage get handled without you thinking about them.

Test it without an API key

There's no model in this project, so the tests are plain pytest. They build a small CSV in Zillow's layout, five Florida counties, one Georgia county as a decoy, and one county missing its latest month. Expected values are worked out by hand for a county that fell from its peak and one that kept climbing, and the tests check rent, year-over-year change, distance from peak and peak month.

Two tests guard the skill itself. One checks the frontmatter (a valid name, a description under the length limit, a "Use when" clause). The other keeps SKILL.md and the script from drifting apart:

def test_skill_only_names_fields_the_script_returns(rents):
    report = rent_report.compare(rents, "FL", ["Lee"])
    emitted = set(report) | set(report["counties"][0])
    named = set(re.findall(r"`([a-z_]+)`", SKILL.read_text()))
    assert named <= emitted

Rename yoy_pct in the script and forget the skill, and this fails. What the tests can't check is whether Claude follows the skill. That takes a real run.

Run it

We installed the skill and asked Claude Code "How are rents moving in Lee and Palm Beach County?", without mentioning the skill. Claude loaded it on its own, ran python3 rent_report.py FL "Lee" "Palm Beach", and answered:

Short version: as of September 2026, Palm Beach rents are climbing and Lee rents are flat.

  • Palm Beach is well above the state median and is setting new highs this month.
  • Lee is effectively flat on the year, below the state median, and still about 9% under its March 2023 peak. Flat on the year is not the same as recovering.

Then it listed what the index can't tell you, labeled its own theory about post-2023 supply as a guess, and ended with "check comps near your property." The prompt asked for none of that; the skill did. The numbers match TiRE's rent pages for Lee and Palm Beach.

Lee CountyPalm Beach CountyUnited StatesYoY %
Year-over-year rent change. Percent momentum is the comparison the skill pushes Claude toward, not the dollar gap between counties. Source: Zillow Observed Rent Index (ZORI) via TiRE · Lee County · Palm Beach County

Run it yourself

The full project (skill, script, tests, pinned requirements) is in our public repo. From a clone of that folder:

pip install -r requirements.txt
pytest
mkdir -p ~/.claude/skills/rent-analysis
cp SKILL.md rent_report.py ~/.claude/skills/rent-analysis/
claude --model claude-sonnet-5-5 -p "How are rents moving in Lee and Palm Beach County?"

Start a fresh Claude Code session after copying the folder so it picks up the skill. The Python that Claude runs needs pandas installed. You can also run the script directly, python rent_report.py FL "Lee", to see exactly what Claude sees.

Before you use it

  • It reads asking rents on listings, so use the answer to price your next lease, then check a few comps near your property.
  • Next: we'll add home values to the skill, so it can read rent against price for the same county.