LeeHigma0201/claude-code-mods/tree/main/mods/check-ledger
check-ledger
記錄實際執行過的檢查,以及檢查後哪些檔案有變更;提供狀態列、/evidence,以及 Claude 在聲稱已測試前會讀取的證據工具。
關於這個 mod
一個 Claude Code mod,用來追蹤 CLAUDE.md 狀態宣告背後的證據。它監聽 Bash 與編輯工具呼叫,區分真正的檢查(測試、型別檢查器、建置、linter、驗證器、plugin test/validate)與不符合條件的呼叫,接著回報簡短的狀態列,例如 ✓ pnpm run typecheck · 2 files unchecked 或 ✗ pnpm test。/evidence 指令會顯示最近 10 次檢查、上次通過檢查後被編輯的檔案,以及帳本支援的最強狀態詞(tested 與 implemented locally)。mcp__check-ledger__evidence 工具會向模型提供同一份報告,但需要本機監聽器;若遭到拒絕,它會記錄一列,狀態列與 /evidence 仍可運作。包含 3 個可透過 claude plugin test . 執行的測試。
安裝
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add LeeHigma0201/claude-code-mods claude plugin install check-ledger
原文 / README
check-ledger
Keeps the evidence behind the CLAUDE.md status words: which real checks ran, whether they passed, and which files changed after the last pass.
- Real check means the repo's tests, type-checker, build, linter or validator:
pnpm test|typecheck|build|lint,vitest,jest,pytest,tsc,cargo/go/swifttest/build,eslint,claude plugin test|validate, and similar. Syntax-only checks (bash -n,node --check,json.tool),--helpand--versiondon't count. The outcome comes from the Bash call's own error flag. - Status line:
✓ pnpm run typecheck · 2 files unchecked, or✗ pnpm test. /evidence: the last 10 checks, the files edited after the last passing check, and the strongest word the ledger supports:tested(every edit has a passing check after it) orimplemented locally.evidencetool (mcp__check-ledger__evidence): the same report for Claude to read before it says "tested". The tool needs a local listener. Where that is refused (a sandboxed launch) it logs one line, and/evidenceand the status line still work.
Limits: the ledger lives in the module and restarts on a reload or a new session. It only sees calls made in this session, including its subagents. It observes; it never blocks or changes a call.
Hooks: session.start, tool.call (Bash and edit tools, passed through unchanged), command.run. Calls:
$.command.register, $.tool.register, $.ui.status, $.ui.log, $.clock.now.
Test: claude plugin test . (3 tests).