.claude/skills/ln-652-transaction-correctness-auditor/SKILL.md
Transaction correctness audit worker (L3). Checks missing intermediate commits, transaction scope (too wide/narrow), missing rollback handling, long-held transactions, trigger/notify interaction. Returns findings with severity, location, effort, recommendations.
npx skillsauth add cbbkrd-tech/jl-finishes ln-652-transaction-correctness-auditorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Specialized worker auditing database transaction patterns for correctness, scope, and trigger interaction.
MANDATORY READ: Load shared/references/task_delegation_pattern.md#audit-coordinator--worker-contract for contextStore structure.
Receives contextStore with: tech_stack, best_practices, db_config (database type, ORM settings, trigger/notify patterns), codebase_root.
Domain-aware: Supports domain_mode + current_domain.
Parse context from contextStore
Discover transaction infrastructure
pg_notify, CREATE TRIGGER, NOTIFY)expire_on_commit, autocommit, isolation level)Scan codebase for violations
Collect findings with severity, location, effort, recommendation
Calculate score using penalty algorithm
Return JSON result to coordinator
What: UPDATE without commit when DB trigger/NOTIFY depends on transaction commit
Detection:
pg_notify|NOTIFY|CREATE TRIGGER|CREATE OR REPLACE FUNCTION.*trigger in alembic/versions/, migrations/repo.*update|session\.execute.*update|\.progress|\.status related to trigger tablescommit() between sequential updates:
commit(), NOTIFY events are deferred until final commitSeverity:
Recommendation:
session.commit() at progress milestones (throttled: every N%, every T seconds)Effort: S-M (add strategic commits or redesign notification path)
What: Single transaction wraps unrelated operations, including slow external calls
Detection:
async with session.begin() or explicit transaction blocksawait httpx., await aiohttp., await requests., await grpc.open(, .read(, .write(Severity:
Recommendation: Split into separate transactions; use Saga/Outbox pattern for cross-service consistency
Effort: M-L (restructure transaction boundaries)
What: Logically atomic operations split across multiple commits
Detection:
session.commit() calls for operations that should be atomicSeverity:
Recommendation: Wrap related operations in single transaction using async with session.begin() or unit-of-work pattern
Effort: M (restructure commit boundaries)
What: session.commit() without proper error handling and rollback
Detection:
session.commit() not inside try/except block or context managersession.commit() in try without session.rollback() in exceptawait session.commit() in service methodsasync with session.begin() auto-rollbacks (safe)Severity:
Recommendation: Use async with session.begin() (auto-rollback), or add explicit try/except/rollback pattern
Effort: S (wrap in context manager or add error handling)
What: Transaction open during slow/blocking operations
Detection:
begin() and commit()await calls to external services (network latency)time.sleep() or asyncio.sleep()Severity:
Recommendation: Minimize transaction scope; prepare data before opening transaction, commit immediately after DB operations
Effort: M (restructure code to minimize transaction window)
MANDATORY READ: Load shared/references/audit_scoring.md for unified scoring formula.
Return JSON to coordinator:
{
"category": "Transaction Correctness",
"score": 5,
"total_issues": 6,
"critical": 1,
"high": 2,
"medium": 2,
"low": 1,
"findings": [
{
"severity": "CRITICAL",
"location": "app/infrastructure/messaging/job_processor.py:412",
"issue": "Missing intermediate commits: progress UPDATEs trigger pg_notify but no commit() between updates; real-time SSE events deferred",
"principle": "Transaction Correctness / Trigger Semantics",
"recommendation": "Add session.commit() at progress milestones (throttled every 5%)",
"effort": "S"
}
]
}
async with session.begin() is safe)shared/references/audit_scoring.mdshared/references/audit_output_schema.mdVersion: 1.0.0 Last Updated: 2026-02-04
testing
When the user wants to plan a content strategy, decide what content to create, or figure out what topics to cover. Also use when the user mentions "content strategy," "what should I write about," "content ideas," "blog strategy," "topic clusters," or "content planning." For writing individual pieces, see copywriting. For SEO-specific audits, see seo-audit.
development
When the user wants to create competitor comparison or alternative pages for SEO and sales enablement. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' or 'competitive landing pages.' Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. Emphasizes deep research, modular content architecture, and varied section types beyond feature tables.
development
Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Covers subject lines, opening lines, body copy, CTAs, personalization, and multi-touch follow-up sequences.
development
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' or 'involuntary churn.' This skill covers voluntary churn (cancel flows, save offers, exit surveys) and involuntary churn (dunning, payment recovery). For post-cancel win-back email sequences, see email-sequence. For in-app upgrade paywalls, see paywall-upgrade-cro.