ledger
Use when the agent encounters money-shaped identifiers (amount, price, balance, total, cost), performs arithmetic across monetary fields, or writes/reads…
Skill by mbachaud
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mbachaud-ledger
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/ledger
What's inside
- Skill name
ledger- Description
- Use when the agent encounters money-shaped identifiers (amount, price, balance, total, cost), performs arithmetic across monetary fields, or writes/reads money to a database. Enforces Decimal-only math.
- License
- Apache-2.0
- Instructions
- 45 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# ledger — deterministic money math
## When to invoke
If you see any of:
- variable names matching `amount_*`, `price_*`, `balance_*`, `total_*`, `cost_*`, `fee_*`, `tax_*`
- arithmetic involving currency, percentages of money, or splits/allocations
- DB columns storing money (TEXT or DECIMAL)
…use the helpers in `lib/decimal_math.py`. Never use Python `float` for money.
## API
```python
from lib.decimal_math import to_decimal, to_db_amount, sum_money, pct_of, rebalance, MONEY_PLACES, ZERO
```
- `to_decimal(value)` — coerce int/str/Decimal/None to Decimal. Float goes through `str()`.
- `to_db_amount(value)` — quantize to 4 places, return TEXT for SQLite/Postgres.
- `sum_money(iterable)` — sum Decimals exactly. Rejects float with `TypeError`.
- `pct_of(total, percent)` — return percent% of total, quantized.
- `rebalance(total, weights)` — split total across weights; last bucket absorbs rounding so the sum is exact.
## Anti-patterns the guardrail catches
```python
total = 0.1 + 0.2 # FLOAT — gives 0.30000000000000004
amount = price * 0.08 # FLOAT TAX — silent rounding error
record["amount"] = 33.33 # WRITES FLOAT TO DB
```
…rewrite as:
```python
total = sum_money([Decimal("0.10"), Decimal("0.20")]) # exact 0.30
amount = pct_of(price, Decimal("8")) # exact 8% of price
record["amount"] = to_db_amount(Decimal("33.33")) # "33.3300"
```
## Hook
`hooks/scripts/money_math_guard.py` runs on `PreToolUse` for `Edit`/`Write`. It scans the diff for float literals next to money-shaped identifiers and emits a WARN-level reminder. Never blocks unless `mek.toml > [compliance.gates] > money_write = "block"`.From mbachaud/MaxExpressKit, Apache-2.0.
More from mbachaud/MaxExpressKit
- 0.557score
using-mek
mbachaud
Use when starting any conversation in a project where MEK is installed - announces the three guardrails (compliance, drift, ledger) and how to invoke them.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
compliance
mbachaud
Use when the agent is about to perform a risky operation (destructive shell, deploy, schema migration, money write, force-push).
SkillCFreshness: C★ 2Claude Code +9 - 0.504score
drift
mbachaud
Use after PR-sized work completes (or on /mek-drift) to compare auto scores against .mek/drift-baseline.json and surface divergences > 0.15.
SkillCFreshness: C★ 2Claude Code +9 - 0.499score
ledger-companion
mbachaud
STUB.
SkillCFreshness: C★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 11, 2026 (5 months ago)
- Last release
- May 11, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/mbachaud/MaxExpressKit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mbachaud
- 0.557score
using-mek
mbachaud
Use when starting any conversation in a project where MEK is installed - announces the three guardrails (compliance, drift, ledger) and how to invoke them.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
compliance
mbachaud
Use when the agent is about to perform a risky operation (destructive shell, deploy, schema migration, money write, force-push).
SkillCFreshness: C★ 2Claude Code +9 - 0.504score
drift
mbachaud
Use after PR-sized work completes (or on /mek-drift) to compare auto scores against .mek/drift-baseline.json and surface divergences > 0.15.
SkillCFreshness: C★ 2Claude Code +9 - 0.499score
ledger-companion
mbachaud
STUB.
SkillCFreshness: C★ 2Claude Code +9
Cite this page
ledger skill. Agent Mart. https://agentmart.dev/skills/mbachaud-ledger (last updated 2026-10-24)