Logo von Transactional Integrity

Transactional Integrity

Community
Dark-Alex-17
transactional-integrity

Prüft Code, der Zustände verändert, auf transaktionale Integrität: Lücken bei der Atomarität, Read-modify-write-Rennen, nicht idempotente Handler für mindestens einmal zugestellte Eingaben, doppelte Schreibvorgänge in eine Datenbank und ein externes System, Nebenwirkungen, die ein Rollback überstehen oder bei Wiederholungen erneut ausgelöst werden, sowie Annahmen zum Isolationslevel. Unabhängig vom verwendeten Speicher (SQL-Transaktionen, bedingte DynamoDB-Schreibvorgänge, Redis MULTI, Dokumentenspeicher). Laden, wenn ein Diff Datenbankschreibvorgänge, Transaktionen, Queue-, Webhook- oder Job-Handler oder externe Nebenwirkungen betrifft. Die Ergebnisse fließen in die standardisierte Schweregradeinteilung für Code-Reviews ein. Ermöglicht schreibgeschützten Dateisystemzugriff, um Transaktionsgrenzen nachzuverfolgen.

Übersicht

HerausgeberDark-Alex-17
Repositorycoyote
Skill-Nametransactional-integrity
Sterne
56
Forks
2
Mitgelieferte Dateien
Nur Anweisungen
LizenzAGPL-3.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von Dark-Alex-17 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Transactional Integrity in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/Dark-Alex-17/coyote/tree/main/assets/skills/transactional-integrity
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Dark-Alex-17/coyote.git /tmp/coyote
mkdir -p .claude/skills
cp -r /tmp/coyote/assets/skills/transactional-integrity .claude/skills/transactional-integrity
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Transactional Integrity in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Transactional Integrity automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Transactional Integrity nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

You are reviewing state-changing code. The generic correctness checklist asks "does this work?"; you ask the three questions that page people at 3am: "what happens when this runs twice? halfway? concurrently?" Most production data-corruption incidents are not wrong business logic — they are correct logic executed under a failure mode the author never considered: a retry, a crash between two writes, or a second copy of the process.

When to load this skill

The diff touches ANY of: database writes, transaction blocks, queue/stream consumers, webhook handlers, scheduled/background jobs, retry logic, or calls to external state-holding systems (payment providers, email, other services). If the diff is pure reads, UI, or stateless computation — unload; this checklist has nothing for you.

The checklist

1. Atomicity: do multi-step writes share a transaction?

Find every place the diff performs two or more writes that must succeed or fail together (insert parent + child, update balance + write ledger entry, state transition + audit row). Then verify they actually share an atomic unit:

  • SQL: same transaction — and confirm it by READING the enclosing scope, not by assuming; a helper called from two places may run with and without a wrapping transaction.
  • DynamoDB: TransactWriteItems or a single-item design, not two PutItem calls.
  • Redis: MULTI/EXEC or a Lua script, not sequential commands.
  • Document stores: single-document update or multi-document transaction, not two updates.

A crash between unguarded writes is a FINDING: name the two writes, the window, and the resulting inconsistent state.

2. Read-modify-write: what happens when two run concurrently?

Every read → decide → write sequence is a lost-update race unless something serializes it:

  • SELECT then UPDATE with no FOR UPDATE, no optimistic version/etag check, no atomic UPDATE ... SET x = x + 1, no conditional write (ConditionExpression, compare-and-set).
  • Check-then-insert uniqueness ("does username exist?" then insert) with no DB unique constraint backing it — application-level checks NEVER close the race; the constraint is the fix, the check is UX.
  • In-memory caches of DB state mutated alongside the DB without invalidation ordering.

Ask: is there exactly one writer, structurally guaranteed (singleton job, partition ownership)? If yes, note the assumption and move on — flagging single-writer code for races is noise. If concurrency is possible, the missing guard is a finding.

3. Idempotency: is every at-least-once input handled at-most-once?

Queue consumers, webhook handlers, scheduled jobs, and anything retried WILL run more than once with the same input. For each handler the diff adds or modifies:

  • Is there an idempotency key, dedupe table, INSERT ... ON CONFLICT DO NOTHING, or conditional state transition (WHERE status = 'pending') that makes the second delivery a no-op?
  • Does the handler complete its side effects BEFORE acknowledging/deleting the message? Ack-then-process loses work; process-then-ack requires idempotency.
  • Partial failure: if the handler does A, B, C and crashes after B, the redelivery re-runs A and B — are they safe to re-run?

An error path that neither succeeds nor removes the message (so it redelivers forever into a DLQ) is also a finding — poison-message handling is part of idempotency.

4. Dual-write: DB + external system with no reconciliation

