reliable-mutations
What it does
This skill explains how an agent should make database changes so they actually stick, using one batch call and then verifying the result. It is for developers and for anyone expecting many items to be saved.
When to use it
- βWhen the agent must save or update many items at once.
- βWhen a long task changes app data and must finish with everything saved.
- βWhen an agent reports success and you need proof the data was really stored.
Skill link
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/reliable-mutations/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βUpdate all of these items in one go, then confirm they were really saved.β
5 new skills a week. 1 minute to read.
How it works
Instead of many small saves that can stop halfway, the agent sends the whole set in one action, then checks the stored data and reports counts or IDs as proof.
Technical content (original SKILL.md)
Original text by the author, straight from 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
- 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.
- 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
actionsskill) rather than papering over it with a loop. - 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. - 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.
- 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.
FAQ
What if the app has no batch action?
The skill says to add one rather than running a loop of small writes.
Why not trust the success message?
A success message can appear even when part of the write failed, so the skill asks for a check of the stored data.
Does this apply to background tasks too?
Yes. Background runs can retry, so one all-or-nothing call is still preferred.
Details
Original description by the author
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
Popularity
- GitHub stars
- 7.6k
- Ranking position
- #13177
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
design-exploration
7.6kHelps your agent explore several UI design directions side by side, let you pick one, and then refine the chosen design.
visual-edit
7.6kHelps your agent open a running local app in a visual editor so you can review and edit its real screens together.
turn-into-app
7.6kTurns a workflow, spreadsheet or project into a polished visual app, with populated screens and an agent working behind the controls.
visual-plan
7.6kTurns a plain text plan into an interactive visual plan with diagrams, file maps, code snippets and open questions.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.