double-entry-ledger-architecture

double-entry-ledger-architecture is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 78 tokens per session (1,267 once invoked), scanned A, original, MIT.

A design guide for double-entry accounting ledgers, where every transaction records matching debit and credit amounts. It covers account structures, multiple currencies, immutable entries, and audit trails.

In plain words
What is it for?
Use it when designing the database and rules for financial accounts, journal entries, balance checks, and audit history.
Why use it?
It helps prevent ledger records from becoming mathematically unbalanced or silently altered. It also provides a clear structure for tracing financial transactions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing the database and rules for financial accounts, journal entries, balance checks, and audit history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hamzabellouch/agent-skills/double-entry-ledger-architecture
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hamzabellouch/agent-skills --skill double-entry-ledger-architecture
Clone the repo
git clone --depth 1 https://github.com/hamzabellouch/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for double-entry-ledger-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture/github.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for double-entry-ledger-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/double-entry-ledger-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,267 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01267
Opus 5.5 $0.00031 $0.00507
Sonnet 5.5 $0.00016 $0.00253
Haiku 4.5 $0.00008 $0.00127

Measured 18d ago against content hash dc88b2bd1ce5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

double-entry-ledger-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Business/Fintech_and_Accounting/Tax_and_Invoicing/double-entry-ledger-architecture/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Double-Entry Ledger Architecture Skill Guide

This skill governs the design, data structures, and mathematical invariants required to build production-grade double-entry financial ledgers.


1. Double-Entry Mathematical Invariants

In double-entry bookkeeping, every financial transaction consists of at least two balanced entries.

$$\sum \text{Debits} = \sum \text{Credits}$$

The fundamental accounting equation must hold true at every millisecond:

$$\text{Assets} = \text{Liabilities} + \text{Equity} + (\text{Revenue} - \text{Expenses})$$

[ Account Classifications & Normal Balances ]
+------------------+------------------+------------------+
| Account Type     | Debit (Dr)       | Credit (Cr)      |
+------------------+------------------+------------------+
| Assets           | Increases (+)    | Decreases (-)    |
| Liabilities      | Decreases (-)    | Increases (+)    |
| Equity           | Decreases (-)    | Increases (+)    |
| Revenue          | Decreases (-)    | Increases (+)    |
| Expense          | Increases (+)    | Decreases (-)    |
+------------------+------------------+------------------+

2. Production Database Schema (PostgreSQL)

-- 1. Chart of Accounts
CREATE TYPE account_classification AS ENUM ('ASSET', 'LIABILITY', 'EQUITY', 'REVENUE', 'EXPENSE');

CREATE TABLE accounts (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    account_code VARCHAR(32) NOT NULL UNIQUE, -- e.g. '1010-CASH-USD'
    name VARCHAR(128) NOT NULL,
    classification account_classification NOT NULL,
    currency VARCHAR(3) NOT NULL DEFAULT 'USD',
    is_active BOOLEAN NOT NULL DEFAULT TRUE,
    created_at TIMESTAMPTZ DEFAULT clock_timestamp()
);

-- 2. Journal Transactions (Header)
CREATE TABLE journal_transactions (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    reference_id VARCHAR(128) NOT NULL UNIQUE, -- Idempotency key from payment/checkout
    description TEXT NOT NULL,
    posted_at TIMESTAMPTZ NOT NULL DEFAULT clock_timestamp()
);

-- 3. Journal Entries (Lines: Debits & Credits)
CREATE TABLE journal_entries (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    transaction_id UUID NOT NULL REFERENCES journal_transactions(id) ON DELETE RESTRICT,
    account_id UUID NOT NULL REFERENCES accounts(id) ON DELETE RESTRICT,
    amount NUMERIC(18, 4) NOT NULL CHECK (amount > 0),
    is_debit BOOLEAN NOT NULL,
    entry_sequence INT NOT NULL,
    CONSTRAINT uq_txn_entry_seq UNIQUE (transaction_id, entry_sequence)
);

CREATE INDEX idx_journal_entries_account ON journal_entries(account_id);
CREATE INDEX idx_journal_entries_txn ON journal_entries(transaction_id);

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 18d ago First seen · 139 lines · 78 tokens per session scan A dc88b2bd1ce5

Subscribe to this mod's changes

double-entry-ledger-architecture is a skill published in the GitHub repository hamzabellouch/agent-skills (8 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,267 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.

Related

Other skills, from other repositories

biofuels-biodiesel-technology-manager

Use when a task needs the judgment of a Biofuels/Biodiesel Technology and Product Development Manager — deciding whether a lab/bench-scale process is ready to scale up, evaluating feedstock flexibility tradeoffs in process design, pricing a technology's value against regulatory credit pathways (RFS RIN, LCFS CI…

wonsukchoi/domain-experts · 115 tokens

biofuels-production-manager

Use when a task needs the judgment of a Biofuels Production Manager — running a biofuel production facility (ethanol, biodiesel, renewable diesel), managing feedstock supply and quality variability, evaluating a yield or efficiency problem, or balancing production economics against commodity price swings.

wonsukchoi/domain-experts · 61 tokens

bookkeeping-accounting-clerk

Use when a task needs the judgment of a Bookkeeping, Accounting, and Auditing Clerk — reconciling a bank or credit card account, resolving an AP three-way-match discrepancy before payment, coding an expense to the correct account and department, tracing a general ledger discrepancy to root cause, or running a…

wonsukchoi/domain-experts · 73 tokens

accountant-controller

Use when a task needs the judgment of an accountant/financial controller — closing the books on a fixed calendar, resolving a bank or account reconciliation variance, evaluating a revenue-recognition or substance-over-form question, designing or testing an internal control, or triaging a discrepancy in financial…

wonsukchoi/domain-experts · 66 tokens

auto-damage-appraiser

Use when a task needs the judgment of an Auto Damage Insurance Appraiser — writing a repair estimate from photos or an in-person inspection, deciding repair vs. total loss against a state total-loss formula, evaluating a body shop's supplement request for hidden damage, determining actual cash value (ACV) for a…

wonsukchoi/domain-experts · 84 tokens

bill-account-collector

Use when a task needs the judgment of a bill and account collector — prioritizing a delinquent-account portfolio by recovery likelihood, structuring a payment plan against a debtor's stated ability to pay, drafting an FDCPA/Reg F-compliant collection communication, handling a cease-and-desist or debt dispute, or…

wonsukchoi/domain-experts · 80 tokens