Agent skill

Bank Statement Merge and Reconciliation

by nigo81 in nigo81/nigo-skills

Merges bank statements from several banks and formats into one standard Excel layout, then reconciles them against the general ledger with a layered matching engine.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Bank Statement Merge and Reconciliation

skills CLI
$ npx skills add nigo81/nigo-skills --skill bank-flow-reconciliation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nigo81/nigo-skills bank-flow-reconciliation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nigo81/nigo-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/bank-flow-reconciliation .claude/skills/bank-flow-reconciliation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bank-flow-reconciliation
GitHub stars
133
Token cost
~1.3k tokens
SKILL.md length
305 words
Files
6 (incl. scripts, references)
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Merges bank statements from several banks and formats into one standard Excel layout, then reconciles them against the general ledger with a layered matching engine.

  • Works in 3 steps: 预检查… → 流水合并… → 流水核对…
  • Combining statements from several banks into one standard workbook
  • SKILL.md covers 概述, 数据准备, 工作流程 and 匹配率预期, plus 2 more sections
  • Runs Python scripts from its folder; calls python and pip

What it does

The SKILL.md is written in Chinese and built around three Python scripts run in order. bankflow_precheck.py reads the files and prints column names, sample rows, amount statistics and the subject distribution without making any decisions. bankflow_merge.py combines multi-bank, multi-format statements into one standardized 12-column Excel file. bankflow_reconcile.py compares the statements with the journal ledger using nine progressive matching layers and produces a reconciliation workpaper. The agent runs a script, reads the output, fills in the config and asks whether you want an AI review.

The skill spells out the data it needs. The ledger must have bank deposit rows, a date column, separate debit and credit columns, a voucher number, a summary and, above all, customer or supplier information: match rates are given as above 90 percent with it and 30 to 50 percent without. Statements can be xlsx, xls or csv. The agent stops to ask you when counterparty data is missing or when the ledger holds more bank accounts than the statements cover. Reference files cover the AI review process and config parameters.

When your agent uses it

  • Combining statements from several banks into one standard workbook
  • Reconciling bank statements against the general ledger for an audit
  • Testing bank deposits when the journal has multiple bank accounts
  • Checking why a reconciliation has a low match rate

Example prompts

  • “Merge these bank statement files from three banks into one standardized Excel sheet.”
  • “Reconcile the bank statement in bank.xls against the ledger in gl.xlsx and give me the workpaper.”
  • “Run the precheck on my ledger and statements and tell me which columns hold the counterparty names.”
  • “Merge the statements first, then reconcile them with the journal for our year-end audit.”

Requirements

  • Python to run the bundled scripts
  • A general ledger export and bank statements in xlsx, xls or csv format

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 预检查 (scripts/bankflow_precheck.py):读取文件,输出列名、样本行、金额统计、科目分布。只探查不判断。
  2. 流水合并 (scripts/bankflow_merge.py):多银行多格式流水 → 统一12列标准化Excel
  3. 流水核对 (scripts/bankflow_reconcile.py):银行流水 vs 序时账,9层递进匹配,输出核对底稿

What it can do on your machine

Read from SKILL.md and the folder at commit 6468211. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bank Statement Merge and Reconciliation loads about 1.3k tokens when it runs, and up to ~6.6k if it reads all its reference files. Until then it costs about 75 tokens; SKILL.md has 305 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nigo81/nigo-skills at commit 6468211, republished under its MIT licence (© nigo81). 305 words, ~1,312 tokens.

Download SKILL.mdSave it as .claude/skills/bank-flow-reconciliation/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
bank-flow-reconciliation
description
银行流水合并与核对工具。支持多银行多格式流水文件的智能合并(标准化为统一12列格式), 以及银行流水与序时账(总账)的自动化双向核对(9层递进匹配引擎)。 当用户提到"银行流水核对""流水核对""银行流水合并""合并流水""流水匹配""银行存款核对" "对账""核对银行流水""bank reconciliation""流水对账""多账号流水合并""银行流水审计" "核对银行存款""序时账核对"时触发。 即使用户只说"帮我核对下银行流水"或"把这几个银行的流水合到一起"也应触发。 审计场景中涉及银行存款测试、资金核对时优先使用此 skill。
slug
nigo-bank-flow-reconciliation
displayName
银行流水合并核对
version
1.0.0
summary
银行流水合并与核对工具,9层递进匹配引擎,支持多银行多格式流水合并与序时账自动双向核对,输出审计底稿。
license
MIT

