Claude-skill-registry document-types
Understand and work with mortgage document types and classification. Use when asking about document types, adding new document support, debugging classification, or understanding what DocType constants mean.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/document-types" ~/.claude/skills/majiayu000-claude-skill-registry-document-types && rm -rf "$T"
manifest:
skills/data/document-types/SKILL.mdsource content
Mortgage Document Types
Purpose
Work with document classification in the mortgage underwriting system.
Document Type Constants
Located in
internal/model/document.go:
Income Documents
| Constant | Description | Filename Patterns |
|---|---|---|
| W-2 wage statements | , |
| 1099 contractor income | |
| Pay stubs/earnings | , , , |
| Tax returns (1040) | , |
| P&L statements | , , |
| Employment verification | , |
Asset Documents
| Constant | Description | Filename Patterns |
|---|---|---|
| Bank statements | |
| General assets | |
| 401k/IRA statements | , , |
| Gift fund letters | |
Credit Documents
| Constant | Description | Filename Patterns |
|---|---|---|
| Credit bureau reports | |
| Debt payoff letters | , |
Collateral Documents
| Constant | Description | Filename Patterns |
|---|---|---|
| Property appraisals | |
| Purchase agreements | , |
| Title reports | |
| Hazard insurance | , , |
Type Inference Logic
Located in
internal/document/store.go:
// Files are classified by checking if filename contains pattern lower := strings.ToLower(filepath.Base(path)) for pattern, docType := range patterns { if strings.Contains(lower, pattern) { return docType } }
Adding a New Document Type
Step 1: Add constant to internal/model/document.go
internal/model/document.goconst ( // ... existing types ... DocTypeNewType DocumentType = "new_type" )
Step 2: Add pattern to internal/document/store.go
internal/document/store.gopatterns := map[string]model.DocumentType{ // ... existing patterns ... "new_pattern": model.DocTypeNewType, }
Step 3: Add to agent's document lists
In the relevant agent (e.g.,
internal/agent/income/income.go):
func (a *Agent) RequiredDocuments() []model.DocumentType { return []model.DocumentType{ model.DocTypeW2, model.DocTypeNewType, // Add here } }
Step 4: Update prompts
Update the agent's prompt to describe how to handle the new document type.
Document Structure
type Document struct { ID string // Hash-based unique ID ApplicationID string // Loan application ID Type DocumentType // One of the DocType* constants FileName string // Original filename MimeType string // application/pdf, image/png, etc. FilePath string // Local filesystem path GeminiURI string // Cached Gemini File API URI UploadedAt time.Time BorrowerID string Year int // Tax year for tax docs Period string // Pay period for paystubs Metadata map[string]string // Additional metadata }
Supported MIME Types
From
internal/document/store.go:MimeTypeFromExtension:
->.pdfapplication/pdf
->.pngimage/png
,.jpg
->.jpegimage/jpeg
->.gifimage/gif
->.webpimage/webp
Related Files
- Type definitionsinternal/model/document.go
- Loading and type inferenceinternal/document/store.go
- CLI type inferencecmd/underwriter/main.go