Analyze lending products including mortgages, HELOCs, and personal loans with amortization and comparison tools. Use when the user asks about mortgage comparison, fixed vs ARM rates, loan qualification, amortization schedules, extra payments, or buying points. Also trigger when users mention 'monthly payment calculation', '15-year vs 30-year mortgage', 'PMI', 'APR vs interest rate', 'HELOC', 'home equity', 'should I buy down the rate', 'biweekly payments', or ask how much house they can afford.
8k tokens
context cost
the whole folder, loaded on every use
2
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
161
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Initial adjustment cap (e.g., 2%): maximum first adjustment
Periodic cap (e.g., 2%): maximum change per adjustment period
Lifetime cap (e.g., 5%): maximum total increase over initial rate
When ARM may be appropriate: Planning to sell or refinance before the fixed period ends, expecting rates to decline, or comfortable with rate variability
Monthly Payment Calculation
The standard amortization formula for a fixed-rate loan:
PMT = P × [r(1+r)^n] / [(1+r)^n - 1]
Where: P = principal (loan amount), r = monthly interest rate (annual rate / 12), n = total number of payments (term in months)
Each payment splits into interest (decreasing) and principal (increasing) components:
The 15-year costs 33% more per month but saves 60% in total interest.
Example 2: Extra payment impact
Given: $300K 30-year mortgage at 6.5% (payment = $1,896.20/month). Borrower adds $200/month extra to principal, making the total payment $2,096.20/month.
Calculate: Time saved and interest saved.
Solution:
Without extra payments: 360 months, total interest = 360 × $1,896.20 - $300,000 = $382,633.
New term (closed-form estimate): n = -ln(1 - P × r / PMT_total) / ln(1+r) with r = 0.065/12 = 0.005417:
Exact amortization (month-by-month simulation, final payment partial): payoff in 277 months = 23 years 1 month (~23.1 years), total interest = $279,185. The closed form and the exact schedule agree closely.
Interest saved: $382,633 - $279,185 = $103,449.
Time saved: 360 - 277 = 83 months ≈ 6.9 years.
Total extra principal paid ≈ 276 × $200 = $55,200. Interest saved per dollar of extra payment: $103,449 / $55,200 ≈ $1.87.
Common Pitfalls
Comparing interest rate instead of APR — APR captures fees and gives a truer cost comparison
ARM teaser rates creating payment shock when the fixed period ends and rates adjust upward
Points breakeven: buying points is not worth it if selling or refinancing before the breakeven point
HELOC variable rate risk during rising rate environments — budget for rate increases
PMI costs making high-LTV loans more expensive than they appear — factor PMI into total monthly cost
Ignoring opportunity cost: extra mortgage payments at 3-4% vs investing at 7-10% expected return
Not shopping multiple lenders — rate quotes can vary 0.5%+ for the same borrower
Resetting to a 30-year term when refinancing — extends total payoff even if rate is lower
Ignoring closing costs in refinancing decisions (see debt-management refinance breakeven)
savings-goals (wealth-management plugin): down payment saving is a common goal-based savings target
liquidity-management (wealth-management plugin): mortgage payments are the largest fixed obligation in most household cash flow plans
Running the script
Run the reference implementation directly:
uv run scripts/lending.py # PEP 723 header resolves dependencies automatically
python3 scripts/lending.py # after: pip install numpy scipy
A bare run prints a demo covering payment calculation, extra-payment impact, LTV/PMI, DSCR, balloon payments, refinance analysis, points breakeven, and ARM resets. Use --verify to recompute the demo figures and assert they match this skill's worked examples (prints PASS/FAIL, exits nonzero on mismatch), and --help to list the available classes and functions. The file is primarily meant to be imported as a module (from lending import LendingAnalysis) rather than run standalone.
How to use it
Copy the folder
Take joellewis/lending from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
Check the name does not clash
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
Install what it needs
The instructions reference pip.
Without those the skill loads but fails at the first command.