Zum Inhalt springen
Skillpedia
APIs & Server (Backend)7.6k · #13177

reliable-mutations

Was er macht

Dieser Skill erklärt, wie ein Agent Datenbankänderungen so vornehmen sollte, dass sie wirklich Bestand haben, mit einem Stapelaufruf und einer anschließenden Prüfung des Ergebnisses. Er richtet sich an Entwickler und an alle, die erwarten, dass viele Einträge gespeichert werden.

Wann du ihn nutzt

  • ✓Wenn der Agent viele Einträge auf einmal speichern oder aktualisieren muss.
  • ✓Wenn eine lange Aufgabe App-Daten ändert und mit vollständig gespeicherten Daten enden muss.
  • ✓Wenn ein Agent Erfolg meldet und du einen Nachweis brauchst, dass die Daten wirklich gespeichert wurden.

Link zum Skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/reliable-mutations/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/reliable-mutations/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Aktualisiere alle diese Einträge in einem Durchgang und bestätige danach, dass sie wirklich gespeichert wurden.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Statt vieler kleiner Speicherungen, die auf halbem Weg stoppen können, sendet der Agent die ganze Menge in einer Aktion und prüft danach die gespeicherten Daten. Als Nachweis meldet er Anzahlen oder IDs.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Reliable Mutations

Rule

Make a change in one atomic call when the action supports it, then verify the persisted end state and report concrete proof (counts/ids). Never drive a multi-step change by looping many small writes, and never report success from a tool ✓ alone.

Why

Hosted foreground agent runs have a short soft budget so they can hand off cleanly under synchronous serverless walls. Durable background runs get a much longer budget, but they still should not rely on loops of many small writes: continuations can retry the same intent and leave partial state if each item is committed separately. One atomic call commits or fails as a unit; verification turns a hopeful ✓ into a fact.

How

  1. Prefer a single atomic call. If an action accepts the whole set (add many, set all, bulk update), pass the full batch in one call so it commits atomically. Check the action surface for a batch/plural form before reaching for a loop.
  2. Do not loop many small writes under any run budget. A sequence of N per-item writes can still leave partial or no state when a foreground run hands off, a background run continues, or an upstream provider fails. If no batch action exists, that is a gap in the action layer — add or extend an action that accepts the batch (see the actions skill) rather than papering over it with a loop.
  3. Verify the end state after writing. Re-read the data (a list/read action, a count query) and confirm the result matches intent — the right number of rows, the expected ids/fields. Do this before you tell the user it worked, and include the relevant verification expectation in the app's AGENTS.md.
  4. Report proof-of-done, not vibes. State concrete evidence: "saved 12 of 12 panels (ids …)" or "updated 5 rows". Do not infer success from the presence of a tool ✓ on an individual call.
  5. On a time-budget cutoff, fail loud. If the turn is cut before the change is fully committed and verified, say so explicitly and report what did persist (M of N) and what remains. Never round a partial or unverified write up to "done".

Don't

  • Don't loop for each item: write(item) for a large set in a single hosted turn.
  • Don't claim completion because every tool call returned ✓ — a ✓ on an aborted chunk does not mean the row was committed.
  • Don't silently shrink the scope ("I added a few of them") and present it as the finished task.
  • Don't try to "fix" this by asking for a longer run timeout — the budget is correct; restructure the write instead.

Related

  • actions — define or extend a batch/atomic action when only per-item writes exist.
  • storing-data — where app data lives and how reads/writes are scoped.
  • performance — avoid query waterfalls when verifying end state.
  • Design doc: packages/core/docs/design/durable-agent-runs.md — the real ceiling fix (checkpointed and durable runs); this skill is the agent-facing mitigation that reduces how often the ceiling is hit.
Häufige Fragen

Was, wenn die App keine Stapelaktion hat?

Der Skill sagt, eine hinzuzufügen, statt eine Schleife mit kleinen Schreibvorgängen laufen zu lassen.

Warum der Erfolgsmeldung nicht trauen?

Eine Erfolgsmeldung kann erscheinen, obwohl ein Teil des Schreibvorgangs fehlgeschlagen ist, daher verlangt der Skill eine Prüfung der gespeicherten Daten.

Gilt das auch für Hintergrundaufgaben?

Ja. Hintergrundläufe können wiederholt werden, daher ist ein Aufruf nach dem Alles-oder-nichts-Prinzip weiterhin vorzuziehen.

Details

Originalbeschreibung des Autors

How the agent must perform writes so they actually persist under the hosted foreground run budget and long-running background handoffs. Use whenever you create, update, delete, or batch-write app data — especially "do this for many items" loops, or any task where the user expects N things to end up saved.

repo: BuilderIO/agent-native

Beliebtheit

GitHub-Sterne
7.6k
Platz im Ranking
#13177
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills