statement-reconciler

作为关卡检查提取语句在内部是否一致:通过核对期初余额 + 交易总额 = 期末余额(允许微小误差)来验证,并生成对账报告,标注缺失行、重复计算行、符号错误和四舍五入差异。用于在从 PDF 提取到将交易提交到数据存储之间对账不平的语句或当用户提及对账、余额检查或语句不平的情形。

仓库最近推送
GitHub Stars
206
Forks
28
Issues / PRs
3

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "statement-reconciler":https://skillpi.com/zh/skills/deepskill-3ebdc4c3632eae9e12d0c1d31c4e2adf4c1453d13c9f30c995d4e663d3d4aa1f。安装前核对上游来源和版本:https://github.com/lyndonkl/claude。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

作为关卡检查提取语句在内部是否一致:通过核对期初余额 + 交易总额 = 期末余额(允许微小误差)来验证,并生成对账报告,标注缺失行、重复计算行、符号错误和四舍五入差异。用于在从 PDF 提取到将交易提交到数据存储之间对账不平的语句或当用户提及对账、余额检查或语句不平的情形。

0 下载

介绍来源: third_party · lyndonkl · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: statement-reconciler
description: Verifies that an extracted statement is internally consistent by checking that opening_balance + sum(transactions) = closing_balance within a small tolerance, and produces a reconciliation report flagging missing rows, double-counted rows, sign errors, and rounding diffs. Use as the gate between PDF extraction and committing transactions to the data store, when reconciling a statement that does not balance, or when user mentions reconcile, balance check, or statement does not tie out.

Statement Reconciler

Table of Contents

Overview

A statement that doesn't reconcile is a statement that hasn't been parsed correctly. This skill enforces the only check that catches every failure mode of the parser at once: opening + Σ(transactions) = closing. When it fails, it diagnoses why — missing transaction, sign flip, double-counted row, rounding from a foreign-currency conversion — so the bookkeeper can fix or escalate before committing dirty data.

Input contract

The caller provides the parser output:

  • account_id, period_start, period_end.
  • opening_balance_cents, closing_balance_cents.
  • transactions — array of {id, date, amount_cents, description_raw}.
  • tolerance_cents (default 100 = $1.00).
  • account_type — affects sign convention (see below).

The reconciliation identity

For cash and credit accounts:

closing_balance_cents = opening_balance_cents + Σ transactions.amount_cents

Sign conventions:

