Use when money, coupons, commission, or inventory can diverge across systems: 对账, 支付对账单, 分佣核对, 库存对账, 差错处理. Do not replace this with Seata/TCC as the default.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add 1398281322-a11y/java-backend-guardrails --skill reconciliation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Reconciliation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/1398281322-a11y-reconciliation)More formats (shields.io, HTML) on the badges page.
---
name: reconciliation
description: Use when money, coupons, commission, or inventory can diverge across systems: 对账, 支付对账单, 分佣核对, 库存对账, 差错处理. Do not replace this with Seata/TCC as the default.
---
# 对账 / 差错
## When to Invoke
支付、退款、分佣、核销、券、库存跨系统;事务消息/最终一致上线后。高级面试常追问「不一致了怎么办」——答案是对账,不是再上 2PC。
## When NOT
单表本地事务且无外部资金。不要用对账替代唯一键和幂等。
## 风险(面试考点)
最终一致系统 **一定会** 短暂不一致。没有对账 = 线上默默错账。对账要有:**数据源、粒度、窗口、差错单、人工/自动平账、幂等**。
两边都成功、一边成功、金额不等、重复入账、漏单,分类不同,处理不同。
## 方案选型(轻量优先)
| 通道 | 对账双方 | 默认节奏 |
|------|----------|----------|
| 支付 | 本地支付单 vs 渠道对账单 | T+1 文件 + 当日准实时抽查 |
| 分佣 | 订单已支付 vs 分佣流水 | 日批 + 关键单实时 |
| 库存 | Redis 预扣 vs DB | 定时对齐,以 DB 为准 |
| 核销 | 券状态 vs 订单核销记录 | 日批 |
## 默认方案
1. 每笔资金有 **唯一流水号**(与 `idempotent` 同一键)。
2. 对账任务按日:拉渠道文件,按流水号 full outer join。
3. 差错写入 `t_recon_diff`,状态 `NEW/HANDLED`,处理动作幂等。
4. 自动平:漏单补记账;重复跳过;金额不等告警人工。
```sql
UNIQUE KEY uk_recon (biz_date, channel, trade_no)
```
禁止对账程序直接 `UPDATE` 余额两遍。只插「补账流水」,再走原来的入账逻辑。
## 反例
错误:有 Seata 就不用对账。
正确:AT/TCC 仍会悬挂、空回滚,资金必须对账。
错误:对账发现少了一笔就再调一次支付接口。
正确:查单,按本地状态机补,不新开支付。
## 验证
- 故意丢掉一条 MQ,日对账能检出并补平一次。
- 重复补账不增加金额。
- 渠道文件晚到有重跑,不重复处理已 HANDLED。
## 评审清单
- [ ] 有流水号和对账表
- [ ] 平账走原入账幂等逻辑
- [ ] 未用「上分布式事务」代替对账
---
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.
**Complete production-ready guide for Google Gemini embeddings API** This skill provides comprehensive coverage of the `gemini-embedding-001` model for generating text embeddings, including SDK usage, REST API patterns, batch processing, RAG integration with Cloudflare Vectorize, and advanced use cases like semantic search and document clustering. ---
Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.