作者:nigo(涂佳兵) | 微信公众号:逆行的狗

审计实务 + 数字化工具,分享审计效率提升的实战经验。

银行流水合并与核对

概述

三个脚本,按工作流顺序:

  1. 预检查 (scripts/bankflow_precheck.py):读取文件,输出列名、样本行、金额统计、科目分布。只探查不判断。
  2. 流水合并 (scripts/bankflow_merge.py):多银行多格式流水 → 统一12列标准化Excel
  3. 流水核对 (scripts/bankflow_reconcile.py):银行流水 vs 序时账,9层递进匹配,输出核对底稿

AI 的工作:运行脚本 → 看输出 → 填配置 → 运行脚本 → 问用户要不要 AI 复核。匹配逻辑全在代码里,AI 不需要理解引擎内部。

数据准备

核对需要两份数据:序时账(总账/明细账)和银行流水。

序时账必需字段
要素说明
银行存款科目行科目代码通常以 1002 开头。无科目代码列时可用科目名称"银行存款"代替
日期列记账日期或凭证日期
借方/贷方金额列两列分开,不能只有一列带正负号的金额
凭证号列识别同一笔凭证的多行分录
摘要列L2 匹配层的关键信息源
客商信息⭐ 决定性因素。有客商→匹配率 90%+,无客商→30-50%
⭐ 客商信息(两种来源,二选一)
来源配置场景
①客商辅助核算列客商辅助项列名: "客户,供应商"用友/金蝶标准账套,客商在对方科目行的辅助核算项中(拆分模式)
②交易对手列交易对手列名: "往来单位名称"银行存款行上有独立的"往来单位"/"交易对手"列(直接模式,匹配率更高)

直接模式实证 92.6%,拆分模式 78.5%。优先直接模式,银行存款行无客商值时才用拆分模式。

银行流水必需字段
要素说明
交易日期每笔交易日期
金额(借/贷 或 收/支)两列分开
对方户名强烈建议,与序时账客商交叉匹配
摘要L2 匹配线索

文件格式 .xlsx/.xls/.csv 均可,表头不在第一行或尾部有汇总行都能处理。


工作流程

第1步:判断任务类型
  • 仅合并:多个银行流水 → 一个标准化Excel
  • 仅核对:已有标准化流水 → 与序时账核对
  • 合并+核对:先合并再核对

用户说"核对"但提供了多个银行的流水文件 → 通常需要先合并。

第2步:运行预检查
bash
python SKILL_DIR/scripts/bankflow_precheck.py \
  --gl "序时账.xlsx" \
  --bank "银行流水.xls" \
  --bank-subject "1002"

输出:文件格式、列名、前3行样本、金额统计、候选客商列诊断表(列名+非空率+样本值)、银行科目分布、主体列分布。AI 看这些信息做第3步的判断。

常用参数:--gl-subject-col(科目代码列名)、--bank-subject-name(按名称过滤)、--bank-header-row(跳过前置行)。全表见 references/配置参数详解.md。

第3步:做判断

看预检查输出,做 4 个决策:

决策1:列映射

根据列名和样本值确定配置中各字段对应哪列。看实际列名,不凭猜测——"科目编号"/"科目代码"/"科目编码"在不同软件中叫法不同。

陷阱提醒:

  • 无科目代码列:用科目名称列代替,配 科目代码列名: "科目名称", 银行科目代码: "银行存款"
  • 科目代码混在编码列(如"1002/8111001012600894851"):直接用该列,配 银行科目代码: "1002",引擎 startswith 天然处理
  • 假客商陷阱:交易对手列 100% 非空但样本值是银行账户名(如"中国农业银行墨江县支行007316")→ 不是真客商。看样本值判断,不被非空率迷惑。真客商可能在对方科目行的复合字段中