The diff writes to the local DB AND to an external state holder (payment provider, email service, another service's API, a search index) in one flow. One succeeds, the other fails — now the two systems disagree:

  • Look for the outbox pattern (write intent to DB in the transaction, deliver asynchronously), a saga/compensation step, or at minimum an explicit reconciliation job.
  • "Call external API inside the DB transaction" is not a fix — it holds locks across network I/O and still diverges when the commit itself fails after the call succeeded.
  • Order matters: charging a card before durably recording the intent to charge means a crash produces a charged-but-unprovisioned customer; the reverse produces a recorded-but-unfulfilled intent, which is recoverable.

Flag the divergence window and which side wins on replay.

5. Side effects vs rollback and retry

  • Anything non-transactional fired INSIDE a transaction (email sent, event published, cache invalidated) happens even when the transaction rolls back. It must move after commit (or into an outbox).
  • Anything fired inside a RETRIED scope (job framework with automatic retries, HTTP client with retry middleware) re-fires per attempt unless guarded.
  • Metrics/logs are exempt — do not flag observability as a side-effect violation.

6. Isolation assumptions

Code that is only correct under SERIALIZABLE but runs at the store's default (READ COMMITTED in Postgres, REPEATABLE READ in MySQL) is a latent race. Watch for: aggregate checks before writes ("sum of debits ≤ balance"), multi-row invariants enforced in application code, and phantom-sensitive queries. If the diff's correctness depends on an isolation level, verify the code SETS it rather than assumes it.

Ground-truth discipline

  • READ the enclosing scope of every write the diff touches — transaction boundaries live up-stack from the hunk. fs_grep the function's callers to learn whether it already runs inside a transaction.
  • fs_grep the handler registration/config for retry counts, DLQ wiring, and delivery semantics before claiming "this retries."
  • Check sibling handlers for the idempotency pattern the codebase already uses (dedupe table, conditional transition) — a new handler skipping the established guard is the strongest form of evidence.
  • Do not flag theoretical races in structurally single-writer code; note the single-writer assumption instead so the next reviewer sees it was considered.

Finding format and severity

Fold findings into the standard review severities — no separate verdict:

  • 🔴 CRITICAL — money/data loss or corruption under a realistic failure (dual-write with no reconciliation on a paid flow; lost-update race on a balance; non-idempotent charge handler).
  • 🟡 WARNING — inconsistency window or unbounded redelivery with operational (not monetary) blast radius; missing constraint behind a check-then-act.
  • 🟢 SUGGESTION — hardening: add the missing unique constraint even though the race is improbable, move the email after commit.

Every finding names: the writes involved (file:line), the failure mode that triggers it (crash between X and Y / concurrent execution / redelivery), and the concrete fix. "This might have race conditions" is noise; "second invoice.paid delivery re-runs the provisioning insert at handler.go:88 because there is no dedupe on event_id — add the unique index the payment handler at handler.go:41 already uses" is signal.

Anti-patterns

  • Flagging every read-then-write as a race without checking who else writes.
  • Demanding SERIALIZABLE everywhere — the finding is an UNSTATED isolation assumption, not a low isolation level.
  • Treating logs/metrics as dual-writes.
  • Reviewing the hunk without reading the enclosing transaction scope — most false positives and false negatives in this domain come from not knowing whether you're already inside a transaction.
  • Accepting "the framework handles it" without grepping the framework config that proves it.

Häufig gestellte Fragen

Was macht der KI-Skill Transactional Integrity?

Prüft Code, der Zustände verändert, auf transaktionale Integrität: Lücken bei der Atomarität, Read-modify-write-Rennen, nicht idempotente Handler für mindestens einmal zugestellte Eingaben, doppelte Schreibvorgänge in eine Datenbank und ein externes System, Nebenwirkungen, die ein Rollback überstehen oder bei Wiederholungen erneut ausgelöst werden, sowie Annahmen zum Isolationslevel. Unabhängig vom verwendeten Speicher (SQL-Transaktionen, bedingte DynamoDB-Schreibvorgänge, Redis MULTI, Dokumentenspeicher). Laden, wenn ein Diff Datenbankschreibvorgänge, Transaktionen, Queue-, Webhook- oder J...

Warum Transactional Integrity in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Transactional Integrity besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Transactional Integrity in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/Dark-Alex-17/coyote/tree/main/assets/skills/transactional-integrity ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Transactional Integrity nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Transactional Integrity verwenden?

So viele Sie möchten. In TypingMind können Sie Transactional Integrity mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Transactional Integrity kostenlos?

Ja. Der Skill wird von Dark-Alex-17 auf GitHub unter der Lizenz AGPL-3.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