financial-systems-patterns

Design compliant financial systems with double-entry ledgers and idempotent payment processing.

5|1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill financial-systems-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: financial-systems-patterns
Source: https://github.com/roanbrasil/engineer-grade-agent-skills/tree/main/skills/financial-systems-patterns
Command: npx skills add https://github.com/roanbrasil/engineer-grade-agent-skills --skill financial-systems-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building financial systems for payment processing, ledger management, and monetary transactions carries high risk of costly errors like rounding mistakes, duplicate charges, unbalanced books, and non-compliant audit trails that can lead to financial loss or regulatory penalties.

Core Features & Use Cases

  • Double-Entry Bookkeeping: Implement immutable, balanced ledger entries that enforce the debits = credits invariant to catch corruption or bugs.
  • Payment Processing Guardrails: Add idempotency keys to prevent duplicate charges, enforce strict payment state machines to avoid illegal status transitions, and build reconciliation workflows to match internal records with processor settlement reports.
  • Compliance & Fraud Prevention: Construct append-only audit trails meeting PCI-DSS and SOC 2 requirements, and implement velocity-based fraud detection pipelines to block suspicious transactions.
  • Use Case: For a new payment gateway, use this skill to design a ledger that stores all monetary values as ISO 4217 minor units, add idempotent payment endpoints, and set up nightly reconciliation against Stripe settlement reports.

Quick Start

Use the financial-systems-patterns skill to implement a double-entry ledger and idempotent payment processing flow for your new payment gateway.

Frequently Asked Questions about financial-systems-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement double-entry bookkeeping for a payment processing ledger?

Double-entry bookkeeping requires immutable, balanced ledger entries that enforce the debits equal credits invariant to catch data corruption or software bugs. This skill provides the design patterns to construct a ledger that strictly maintains this fundamental accounting balance.

What's the best way to prevent duplicate charges in a payment gateway?

Preventing duplicate charges requires adding idempotency keys to your payment processing endpoints to ensure the same request is not executed twice. This skill outlines how to design idempotent payment flows and enforce strict state machines to avoid illegal transaction status transitions.

How do I store multi-currency monetary values to avoid rounding mistakes?

Avoiding rounding mistakes involves storing all monetary values as ISO 4217 minor units rather than floating-point numbers. This skill provides the patterns for multi-currency value storage and immutable ledger entries to maintain precise financial calculations.

How do I build a financial audit trail for PCI-DSS and SOC 2 compliance?

Building a compliant financial audit trail requires constructing append-only records that meet PCI-DSS and SOC 2 regulatory requirements. This skill provides patterns to implement immutable audit logs and velocity-based fraud detection pipelines to block suspicious transactions.

How do I reconcile internal ledger records with external payment processor settlements?

Reconciling internal records with external settlements requires building reconciliation workflows to match your ledger against processor settlement reports. This skill provides patterns to design these workflows, ensuring your internal financial data aligns with external payment processor records.