MCPInstall

lending

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.

Installs
706
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/joellewis/finance_skills --skill lending
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads lending automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Lending Analysis

Core Concepts

Fixed-Rate Mortgage

The interest rate and monthly payment remain constant for the life of the loan:

  • Advantages: Predictable payments, protection against rising rates, simpler budgeting
  • Disadvantages: Higher initial rate than ARM, no benefit if rates decline (must refinance)
  • Most common terms: 30-year and 15-year fixed

Adjustable-Rate Mortgage (ARM)

Rate is fixed for an initial period, then adjusts periodically based on an index plus a margin:

  • Notation: 5/1 ARM = fixed for 5 years, adjusts annually thereafter; 7/1, 10/1 similarly
  • Fully indexed rate: Index (e.g., SOFR, 1-year Treasury) + margin (e.g., 2.75%)
  • Rate caps protect against extreme adjustments:
    • 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:
    • Interest portion: remaining balance × monthly rate
    • Principal portion: PMT - interest portion

Total Interest Paid

  • Total interest = (n × PMT) - P
  • For a $400K, 30-year loan at 6.5%: PMT = $2,528, total payments = $910,178, total interest = $510,178

Extra Payments

Additional principal payments reduce the outstanding balance, shorten the loan term, and reduce total interest:

  • Each extra dollar goes entirely to principal reduction
  • Impact compounds: earlier extra payments save more interest than later ones
  • Methods: lump sum, fixed monthly extra, biweekly payments (26 half-payments = 13 full payments per year)

Mortgage Points

Prepaid interest that reduces the loan's interest rate:

  • 1 point = 1% of the loan amount (e.g., 1 point on $400K = $4,000)
  • Typically reduces the rate by approximately 0.25% (varies by lender and market)
  • Breakeven calculation: Points cost / monthly savings = months to recoup
  • Points make sense when: planning to hold the loan beyond breakeven, itemizing deductions (points may be tax-deductible in year of purchase)

APR vs Interest Rate

  • Interest rate: The cost of borrowing the principal, expressed annually
  • APR (Annual Percentage Rate): Includes the interest rate plus certain fees and costs (origination fees, points, PMI), annualized over the loan term
  • APR > interest rate (always, when there are fees)
  • APR is the better metric for comparing loan offers with different fee structures

HELOC (Home Equity Line of Credit)

A revolving credit line secured by home equity:

  • Combined LTV (CLTV): (First mortgage balance + HELOC limit) / home value
    • Most lenders require CLTV ≤ 80-90%
  • Draw period (typically 10 years): borrow and repay flexibly, often interest-only payments
  • Repayment period (typically 20 years): no new draws, fully amortizing payments
  • Variable rate: Typically prime rate + margin; rate fluctuates with market
  • Use cases: Home improvements, debt consolidation, emergency backup (but not as primary emergency fund)
  • Risk: Home is collateral — default means foreclosure

Loan Qualification Criteria

  • FICO score: 620+ for conventional, 580+ for FHA, 700+ for best rates
  • DTI: Front-end ≤ 28%, back-end ≤ 36-43% (varies by program)
  • LTV (Loan-to-Value): Loan amount / property value; lower LTV = lower risk = better terms
  • Reserves: Months of payments held in liquid assets after closing (2-6 months typical)
  • Employment/income: Stable income history, typically 2 years documentation

PMI (Private Mortgage Insurance)

Required when conventional loan LTV exceeds 80%:

  • Cost: 0.5-1.5% of loan amount annually, added to monthly payment
  • Removal: Automatic at 78% LTV (based on original amortization), requestable at 80% LTV
  • Avoidance strategies: 20% down payment, piggyback loan (80/10/10), lender-paid PMI (higher rate), VA loan (no PMI)
  • PMI benefits the lender, not the borrower — it is pure cost to the borrower

15-Year vs 30-Year Comparison

  • 15-year: Higher monthly payment, lower interest rate (typically 0.5-0.75% less), dramatically less total interest, builds equity faster
  • 30-year: Lower required payment, more flexibility, higher total interest cost
  • Hybrid approach: Take a 30-year for flexibility, make extra payments as if it were a 15-year

Key Formulas

FormulaExpressionUse Case
Monthly paymentPMT = P × [r(1+r)^n] / [(1+r)^n - 1]Fixed-rate loan payment
Total interestn × PMT - PTotal cost of borrowing
Remaining balance after k paymentsB_k = P × [(1+r)^n - (1+r)^k] / [(1+r)^n - 1]Balance at any point
Points breakevenCost of points / monthly savingsMonths to recoup points
LTVLoan amount / property valueRisk and PMI assessment
CLTV(First mortgage + HELOC) / home valueCombined leverage
ARM fully indexed rateIndex + marginRate after fixed period

Worked Examples

Example 1: 30-year vs 15-year mortgage comparison

