smithery/nimag

run-underwriter

Run the mortgage underwriter CLI to analyze loan documents. Use when testing document analysis, debugging underwriter output, or processing loan files. Covers setup, execution, and result interpretation.

Installation

$ npx skills add smithery/nimag --skill run-underwriter

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/nimag.

npx skills add smithery/nimag

Browse all from smithery/nimag

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,955 B
  • docs SUMMARY.md 226 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Run Underwriter CLI

Purpose

Execute and debug the mortgage underwriter tool for document analysis.

Prerequisites

1. Set API Key

export GEMINI_API_KEY="your-gemini-api-key"

2. Build the Binary

make build

3. Fetch Guidelines (if needed)

make fetch-guidelines

Usage

Analyze a Directory of Documents

./bin/underwriter -docs /path/to/documents

Analyze Specific Files

./bin/underwriter -files w2.pdf,paystub.pdf,bank_statement.pdf

JSON Output (for programmatic use)

./bin/underwriter -docs /path/to/documents -json

Custom Guidelines Path

./bin/underwriter -docs /path/to/documents -guidelines /custom/path

All CLI Flags

-docs string       Directory containing documents to analyze
-files string      Comma-separated list of document files
-guidelines string Path to Fannie Mae guidelines (default "configs/guidelines")
-app-id string     Application ID (default "test-001")
-json              Output results as JSON

Test with Sample Documents

# Generate test documents first (if needed)
cd test_loan_files && python3 generate_loan_docs.py && cd ..

# Run on test loan file
./bin/underwriter -docs test_loan_files/loan_file_1_LN-2024-001847

Understanding Output

Analysis Result Structure

  • status: approved | conditional | denied | needs_review | incomplete
  • confidence: 0.0 to 1.0 score
  • findings: Observations with category, description, evidence, document ID
  • risks: Identified risks with severity (low/medium/high/critical) and mitigation
  • missing_documents: Required documents not provided
  • summary: Brief description of analysis

Status Meanings

Status Meaning
approved Meets all guidelines
conditional Approved with conditions
denied Does not meet guidelines
needs_review Manual review required
incomplete Missing required documents

Troubleshooting

"GEMINIAPIKEY not set"

export GEMINI_API_KEY="your-key"

"No documents found"

  • Check file paths exist
  • Supported extensions: .pdf, .png, .jpg, .jpeg

Document Type Misdetection

Files are typed by filename patterns:

  • w2 or w-2 -> W2
  • paystub or pay -> Paystub
  • bank -> Bank Statement
  • tax or 1040 -> Tax Return
  • 1099 -> 1099

Guidelines Not Loading

make fetch-guidelines
ls configs/guidelines/

Related Files

  • cmd/underwriter/main.go - CLI implementation
  • internal/agent/income/income.go - Income agent logic
  • internal/model/analysis.go - Result structures