receipt-regression
Executes regression suites on receipt parsing logic to catch bugs before release.
Install
mkdir -p .claude/skills/receipt-regression && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10283" && unzip -o skill.zip -d .claude/skills/receipt-regression && rm skill.zipInstalls to .claude/skills/receipt-regression
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run AutoLedger receipt parsing regression tests on macOS. Use when modifying ReceiptParser, LedgerTextInterpreterCore, SmartReceiptParser, VoiceLedgerParser, or any parsing logic. Also use after adding golden cases, fixing OCR bugs, or before tagging a release. Triggers: "run regression", "run tests", "check parsing", "verify golden cases", "batch regression".Key capabilities
- →Run offline regression tests
- →Execute golden case regression
- →Batch process receipt samples
- →Validate parsing logic
How it works
It executes shell scripts that compile AutoLedgerCore and run test suites against golden cases and sample receipts.
Inputs & outputs
When to use receipt-regression
- →Verify receipt parsing
- →Run regression tests after refactor
- →Validate golden cases
About this skill
Receipt Regression
When to Use
- 修改
ReceiptParser、LedgerTextInterpreterCore、SmartReceiptParser、VoiceLedgerParser后 - 新增或修改
tests/golden/中的 golden case - 修复 OCR/解析 Bug 后验收
- 版本 Release 前的最终门禁校验
Procedure
从仓库根目录执行(不是 AutoLedger/ 子目录):
1. 离线回归(最常用)
macOS 本地 swiftc 平铺编译 AutoLedgerCore + 运行全部 golden cases:
bash scripts/run_offline_regression.sh
预期输出:所有 case PASS,最后打印 All N tests passed。
2. Golden Case 回归
仅运行 tests/golden/ledger_text_interpreter/cases.jsonl 中的 golden cases:
bash scripts/run_golden_regression.sh
3. 全量小票批量回归
对 receiptsample/ 目录下的全量小票样本跑批量报告(耗时较长):
bash scripts/run_receipt_batch_regression.sh
输出 Markdown 报告,用于建立引擎基线或评估回归影响面。
4. 全量(all)
依次执行上面三步:
bash scripts/run_offline_regression.sh && \
bash scripts/run_golden_regression.sh && \
bash scripts/run_receipt_batch_regression.sh
Interpreting Results
| 输出 | 含义 |
|---|---|
PASS | Case 通过 |
FAIL | Case 失败,输出期望值 vs 实际值 |
compile error | 源码编译失败,需先修复再回归 |
Gate Rule
构建或任意 case 失败 → 禁止进入下一轮迭代(见 agent-iteration-workflow.md)。
Adding Golden Cases
在 tests/golden/ledger_text_interpreter/cases.jsonl 末尾追加一行 JSON:
{"input": "...OCR 文本...", "expected": {"merchant": "商户名", "amount": 99.0, "category": "food"}}
追加后执行 bash scripts/run_golden_regression.sh 验证新 case 通过。
When not to use it
- →Projects without AutoLedger structure
Prerequisites
Limitations
- →Requires macOS
How it compares
It automates the full regression suite instead of manually running individual test cases.
Compared to similar skills
receipt-regression side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| receipt-regression (this skill) | 0 | 3mo | Review | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| bats | 9 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
bats
OleksandrKucherenko
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.
performance-profiling
davila7
Performance profiling principles. Measurement, analysis, and optimization techniques.
obsidian-local-dev-loop
jeremylongshore
Configure Obsidian plugin development with hot-reload and fast iteration. Use when setting up development workflow, configuring test vaults, or establishing a rapid development cycle. Trigger with phrases like "obsidian dev loop", "obsidian hot reload", "obsidian development workflow", "develop obsidian plugin".