Account type Outflow (e.g., purchase, payment, withdrawal) Inflow (e.g., deposit, payment received)
checking / savings negative positive
credit_card (household-ledger view) negative purchase positive card payment
credit_card (issuer's balance view) positive (balance grows) negative (balance shrinks)

This skill expects the household-ledger view for cash and credit cards: outflows are negative, inflows are positive. If the parser used the issuer view for a credit card, flip signs before reconciling.

For brokerage / 401k / HSA holdings statements, this skill does not apply (those are point-in-time, not flow). Skip.

Workflow

Reconciliation Progress:
- [ ] Step 1: Confirm account_type is in {checking, savings, credit_card, mortgage}
- [ ] Step 2: Sum signed amount_cents
- [ ] Step 3: Compute computed_closing = opening + sum
- [ ] Step 4: Compute diff = closing − computed_closing
- [ ] Step 5: If |diff| <= tolerance, return ok: true
- [ ] Step 6: Else, run diagnostics
- [ ] Step 7: Emit reconciliation report

Steps 1–5

Trivial. Most statements pass step 5 immediately.

Step 6 — Diagnostics

Walk these checks in order; the first that explains the diff wins.

Diagnostic A — sign flip suspect. If |diff| / 2 matches the absolute value of any single transaction within $0.50, that transaction's sign was likely flipped during extraction. Report: sign_flip_suspect: tx_id_X.

Diagnostic B — missing transaction. If |diff| matches a "Fees" or "Interest" line summary on the statement but no matching individual transaction was extracted, the parser missed the row. Report: missing_transaction_suspect: <amount> <description>.

Diagnostic C — double-counted transaction. If the same (date, amount, description) triple appears twice in the input, and |diff| matches that amount, drop one and re-check. Report: double_counted: tx_id_X.

Diagnostic D — fee/charge omission. If diff is small (≤ $50) and consistent with a typical fee, look for "Service Charge" / "Monthly Fee" / "Foreign Transaction Fee" lines that may have been missed.

Diagnostic E — rounding accumulation. If |diff| ≤ tolerance × N/100 for N transactions, a per-row rounding may have crept in. This is rare with integer cents but possible with foreign-currency lines. Report: rounding_drift_suspect.

Diagnostic F — period mismatch. If period_end does not match the statement's printed closing date, the wrong opening or closing was paired. Report: period_mismatch_suspect.

If no diagnostic fires, return ok: false with diagnostic: "unknown" so the bookkeeper escalates.

Step 7 — Tolerance policy

Default tolerance: $1.00 (100 cents).

Tighten to 0 for credit-card statements where the issuer reconciles to the cent. Loosen to $5 only when explicitly asked, and surface the exact diff so the user knows.

Output contract

{
  "account_id": "acc_chk_001",
  "period_start": "2025-12-15",
  "period_end": "2026-01-14",
  "opening_balance_cents": 1124300,
  "closing_balance_cents": 1247500,
  "transactions_sum_cents": 123200,
  "computed_closing_cents": 1247500,
  "diff_cents": 0,
  "tolerance_cents": 100,
  "ok": true,
  "diagnostic": null,
  "suggestions": []
}

Failed example:

{
  "account_id": "acc_cc_001",
  "period_start": "2025-12-15",
  "period_end": "2026-01-14",
  "opening_balance_cents": 0,
  "closing_balance_cents": -284300,
  "transactions_sum_cents": -283100,
  "computed_closing_cents": -283100,
  "diff_cents": -1200,
  "tolerance_cents": 100,
  "ok": false,
  "diagnostic": "missing_transaction_suspect",
  "suggestions": [
    {
      "type": "missing_transaction",
      "expected_amount_cents": -1200,
      "hint": "statement summary lists 'Foreign Transaction Fee $12.00' but no transaction extracted with that amount",
      "action": "re-parse PDF page 3, look for fee line"
    }
  ]
}

Guardrails

  • Never silently widen the tolerance. If the diff exceeds tolerance, the reconciler must fail the check — the bookkeeper agent decides whether to escalate or re-parse.
  • Never commit a non-reconciling statement. The bookkeeper agent must hold the data until reconciliation succeeds. Failing reconciliation creates a reports/alerts/ entry, never a silent drop.
  • Brokerage / 401k / HSA / tax forms are out of scope. Holdings statements and tax forms do not have a single closing-balance identity; they have other consistency checks owned by their respective agents.
  • Idempotency. Calling the reconciler twice on the same input produces the same output.
  • Useful diff sign. A negative diff_cents means the computed closing is higher than reported (i.e., we have transactions explaining more cash than the statement says exists) — usually a missing inflow or a wrong-signed outflow.

版本历史

  1. 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 实验室的评测报告。

场景价值92/100

亮点

  • 解决财务对账这一高频刚需任务,显著提升数据一致性保障效率
  • 适用于企业财务、会计服务等广泛场景,实用价值高
触发精准95/100

亮点

  • 触发场景描述精准完整,覆盖对账不平、余额检查等核心用例
  • 边界清晰,无歧义或重叠风险
结构规范93/100

亮点

  • 结构完整,包含输入契约、工作流、诊断逻辑、输出契约和防护措施
  • 提供成功与失败输出示例,端到端流程清晰
执行可靠94/100

亮点

  • 覆盖符号错误、缺失交易、重复计算、舍入误差等主要异常场景
  • Guardrails 明确禁止提交未对账数据,确保数据质量
证据可验 (前四项均值)94/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。