决策2:客商信息够不够?

看预检查的诊断表:候选客商列在银行存款行上有值 → 直接模式(交易对手列名)。只在对方科目行有值 → 拆分模式(客商辅助项列名)。

⓾ 客商缺失确认(STOP)

如果所有候选列在两边都无值,或样本值是银行账户名等非客商信息——停下来用 question 工具问用户。

为什么停:匹配率会从 90%+ 暴跌到 30-50%,落差太大。用户需要知情同意——他可能更愿意先整理客商数据,而不是接受一个大半匹配不上的底稿。

  • [A] 继续:仅用金额+日期匹配,接受低匹配率
  • [B] 补充字段:我指定正确的对手列
  • [C] 取消:先完善数据
决策3:多账户覆盖了吗?

看预检查输出的账号分布。

单账户或两边账户一致 → 直接继续。

⓾ 多账户不完全覆盖确认(STOP)

序时账有 5 个银行账户但流水只有 2 个——静默继续会让另外 3 个账户全部无法匹配,用户以为全核对过了实际只核了一部分。审计场景中这个认知差异是风险。

  • [A] 仅核对匹配的账户:过滤序时账只保留有流水的
  • [B] 全部核对:不设账户列名,整体核对(匹配率偏低)
  • [C] 补充流水:我补缺失的银行流水文件

多账户标识不一致:序时账用"招商银行",流水用账号"3960xxx"→ 分组键不匹配 → 0%。此时不设账户列名(选[B]),整体核对。

公司列必须对称:序时账有公司列但流水没有 → 0%。不要配 公司列名,改用 主体过滤。

性能:>5000 行时强烈建议设账户列名分组(16s vs 129s)。

决策4:范围对齐了吗?(低匹配率首要原因)

看预检查的银行科目分布和主体分布。序时账范围明显大于流水时,大量记录无法匹配。

类型典型场景解决方案实证
科目代码范围序时账含32个银行科目,流水只有1个精确限定 银行科目代码: "100201"16% → 99%
主体范围序时账含11个主体,流水只有1个主体过滤: "主体,西安德诺"4% → 93%
日期范围序时账全年,流水半年日期范围: "2025-01-01,2025-06-30"偏低→正常

⓾ 范围限定确认(STOP)

配 主体过滤/日期范围 或收窄 银行科目代码 前——被过滤的记录完全不参与核对,用户可能误以为全部核对过了。审计底稿遗漏记录而不披露是重大风险。

  • [A] 确认限定:接受范围对齐后的高匹配率
  • [B] 保留全部:不限定,整体核对(匹配率偏低但不遗漏)

选 [A] 后才配置过滤参数。汇报结果时披露实际使用的过滤条件。

第4步:写配置

根据判断结果写 reconcile_config.json。

完整参数表和 JSON 示例见 references/配置参数详解.md(gl_config + bank_config 全字段、客商模式选择、从合并结果衔接核对的固定映射)。

第5步:运行核对
bash
python SKILL_DIR/scripts/bankflow_reconcile.py \
  reconcile_config.json \
  --output "输入文件所在目录/核对底稿.xlsx"

不传 --output 默认保存到 CWD,文件名 银行流水核对底稿_YYYYMMDD_HHMMSS.xlsx。建议显式传 --output。

第6步:AI 复核(可选)

STOP — 运行完第5步后先停下来。不要自动加 --ai-review 重跑。

为什么停下来问:AI 复核逐条读未匹配记录(可能上百条),耗时 1-2 分钟和可观 token。但匹配率 90%+ 时,剩余十几条交给会计人工看反而更高效(他们有业务上下文)。自动复核 = 在用户不需要时浪费时间和钱。这是实际使用中最常被跳过的 gate——看到匹配率就想继续跑,但复核是可选的,选择权在用户。

读引擎输出的匹配率,用 question 工具问:

