Cre underwriting

From tinh2/skills-hub-registry · View interactive version

Cre underwriting is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Generate an institutional-grade commercial real estate underwriting model — input schema (T-12 income, T-3 trailing, rent roll, debt terms, exit assumptions), calc engine (Cap Rate, NOI, Cash-on-Cash, IRR, DSCR, Debt Yield, ROI, Equity Multiple, levered & unlevered returns).

How to use this skill

Skill file

Commercial Real Estate Underwriting Generator

You generate a complete institutional-grade CRE underwriting model. Output is real code (Python with openpyxl for Excel output) plus the Excel workbook itself plus a markdown investment memo — not a static spreadsheet template.

The pain you solve: CBRE 2025 research found 62% of CRE acquisitions analysts spend most of their time on data entry — copying numbers from Offering Memorandums into Excel. Cap rate validation alone takes ~3 hours per deal. This skill generates the model AND the data-extraction scaffold so the underwriter spends time on judgment, not typing.

============================================================

=== PRE-FLIGHT ===

============================================================

Gather and verify before generating:

Recovery:

============================================================

=== PHASE 1: INPUT SCHEMA ===

============================================================

Generate inputs.py defining the deal inputs as a strict Pydantic schema. Fields by section:

Property

Acquisition

Income (T-12 actual + Y1 underwritten)

Operating Expenses (Y1 underwritten)

Net Operating Income (derived: EGI − OpEx)

Debt

Exit

Growth Assumptions (10-year vectors)

Partnership (if syndication)

VALIDATION: Schema validates against a sample multifamily deal (10-unit, $1.5M purchase) without errors. All derived fields recompute correctly from primary fields.

FALLBACK: If user has a custom field, add via extra_fields: dict rather than hardcoding.

============================================================

=== PHASE 2: CORE CALCULATION ENGINE ===

============================================================

Generate calc.py with these formulas (cite each so the user can audit):

# Cap Rate = NOI / Purchase Price
#   Source: Appraisal Institute, "The Appraisal of Real Estate" 15th ed.

# Cash-on-Cash = (NOI - Debt Service) / Total Equity Invested
#   Year 1; should be > LP pref to make sense for value-add deals

# DSCR = NOI / Annual Debt Service
#   Lender minimum typically 1.20x-1.25x (multifamily), 1.30x+ (other)

# Debt Yield = NOI / Loan Amount
#   Lender minimum typically 7.5-9% — cap-rate-independent stress test

# Loan Constant = Annual Debt Service / Loan Amount
#   For amortizing loan: use PMT formula

# Annual Debt Service:
#   IO period: loan_amount * interest_rate
#   Amortizing: numpy_financial.pmt(rate/12, am_months, -loan) * 12

# Unlevered IRR: numpy_financial.irr([- total_basis, ncf_yr1, ..., ncf_yrN + sale_proceeds])
# Levered IRR:   numpy_financial.irr([- total_equity, cfat_yr1, ..., cfat_yrN + net_sale_to_equity])

# Equity Multiple = Sum(Distributions to Equity) / Total Equity Invested

# Terminal Value = Year_N+1_NOI / Exit Cap Rate
# Net Sale Proceeds = Terminal Value - Cost of Sale - Loan Balance at Exit

The engine MUST:

VALIDATION: Run engine against the textbook example (50 units, $7.5M purchase, 6% cap, 65% LTV, 5.5% interest 30am IO 24, 7-year hold, exit at 6.5% cap) and confirm Levered IRR matches the worked example within 10 bps.

============================================================

=== PHASE 3: 10-YEAR PROFORMA ===

============================================================

Generate the full 10-year cash flow waterfall:

| Line | Year 1 | Year 2 | ... | Year N (exit) |

| ----------------------------- | ------ | ------ | --- | ------------- |

| Gross Potential Rent | 1.20M | grown | | |

| (-) Vacancy | (60K) | | | |

| (-) Concessions | (10K) | | | |

| (+) Other Income | 80K | | | |

| Effective Gross Income | 1.21M | | | |

| (-) Operating Expenses | (480K) | | | |

| Net Operating Income | 730K | | | |

| (-) Capital Reserves | (15K) | | | |

| NOI after Reserves | 715K | | | |

| (-) Debt Service | (450K) | | | |

| Cash Flow After Debt | 265K | | | |

| (+) Sale Proceeds net of debt | | | | + 5.2M |

| Cash Flow to Equity | 265K | | | 5.46M |

Plus a Sources & Uses table at acquisition and a Sources & Uses at exit.

VALIDATION: Row totals reconcile (EGI − OpEx = NOI). Year N+1 NOI used for exit valuation, not Year N.

============================================================

=== PHASE 4: WATERFALL (for syndication deals) ===

============================================================

If GP/LP partnership is configured, generate the waterfall.

Standard CRE waterfall (American or European — default European, which is simpler and LP-friendly):

Tier 1: Return of Capital — 100% to LP until LP has received back original equity
Tier 2: Preferred Return — 100% to LP until LP IRR = preferred rate (typically 8%)
Tier 3: First Promote — 70/30 (LP/GP) until LP IRR = 12% (or configured threshold)
Tier 4: Second Promote — 60/40 until LP IRR = 18%
Tier 5: Final Promote — 50/50 above

Output per LP and per GP:

VALIDATION: Sum of (LP + GP) distributions = total distributable cash flow. GP carry only kicks in after LP IRR hurdle met.

FALLBACK: If single-investor deal, skip this phase entirely.

============================================================

=== PHASE 5: SENSITIVITY TABLES ===

============================================================

Generate three 2D sensitivities (the deal-killers):

  1. Exit Cap × Rent Growth → Levered IRR
  2. Entry Cap × Loan Constant → Cash-on-Cash Year 1
  3. Vacancy × OpEx Growth → DSCR Year 1

Each output as both a pandas DataFrame heatmap AND an Excel sheet with conditional formatting.

VALIDATION: Center cell of each sensitivity equals the base-case output.

============================================================

=== PHASE 6: INVESTMENT MEMO ===

============================================================

Generate memo.md (markdown) with these sections:

  1. Executive Summary (3 sentences: asset, basis per unit, headline returns)
  2. Returns Summary Table (Y1 cap, stabilized cap, Y1 CoC, levered IRR, equity multiple, DSCR Y1)
  3. Sources & Uses at acquisition
  4. Capital Stack diagram (text-based)
  5. Underwriting Assumptions Highlights (rent growth, expense growth, exit cap)
  6. Sensitivity Summary (best case / base case / downside)
  7. Risks & Mitigants (3-5 items, populated from heuristics: high LTV → refi risk; aggressive rent growth → stabilization risk; etc.)
  8. Recommendation (with a clearly-marked placeholder for the underwriter — model doesn't recommend, it presents)

VALIDATION: Memo renders without dangling markdown. All numbers tie to the proforma.

FALLBACK: If user wants PDF, add a step to convert via pandoc or weasyprint.

============================================================

=== SELF-REVIEW ===

============================================================

Score 1–5:

If any < 4:

============================================================

=== LEARNINGS CAPTURE ===

============================================================

Append to ~/.claude/skills/cre-underwriting/LEARNINGS.md:

<YYYY-MM-DD> — <asset type, deal size, capital stack>

============================================================

=== STRICT RULES ===

============================================================

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.