reliable-mutations
できること
このスキルは、エージェントがデータベースの変更を確実に反映させる方法を説明します。1回のバッチ呼び出しを使い、その後で結果を確認します。多数の項目を保存する開発者や、その結果を確かめたい人向けです。
使う場面
- ✓エージェントが多数の項目をまとめて保存・更新しなければならないとき。
- ✓長いタスクがアプリのデータを変更し、すべてが保存されて終わる必要があるとき。
- ✓エージェントが成功と報告し、データが本当に保存されたという証拠が必要なとき。
スキルのリンク
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/reliable-mutations/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“これらの項目をまとめて一度に更新してから、本当に保存されたか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
少しずつ何度も保存すると途中で止まるおそれがあるため、エージェントは全体を一つの操作で送ります。その後、保存されたデータを確認し、件数や ID を証拠として報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
よくある質問
アプリにバッチの操作がない場合はどうしますか?
小さな書き込みをループで繰り返すのではなく、バッチの操作を追加するよう、スキルは述べています。
成功の表示を信じてはいけないのはなぜですか?
書き込みの一部が失敗していても成功と表示されることがあるため、保存されたデータの確認を求めています。
バックグラウンドの作業にも当てはまりますか?
はい。バックグラウンドの実行は再試行されることがあるため、すべてか無かを決める1回の操作が依然として望ましいです。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 7.6k
- ランキング
- #13177
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
design-exploration
7.6kUIの複数のデザインの方向性を並べて検討し、1つを選んでもらい、選んだデザインを磨き上げるようエージェントを支援します。
visual-edit
7.6k実行中のローカルのアプリをビジュアルエディターで開き、本物の画面をまとめて確認し編集できるようエージェントを支援します。
turn-into-app
7.6kワークフロー、スプレッドシート、プロジェクトを、画面にデータが入り、操作の裏でエージェントが働く、洗練されたビジュアルアプリに変えます。
visual-plan
7.6kプレーンテキストの計画を、図、ファイルのマップ、コードの断片、未解決の質問を含む、対話できるビジュアルな計画に変えます。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。