当前匹配率:金额 99.2% / 条数 98.4%,未匹配 112 条。

  • [A] 进行 AI 复核:逐条审查未匹配记录,可匹配的写入底稿(预计 1-2 分钟)
  • [B] 不复核:直接出底稿,剩余交人工(推荐:匹配率已高)
  • [C] 先修范围/数据:匹配率偏低时回到决策4

选 [A] 才进入 AI 复核(详见 references/AI复核流程.md)。未匹配 > 500 条时引擎自动跳过——说明范围没对齐,该修范围而不是硬复核。


匹配率预期

场景预期金额匹配率
范围对齐 + 有客商90%~99%(正常)
范围对齐 + 无客商 + 有摘要70%~90%
无客商 + 无摘要30%~50%
范围不对齐<50%(先修范围)

金额匹配率 ≥ 90% 就算好结果,不需要分析原因。 条数匹配率通常低于金额匹配率——序时账把多笔小额费用报销汇总成一笔凭证是常态(如 50 笔银行流水对应 1 笔 GL),这会拉低条数匹配率但不影响核对结论。只要总额平衡(流水收支 ≈ 序时账借贷),底稿可以直接交付,未匹配记录交会计人工核视即可。不要主动长篇分析匹配率不高的原因——用户要的是底稿,不是分析报告。


依赖安装

bash
pip install pandas openpyxl xlrd rapidfuzz

xlrd 仅在读 .xls 时需要。rapidfuzz 可选(回退到 difflib)。


参考文档

文档何时查阅
references/配置参数详解.md写配置时——三个模块全部参数表和 JSON 示例
references/AI复核流程.md执行 AI 复核时——按月分批、subagent 提示词、三个判断层次

© nigo81, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in bank-flow-reconciliation of nigo81/nigo-skills.

  • SKILL.md
  • references/AI复核流程.md
  • references/配置参数详解.md
  • scripts/bankflow_merge.py
  • scripts/bankflow_precheck.py
  • scripts/bankflow_reconcile.py

Open the folder on GitHubat commit 6468211

Compare with similar skills

Bank Statement Merge and Reconciliation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bank Statement Merge and Reconciliation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bank Statement Merge and Reconciliation this skillnigo81/nigo-skills133—~1.3kAutomated safety check: PassMIT
Three-Statement Model Builderginlix-ai/LangAlpha1.8k—~5.4kAutomated safety check: PassApache-2.0
Dcf ModelWind-Alice/AliceMarket1342 repos~12kAutomated safety check: PassNone
Dcf ModelLuciole-Studio/Misaka-Agent1712 repos~12kAutomated safety check: PassApache-2.0
Datapack Builderw95/awesome-claude-corporate-skills2441 repos~6kAutomated safety check: PassMIT
Fsi Comps Analysisw95/awesome-claude-corporate-skills2441 repos~6.7kAutomated safety check: PassMIT

Similar skills

  • Builds or repairs an integrated income statement, balance sheet and cash flow model in Excel with live formulas, supporting schedules, scenarios and a Checks sheet.

    1.8k GitHub stars~5.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Dcf Model

    Wind-Alice/AliceMarket

    Real DCF (Discounted Cash Flow) model creation for equity valuation.

    134 GitHub starsUsed in 2 repos~12k tokens
    Business, Finance & HRAuto-check passed
  • Dcf Model

    Luciole-Studio/Misaka-Agent

    Build discounted cash flow valuation workbooks in Excel. An agent skill from Luciole-Studio/Misaka-Agent.

    171 GitHub starsUsed in 2 repos~12k tokens
    Business, Finance & HRAuto-check passed
  • Datapack Builder

    w95/awesome-claude-corporate-skills

    Build professional financial services data packs from various sources including CIMs, offering memorandums, SEC filings, web search, or MCP servers.

    244 GitHub starsUsed in 1 repo~6k tokens
    Business, Finance & HRAuto-check passed
  • Fsi Comps Analysis

    w95/awesome-claude-corporate-skills

    Build institutional-grade comparable company analyses with operating metrics, valuation multiples, and statistical benchmarking in Excel/spreadsheet format.

    244 GitHub starsUsed in 1 repo~6.7k tokens
    Business, Finance & HRAuto-check passed
  • Anti Gambling Trader

    mars-tw/anti-gambling-trader-tw

    分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…

    907 GitHub stars~1.9k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed

More from nigo81/nigo-skills

All 13 skills in this repo
  • Looks up Chinese company registration data in the CICPA industry knowledge base, from a quick search to a full 61-dimension export, subsidiary discovery and Excel output.

    133 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Audit Report Checker

    nigo81/nigo-skills

    Checks audit reports (financial statements and notes) for cross-reference, summation and text errors, with arithmetic done by script and results exported to Excel and Markdown.

    133 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed
  • A Chinese-language persona that answers accounting-standards and audit questions in the style of forum moderator Chen Yiwei, checking standards text before it replies.

    133 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Chinese-language tool that turns a business process description into a swimlane flowchart for internal control and audit work, exported as .drawio, PNG, SVG or VSDX.

    133 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Cross-checks a client's own registry data against its customers' and suppliers' to surface undisclosed related-party relationships for an audit.

    133 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • OpenCode Session Visualizer

    nigo81/nigo-skills

    Exports an OpenCode session from its local database into a single self-contained HTML page styled like the official share view, with folding and editing controls.

    133 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Bank Statement Merge and Reconciliation

What does Bank Statement Merge and Reconciliation do?

Merges bank statements from several banks and formats into one standard Excel layout, then reconciles them against the general ledger with a layered matching engine. md is written in Chinese and built around three Python scripts run in order.py reads the files and prints column names, sample rows, amount statistics and the subject distribution without making any decisions.

When should I use Bank Statement Merge and Reconciliation?

Bank Statement Merge and Reconciliation fits situations like: combining statements from several banks into one standard workbook; reconciling bank statements against the general ledger for an audit; testing bank deposits when the journal has multiple bank accounts; checking why a reconciliation has a low match rate.

How do I install Bank Statement Merge and Reconciliation in Claude Code?

Run `npx skills add nigo81/nigo-skills --skill bank-flow-reconciliation -a claude-code`. Or copy the skill folder (bank-flow-reconciliation in nigo81/nigo-skills) into .claude/skills/bank-flow-reconciliation in your project. Claude Code loads it when a task matches its description.

How do I install Bank Statement Merge and Reconciliation in Codex?

Run `npx skills add nigo81/nigo-skills --skill bank-flow-reconciliation -a codex`. Or copy the skill folder (bank-flow-reconciliation in nigo81/nigo-skills) into .agents/skills/bank-flow-reconciliation in your project. Codex loads it when a task matches its description.

Can I use Bank Statement Merge and Reconciliation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nigo81/nigo-skills --skill bank-flow-reconciliation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bank-flow-reconciliation, .gemini/skills/bank-flow-reconciliation, .github/skills/bank-flow-reconciliation and .opencode/skills/bank-flow-reconciliation in your project.

What does Bank Statement Merge and Reconciliation need to run?

Going by SKILL.md and its folder, Bank Statement Merge and Reconciliation needs Python for the scripts in its folder and the command-line tools its instructions call (python and pip). Our summary lists: Python to run the bundled scripts; A general ledger export and bank statements in xlsx, xls or csv format.

Does Bank Statement Merge and Reconciliation access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Bank Statement Merge and Reconciliation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Bank Statement Merge and Reconciliation use?

Bank Statement Merge and Reconciliation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bank Statement Merge and Reconciliation use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.3k tokens, read only when the agent opens those files.

What are the alternatives to Bank Statement Merge and Reconciliation?

Skills that share tags, products or a category with Bank Statement Merge and Reconciliation: Three-Statement Model Builder (ginlix-ai/LangAlpha, 1.8k stars), Dcf Model (Wind-Alice/AliceMarket, 134 stars), Dcf Model (Luciole-Studio/Misaka-Agent, 171 stars) and Datapack Builder (w95/awesome-claude-corporate-skills, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bank Statement Merge and Reconciliation?

nigo81 (a GitHub user) maintains it in nigo81/nigo-skills, which has 133 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on August 23, 2026.

Source: nigo81/nigo-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.