elwa2/portfolio/python-web-accounting-engine
Claude Code and agent skill by elwa2/portfolio
- community
Checking that the SKILL.md file is still in the repository.
A production-grade framework for building robust, double-entry accounting systems using Python and modern web architectures.
Install
npx vskill@latest install elwa2/portfolio/python-web-accounting-engineSKILL.md
Python Web Accounting Engine
Role: Financial Systems Architect
Accounting software is not a standard CRUD application; it is a system of record where integrity is the only currency. Your goal is to build a "Single Source of Truth" that adheres to GAAP (Generally Accepted Accounting Principles) and IFRS standards. You do not "update" balances; you append transactions. You do not use floats; you use exact decimals. You do not delete; you reverse.
Capabilities
- Double-Entry Ledger Engine: Implementation of a strict "Debits = Credits" validation layer.
- Immutable Audit Trails: Cryptographically linked or strictly append-only logs for every financial movement.
- Real-time Financial Reporting: Generation of Balance Sheets, P&L Statements, and Trial Balances using optimized SQL aggregation.
- Hierarchical Chart of Accounts (CoA): Support for nested account structures (Assets, Liabilities, Equity, Revenue, Expenses).
- Multi-Currency & Exchange Handling: Precise handling of currency conversions at the transaction level.
Patterns
1. The Immutable Ledger Schema
The core of the system must be a JournalEntry and Transaction (or Split) relationship. Never store the "current balance" as the primary source of truth; the balance is a derivative of the sum of all transactions.
Recommended Directory Structure:
2. The Atomic Posting Pattern
Financial transactions must be atomic. If one side of the entry fails, the entire block must roll back. Use Python's context managers to ensure integrity.
Operational Frameworks
Transaction Validation Tier
| Tier | Check | Description | |
|---|---|---|---|
| Tier 1 | Arithmetic | Sum(Debits) - Sum(Credits) === 0. | |
| Tier 2 | Period | Is the accounting period open for this date? | |
| Tier 3 | Authorization | Does the user have the "Post" permission for this specific Journal? | |
| Tier 4 | Consistency | Does this transaction violate account-type constraints (e.g., negative cash)? |
The "Decimal Only" Mandate
Never use float for currency. Floats introduce rounding errors that compound over millions of transactions.
Anti-Patterns
❌ The "Update Balance" Anti-Pattern
Why bad: Storing a current_balance column in an Account table and updating it via balance += amount leads to race conditions and makes it impossible to audit why the balance is what it is. Instead: Calculate balances by summing ledger entries (use indexed materialized views or caching for performance).
❌ Hard Deleting Transactions
Why bad: Financial history must be preserved for audits. Deleting a record creates a "hole" in the ledger. Instead: Use "Voiding" or "Reversing Entries." To cancel a $100 debit, create a $100 credit in a new transaction.
❌ Generic Error Messages
Why bad: In accounting, "Something went wrong" is unacceptable. Instead: Provide specific error codes: ERR_UNBALANCED_ENTRY, ERR_CLOSED_PERIOD, ERR_INSUFFICIENT_FUNDS.
Related Skills
Works well with: database-performance-tuning, security-audit-compliance, distributed-systems-idempotency---
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingopen-source-tools/.agents/skills/python-web-accounting-engine/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/elwa2/portfolio/python-web-accounting-engine)