agentleFS
BuilderIOBuilderIO/agent-native/.agents/skills/reliable-mutations/SKILL.md

reliable-mutations

Skill7.6k starsChanged 5 months agoMITView on GitHub

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.

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    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 …

    line 31
  2. Distinctive:

    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 …

    line 48
  3. Very specific:

    Don't loop for each item: write(item) for a large set in a single hosted turn.

    line 55
  4. Distinctive:

    Don't claim completion because every tool call returned ✓ — a ✓ on an aborted chunk does not mean the row was committed.

    line 57
  5. Distinctive:

    Don't silently shrink the scope ("I added a few of them") and present it as the finished task.

    line 59
  6. Distinctive:

    Don't try to "fix" this by asking for a longer run timeout — the budget is correct.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

Download now (ZIP)

Trending

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about BuilderIO/agent-native

The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 61

Talked about on GitHub and Bluesky (61 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 11

6 more on Bluesky

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.