Given: Home price $500K, down payment $100K, loan amount $400K. 30-year rate: 6.5%. 15-year rate: 5.9%. Calculate: Monthly payments, total interest, and interest savings. Solution:

  1. 30-year monthly payment: PMT = $400,000 × [0.005417 × (1.005417)^360] / [(1.005417)^360 - 1]
    • r = 6.5%/12 = 0.005417, n = 360
    • PMT = $2,528/month
  2. 30-year total interest: 360 × $2,528 - $400,000 = $510,178
  3. 15-year monthly payment: PMT = $400,000 × [0.004917 × (1.004917)^180] / [(1.004917)^180 - 1]
    • r = 5.9%/12 = 0.004917, n = 180
    • PMT = $3,354/month
  4. 15-year total interest: 180 × $3,354 - $400,000 = $203,694
  5. Payment difference: $3,354 - $2,528 = $826/month more for 15-year.
  6. Interest savings: $510,178 - $203,694 = $306,484 saved by choosing 15-year.
  7. 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:

  1. Without extra payments: 360 months, total interest = 360 × $1,896.20 - $300,000 = $382,633.
  2. New term (closed-form estimate): n = -ln(1 - P × r / PMT_total) / ln(1+r) with r = 0.065/12 = 0.005417:
    • n = -ln(1 - $300,000 × 0.005417 / $2,096.20) / ln(1.005417) ≈ 276.3 payments.
  3. 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.
  4. Interest saved: $382,633 - $279,185 = $103,449.
  5. Time saved: 360 - 277 = 83 months ≈ 6.9 years.
  6. 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)

Cross-References

  • debt-management (wealth-management plugin): refinancing analysis, debt payoff vs investing decisions, DTI calculations
  • emergency-fund (wealth-management plugin): adequate reserves required for loan qualification and financial safety
  • tax-efficiency (wealth-management plugin): mortgage interest deductibility, points deduction
  • 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.

FAQ

What does the lending skill do?

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.

How do I install lending?

Run npx skills add https://github.com/joellewis/finance_skills --skill lending in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/lending/ (personal) or .claude/skills/lending/ (project).

Which AI agents can use lending?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is lending safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains lending?

It is published by joellewis in joellewis/finance_skills. It has 706 recorded installs.

More from joellewis/finance_skills

View all →

asset-allocation

joellewis/finance_skills

Determine how to distribute capital across asset classes using strategic and tactical allocation frameworks. Use when the user asks about portfolio allocation, mean-variance optimization, Black-Litterman, risk parity, glide paths, or target-date strategies. Also trigger when users mention 'how much in stocks vs bonds', '60/40 portfolio', 'policy portfolio', 'core-satellite', 'liability-driven investing', 'asset-liability matching', or ask how to split their money across investments.

Business & Finance852 installs

statistics-fundamentals

joellewis/finance_skills

Apply statistical methods to financial data including descriptive statistics, covariance estimation, regression, hypothesis testing, and resampling. Use when the user asks about return distributions, correlation between assets, building a covariance matrix, running a CAPM regression, testing whether alpha is significant, checking if returns are normal, or estimating confidence intervals. Also trigger when users mention 'volatility', 'how correlated are these', 'fat tails', 'skewness', 'R-squared', 'beta of a fund', 'bootstrap a Sharpe ratio', 'shrinkage estimator', 'Ledoit-Wolf', or ask why their optimizer produces unstable weights.

Testing & QA817 installs

quantitative-valuation

joellewis/finance_skills

Estimate intrinsic value of stocks and companies using DCF, dividend discount models, comparable multiples, and residual income. Use when the user asks about discounted cash flow, DCF models, WACC, terminal value, dividend discount models, comparable multiples, or sum-of-the-parts valuation. Also trigger when users mention 'what is this stock worth', 'fair value estimate', 'Gordon growth model', 'free cash flow valuation', 'cost of equity', 'sensitivity analysis', 'exit multiple', or ask whether a stock is overvalued or undervalued.

Business & Finance787 installs

finance-psychology

joellewis/finance_skills

Recognize and mitigate cognitive biases that impair financial decisions, and coach clients toward values-driven financial lives. Use when the user asks about behavioral finance, money psychology, loss aversion, overconfidence, herd behavior, or emotional investing. Also trigger when users mention 'why do I panic sell', 'money fights with my spouse', 'I can never save enough', 'fear of investing', 'lifestyle creep', 'keeping up with the Joneses', 'Rich Life', 'money scripts', or ask how emotions affect financial decisions.

Business & Finance780 installs

commodities

joellewis/finance_skills

Analyze commodity markets including futures curve dynamics, roll yield, and supply/demand fundamentals. Use when the user asks about commodity investing, commodity ETFs, contango, backwardation, roll yield, commodity indices (GSCI, BCOM), or commodities as an inflation hedge. Also trigger when users mention 'oil prices', 'gold as a safe haven', 'agricultural futures', 'convenience yield', 'storage costs', 'natural gas', 'copper demand', or ask why commodity ETF returns differ from spot price changes.

Business & Finance774 installs

investment-policy

joellewis/finance_skills

Construct comprehensive Investment Policy Statements governing return objectives, risk tolerance, and portfolio constraints. Use when the user asks about building an IPS, setting return objectives, assessing risk tolerance, defining investment constraints, or establishing rebalancing and benchmark policies. Also trigger when users mention 'investment plan', 'policy portfolio', 'risk capacity vs willingness', 'spending rate for an endowment', 'foundation payout', 'manager selection criteria', or ask how to document their investment strategy.

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs