transaction-safe-engineering
Skill1 starsChanged 7 days agoMITView on GitHub
Review or implement money movement, ledger updates, batch replay, reconciliation, and retry paths for idempotency, atomicity, concurrency, and recoverability. Use only when transaction integrity is at risk; skip projects without financial or equivalent state-transition risk.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adaptive-workflowSkill
- architecture-mapSkill
- browser-diagnosticsSkill
- domain-modelingSkill
- feature-discoverySkill
- lean-senior-engineeringSkill
- release-readinessSkill
- research-plan-implementSkill
- skill-security-guardSkill
- spec-to-code-verificationSkill
- systematic-debuggingSkill
- ui-design-intelligenceSkill
- ui-implementationSkill
- ui-quality-verificationSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
no double debit/credit, double refund, or duplicate batch application.
- Distinctive: line 24
no partial commit without a recovery path.
- Distinctive: line 30
Use an idempotency key derived from the business operation, not a random retry token.
- Distinctive: line 44
Test duplicate requests, timeout-after-commit, crash-before-commit, concurrent writers, partial batch failure, replay, and …
- Very specific: line 48
If the request is a review, report findings and do not change production behavior without authorization.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Transaction-Safe Engineering
Protect correctness when an operation can move money, change a ledger, or partially commit durable state. Load this skill only for a demonstrated transaction-integrity concern; it is not a default for ordinary code changes.
Model the transaction
Identify the business transaction, owning service, durable writes, external calls, and the commit boundary. Determine whether the operation is money movement, ledger posting, inventory reservation, batch replay, reconciliation, or another state transition with real-world consequence.
State the invariants before changing code:
- exactly-once effect or explicitly bounded at-least-once behavior;
- no double debit/credit, double refund, or duplicate batch application;
- balanced totals and preserved currency/rounding rules;
- no partial commit without a recovery path;
- authorization and approval for high-impact actions;
- audit evidence for every state change.
Design the safety controls
Use an idempotency key derived from the business operation, not a random retry token. Persist it with the operation result before returning success. Make retries reuse the key and return the original result. Define concurrency control for competing writers.
For multi-step operations, use a transaction where the storage supports it; otherwise use a durable state machine with explicit pending, committed, failed, and compensating states. Separate external side effects from the local commit. Do not claim atomicity across systems that cannot provide it.
For batches, persist checkpoints and a replay marker. Replays must be idempotent and must not reset missing values to zero. Reconcile totals before and after recovery.
Verify
Test duplicate requests, timeout-after-commit, crash-before-commit, concurrent writers, partial batch failure, replay, and rollback/compensation. Verify ledger totals and audit records, not just HTTP 200. Record the actual failure injection and remaining gaps.
If the request is a review, report findings and do not change production behavior without
authorization. Pair with systematic-debugging for an unexplained failure and
spec-to-code-verification for requirement evidence.
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.

