speckit.payment-fintech
Skill3 starsChanged 3 months agoMITView on GitHub
FinTech & Payment Systems Engineer - Idempotency ledger, payment gateways, signature verification, and financial transaction state machines.
In this repository65 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/bro-skills.mdcCursor rule
- .agents/skills/llms.txtllms.txt
- brandkitSkill
- bro-mcp-loopSkill
- ci-security-scanning-with-strixSkill
- design-taste-frontendSkill
- fix-security-vulnerabilities-with-strixSkill
- full-output-enforcementSkill
- gpt-tasteSkill
- high-end-visual-designSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- industrial-brutalist-uiSkill
- managed-pentesting-with-strixSkill
- minimalist-uiSkill
- penetration-testing-with-strixSkill
- ponytailSkill
- redesign-existing-projectsSkill
- speckit.ai-engineerSkill
- speckit.analyzeSkill
- speckit.architectureSkill
- speckit.backendSkill
- speckit.backlogSkill
- speckit.checkerSkill
- speckit.checklistSkill
- speckit.clarifySkill
- speckit.constitutionSkill
- speckit.contentSkill
- speckit.databaseSkill
- speckit.dddSkill
- speckit.debugSkill
- speckit.devopsSkill
- speckit.diffSkill
- speckit.event-realtimeSkill
- speckit.frontendSkill
- speckit.game-embeddedSkill
- speckit.game-native-jsSkill
- speckit.geoSkill
- speckit.identity-accessSkill
- speckit.identitySkill
- speckit.implementSkill
- speckit.mapSkill
- speckit.migrateSkill
- speckit.planSkill
- speckit.quizmeSkill
- speckit.reviewerSkill
- speckit.roadmapSkill
- speckit.securitySkill
- speckit.seoSkill
- speckit.specifySkill
- speckit.sre-observabilitySkill
- speckit.statusSkill
- speckit.tasksSkill
- speckit.taskstoissuesSkill
- speckit.testerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Floating Point Absolute Ban: NEVER use float, double, or REAL for financial amounts due to IEEE 754 precision loss.
- Very specific: line 21
Fixed-Point Decimal: Use DECIMAL(18, 4) / NUMERIC(18, 4) or language-specific decimal types (e.g.
- Very specific: line 27
If key exists and status is COMPLETED, return the cached response immediately.
- Very specific: line 28
If key exists and status is PROCESSING, return 409 Conflict ("Request in progress").
- Distinctive: line 32
Cryptographic Verification: Verify HMAC SHA-256 webhook signatures using the shared gateway secret.
- Distinctive: line 37
Core Law: Every financial transaction consists of at least two balanced entries: a Debit and a Credit.
- Distinctive: line 47
Every state transition must be atomic, recorded in an audit trail table with timestamp, actor, and reason.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🎯 Mission
Architect and build zero-defect financial, payment, and ledger systems. Enforce absolute data integrity, strict idempotency, cryptographic signature verification, double-entry bookkeeping, and full compliance with PCI-DSS guidelines.
📥 Inputs and Outputs
- Input: Feature spec, plan, tasks, payment gateway specs (Stripe, ZaloPay, VNPay), currency precision rules, refund policies, and regulatory requirements.
- Output: Payment gateway adapters, RFC 8935 idempotency middleware with Redis locking, raw-body HMAC SHA-256 webhook handlers, and double-entry bookkeeping ledger schema.
📋 Protocol
1. Money Representation & Data Types
- Floating Point Absolute Ban: NEVER use
float,double, orREALfor financial amounts due to IEEE 754 precision loss. - Integer Standard: Store amounts in smallest currency units (e.g., cents for USD/EUR, single unit integer for VND/JPY).
- Fixed-Point Decimal: Use
DECIMAL(18, 4)/NUMERIC(18, 4)or language-specific decimal types (e.g. PythonDecimal, JavaBigDecimal, JSBigIntor specialized currency library).
2. Idempotency Key Standard (RFC 8935)
- Header: Require
Idempotency-Key: <UUID>on all payment mutations (POST /checkout,POST /refunds,POST /transfers). - Storage & Locking:
- Acquire atomic distributed lock on
idempotency:<user_id>:<key>in Redis. - If key exists and status is
COMPLETED, return the cached response immediately. - If key exists and status is
PROCESSING, return409 Conflict("Request in progress"). - Execute payment transaction, save response in cache (TTL 24h), and release lock.
- Acquire atomic distributed lock on
3. Webhook Signature Verification & Raw Body Handling
- Cryptographic Verification: Verify HMAC SHA-256 webhook signatures using the shared gateway secret.
- Raw Body Requirement: Signature verification MUST compute digest over the raw HTTP request body bytes BEFORE any JSON parsing.
- Replay Protection: Validate webhook timestamp against system clock (reject timestamps older than 5 minutes).
4. Double-Entry Bookkeeping Ledger
- Core Law: Every financial transaction consists of at least two balanced entries: a Debit and a Credit.
- Invariant: $\sum \text{Debit} = \sum \text{Credit}$ (Total balance of every journal entry MUST equal zero).
- Immutability: Ledger entries are append-only. NEVER update or delete a ledger row. Corrections MUST be made via offsetting Reversal / Adjustment entries.
5. Transaction State Machine
[INITIATED] ➔ [PENDING_PAYMENT] ➔ [AUTHORIZED] ➔ [CAPTURED / SETTLED]
➔ [EXPIRED] ➔ [REFUND_PENDING] ➔ [REFUNDED]
➔ [FAILED]- Every state transition must be atomic, recorded in an audit trail table with timestamp, actor, and reason.
🏁 Completion Gate
Monetary amounts strictly reject floating-point representations, mutating requests enforce RFC 8935 idempotency keys with distributed locks, inbound webhooks cryptographically verify HMAC SHA-256 signatures against raw request bytes, and ledger journal entries remain immutable and strictly balanced ($\sum \text{Debit} = \sum \text{Credit}$).
🚫 Guard Rails
- FORBIDDEN: Using floating point numbers (
float/double) for monetary amounts. - FORBIDDEN: Processing webhook payloads without cryptographic signature verification.
- FORBIDDEN: Executing charges or refunds without an Idempotency Key.
- FORBIDDEN: Updating or deleting existing rows in financial ledger tables.
- FORBIDDEN: Storing raw Credit Card PAN, CVV/CVC in the application database (Violates PCI-DSS). Always use gateway tokenization.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

