pdf-statement-parser
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "pdf-statement-parser":https://skillpi.com/zh/skills/deepskill-735caf597915e507ba1b7482900a32c187b1fe8e847c0a55ec4330fcf500dd84。安装前核对上游来源和版本:https://github.com/lyndonkl/claude。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
解析单个财务报表 PDF(支票、储蓄、信用卡、券商、401k、HSA、抵押、税表等),并输出标准化 JSON 记录,包含机构名称、账户掩码、对账周期、期初/期末余额、逐笔交易或持仓明细,以及置信度评分。适用于从各类账户 PDF 对账单提取结构化数据或批量导入家庭财务文档时使用。
介绍来源: third_party · lyndonkl · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: pdf-statement-parser
description: Parses a single financial statement PDF (checking, savings, credit card, brokerage, 401k, HSA, mortgage, tax form) and emits a normalized JSON record with institution, account mask, statement period, opening/closing balances, line-item transactions or holdings, and a confidence score. Use when extracting structured data from a bank, brokerage, retirement, or HSA PDF statement, when ingesting a drop of household finance documents, or when user mentions parsing a statement, extracting transactions from a PDF, or normalizing statement data.PDF Statement Parser
Table of Contents
- Overview
- Input contract
- Workflow
- Document type playbooks
- Output contract
- Confidence scoring
- Guardrails
- Example
Overview
Bank, brokerage, retirement, HSA, and mortgage statements arrive as PDFs in many house-styles. This skill is the prompt-driven extraction methodology: identify the document type, locate the canonical fields by their labels (not position), pull every transaction or holding row, and emit a strict JSON record. All monetary values become integer cents, all dates become ISO 8601 (YYYY-MM-DD).
Use directly with Claude's PDF reading: Read the PDF, then run this skill's workflow on the visible content. No external library needed.
Input contract
The caller provides:
pdf_path— absolute path to a single statement PDF.expected_type(optional) — one ofchecking_statement | savings_statement | credit_card_statement | brokerage_statement | 401k_statement | hsa_statement | mortgage_statement | tax_form | insurance_doc | unknown. If absent, the skill detects it.known_accounts(optional) — array of{id, institution, mask, type}for matching.
Workflow
- [ ] Step 1: Read the PDF (first pass: pages 1-2 for header)
- [ ] Step 2: Detect document type from header keywords
- [ ] Step 3: Extract account identity (institution + mask + type)
- [ ] Step 4: Extract statement period (start/end dates)
- [ ] Step 5: Extract balance markers (opening / closing / available)
- [ ] Step 6: Extract line items (transactions, holdings, or events)
- [ ] Step 7: Normalize to integer cents and ISO dates
- [ ] Step 8: Score confidence on each field; emit JSON
Step 1 — Read the PDF
Use the Read tool with the PDF path. For PDFs > 10 pages, read in chunks: pages 1–5 (header + first transactions), then subsequent ranges as needed. Track total page count.
Step 2 — Detect document type
Look for these header signals (in order of authority):
| Signal | Document type |
|---|---|
| "Statement of Account" + "Available Balance" + checking-style transactions | checking_statement |
| "Savings Statement" / "Money Market Statement" | savings_statement |
| "Credit Card Statement" + "Payment Due" + "Minimum Payment" | credit_card_statement |
| "Account Summary" + "Holdings" + ticker symbols | brokerage_statement |
| "401(k) Statement" / "Retirement Plan" + "Vested Balance" | 401k_statement |
| "Health Savings Account" / "HSA" + "Contribution Limit" | hsa_statement |
| "Mortgage Statement" + "Principal" + "Escrow" | mortgage_statement |
| "W-2" / "1099" / "1098" / "5498" form numbers | tax_form |
| Policy declaration page, premium, deductible | insurance_doc |
If two signals tie, prefer the one in the document title or page header.
Step 3 — Extract account identity
- Institution: top-of-page logo text or "Issued by" / "Statement from" label.
- Mask: last 4 digits — search for
****1234,xxxx1234,Account ending in 1234, or the redacted form the institution uses. Always store as****1234. - Account type: derived from §2 above plus visible labels ("Checking", "Visa Signature", "Roth IRA").
- Owner names: full names of account holders (used for matching to
household.jsonmembers downstream).
Match against known_accounts by (institution, mask). If no match, mark account_match: "new" and propose an account_id like acc_<type>_<incrementing>.
Step 4 — Extract statement period
Find labels: "Statement Period", "Cycle Date", "Closing Date", "Period Beginning … Period Ending". Output:
period_start— first day covered (ISO).period_end— last day covered, also the statement closing date (ISO).
If only a closing date is present, set period_end = closing_date and period_start = null with confidence: 0.6 on the period.
Step 5 — Extract balance markers
For cash/credit accounts: opening_balance_cents, closing_balance_cents, available_balance_cents (if present). For credit cards, also statement_balance_cents, minimum_payment_cents, payment_due_date.
For brokerage / 401k / HSA: total_value_cents, cash_cents, invested_cents. Skip opening/closing transaction balances — these are holdings statements.
For mortgages: current_principal_cents, monthly_pi_cents, monthly_escrow_cents, next_payment_due, extra_principal_ytd_cents.
Step 6 — Extract line items
Three modes:
Cash/credit transactions. For each row in the transactions table, capture: date, post_date (if separate column), description_raw, amount. Sign convention: outflows negative, inflows positive. If statement uses two columns ("Withdrawals" and "Deposits"), set sign accordingly. Preserve description_raw exactly as printed — the bookkeeper will normalize the merchant name later.
Brokerage / 401k / HSA holdings. For each holding row: symbol, description, shares (decimal), price (per-share), value, cost_basis (if shown), asset_class (mapped from fund description: see playbook below).
Mortgage activity. Recent payments table: each entry with date, total_paid_cents, principal_cents, interest_cents, escrow_cents, extra_principal_cents.
Tax forms. Form-specific fields per playbook (W-2 boxes, 1099-DIV ordinary/qualified dividends, 1098 mortgage interest paid, 5498-SA HSA contributions).
Step 7 — Normalize
- Money:
$1,247.50→124750cents. Negative outflow:-$87.42→-8742. - Dates:
01/15/26→2026-01-15. Two-digit years assume current century unless context says otherwise. - Trim whitespace from descriptions; preserve case.
Step 8 — Confidence scoring
Per field, assign a confidence in [0.0, 1.0]:
1.0— extracted directly from a labeled field.0.85–0.95— extracted from positional context (column header inferred, value clear).0.6–0.8— inferred from surrounding text or partially OCR'd.< 0.6— flag for human review.
The overall record gets confidence = min(per-field confidences for required fields).
Document type playbooks
checking_statement / savings_statement
Required: institution, mask, period_start, period_end, opening_balance_cents, closing_balance_cents, transactions[]. Reconcile: opening + Σ(transactions.amount) = closing within ±$1.
credit_card_statement
Required: institution, mask, period_start, period_end, opening_balance_cents, closing_balance_cents, statement_balance_cents, minimum_payment_cents, payment_due_date, transactions[]. Note: credit-card outflows from the cardholder's perspective are purchases (positive on the card balance) — but for the unified household ledger, treat purchases as negative (money leaving the household) and payments to the card as positive (or as internal transfers). Document the sign convention you used.
brokerage_statement
Required: institution, mask, account_type, period_end, total_value_cents, holdings[]. Optional: cash_cents, transactions[] (buys/sells/dividends). Asset-class mapping:
| Fund hint | asset_class |
|---|---|
| "S&P 500", "Total Stock Market", "Large Cap Blend", VOO/VTI/SPY | us_equity |
| "International", "Developed Markets", "Emerging Markets", VXUS/IXUS | intl_equity |
| "Total Bond", "Aggregate Bond", "Treasury", BND/AGG | us_bond |
| "Money Market", "Cash Reserve", SPAXX | cash |
| "REIT", "Real Estate" | reit |
| "Target Date 20XX" | target_date (note the year) |
If unmappable, leave asset_class: null with confidence 0.5.
401k_statement
Required: institution, owner, period_end, total_balance_cents, ytd_contribution_cents (if shown), employer_match_ytd_cents (if shown), holdings[]. Watch for vesting columns — record vested_cents separately if shown.
hsa_statement
Required: institution, period_end, cash_cents, invested_cents, total_cents, ytd_contribution_cents, ytd_distribution_cents (if shown). Note coverage type if printed: self_only or family.
mortgage_statement
Required: institution, mask, period_end, current_principal_cents, monthly_pi_cents, monthly_escrow_cents, next_payment_due, recent_payments[]. Capture the rate APR if printed.
tax_form
Required: form_type (W-2, 1099-DIV, 1099-INT, 1099-B, 1098, 5498-SA, 1095), tax_year, issuer, recipient, key_boxes (form-specific). Defer interpretation to the tax-compliance agent — this skill just captures the boxes.
Output contract
Emit a single JSON object:
{
"document_type": "checking_statement",
"source_path": "inbox/2026-01-15-batch/checking-jan.pdf",
"institution": "Bank Name",
"account": {
"mask": "****1234",
"type": "checking",
"owners": ["Jane Doe", "John Doe"],
"match": "acc_chk_001",
"match_confidence": 0.95
},
"period": {
"start": "2025-12-15",
"end": "2026-01-14"
},
"balances": {
"opening_cents": 1124300,
"closing_cents": 1247500,
"available_cents": 1247500
},
"transactions": [
{
"date": "2025-12-16",
"post_date": "2025-12-17",
"description_raw": "TRADER JOE'S #123 PORTLAND OR",
"amount_cents": -8742,
"confidence": 0.97
}
],
"reconciliation": {
"expected_closing_cents": 1247500,
"computed_closing_cents": 1247500,
"diff_cents": 0,
"ok": true
},
"extracted_at": "2026-01-20T14:00:00Z",
"overall_confidence": 0.94,
"warnings": []
}
For brokerage/401k/HSA replace transactions with holdings and balance fields per playbook.
Confidence scoring
Reduce overall confidence and add a warnings[] entry whenever:
- Reconciliation diff > $1 →
warning: "reconcile_failed: diff $X.XX"andoverall_confidence: max(0.5, current * 0.7). - Any required field missing →
warning: "missing_required: <field>"andoverall_confidence ≤ 0.5. - OCR-quality page (illegible characters) →
warning: "low_ocr_quality_page_<n>"and apply the per-field confidence penalty. - Unknown asset class on > 20% of holdings →
warning: "unknown_asset_class_high".
Guardrails
- Never invent values. If a field is not visible in the PDF, set
nulland add a warning. Do not interpolate. - Never normalize merchant names here. That is the bookkeeper's job; preserve
description_rawbyte-for-byte. - Never categorize transactions here. Categorization is downstream (
transaction-categorizer). - Always reconcile for cash/credit statements before declaring
ok: true. - Currency: assume USD unless the statement says otherwise. If non-USD, capture the currency code; do not auto-convert.
- Account mask only. Never extract or store the full account number.
Example
Given a 4-page Chase checking statement for the cycle 2025-12-15 to 2026-01-14 with opening balance $11,243.00, three deposits totaling $4,832.00, twenty-seven debits totaling $3,600.00, and closing balance $12,475.00, the parser emits:
document_type: "checking_statement"institution: "Chase"account.mask: "****1234",account.type: "checking"period.start: "2025-12-15",period.end: "2026-01-14"balances.opening_cents: 1124300,balances.closing_cents: 1247500transactions: [...]— 30 entries, each withdescription_raw,amount_cents(signed), and per-field confidence ≥ 0.92reconciliation.ok: true,diff_cents: 0overall_confidence: 0.95,warnings: []
版本历史
-
0.1
GitHub ↗
原版更新说明
## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 直接解决用户从PDF对账单中提取结构化数据的核心痛点
- 适用于银行、券商、退休账户、HSA等多种场景
- 显著提升家庭财务文档批量导入的效率
亮点
- 触发词精准完整,覆盖多种变体
- 边界清晰,适用场景描述详细
亮点
- Workflow分8步,每步有详细说明
- Output contract有完整JSON示例
- Guardrails明确,规范完整
待提升项
-
PDF读取失败处理未明确 原报告严重程度:轻微
未明确提及PDF读取失败时的异常处理机制
改进建议:建议在Step 1中增加PDF读取失败的fallback处理,如重试或返回错误信息
亮点
- 使用Claude的Read工具,工具来源明确
- 异常处理如OCR质量、对账差异、缺失字段等均有覆盖
- 不可逆操作有确认机制,如对账验证
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。