When adding redundant paths (fallbacks, belt-and-suspenders), make them idempotent.
Pattern
Redundancy without idempotency causes loops, churn, or data corruption.
DO
Use _is_merge: true for Braintrust updates
Check if value exists before writing (fallback only if missing)
Use atomic write/rename for file operations
Make reconciliation steps safe to run repeatedly
DON'T
Write unconditionally in fallback paths
Allow multiple writers to overwrite each other
Fire "repair" actions that can trigger more repairs
Source Sessions
a541f08a: "Redundancy is good only if idempotent"
1c21e6c8: "Belt-and-suspenders, but make it idempotent"
6a9f2d7a: "Idempotent repair hooks"
1---2name: idempotent-redundancy3description: Idempotent Redundancy4---56# Idempotent Redundancy78When adding redundant paths (fallbacks, belt-and-suspenders), make them idempotent.910## Pattern1112Redundancy without idempotency causes loops, churn, or data corruption.1314## DO15- Use `_is_merge: true` for Braintrust updates16- Check if value exists before writing (fallback only if missing)17- Use atomic write/rename for file operations18- Make reconciliation steps safe to run repeatedly1920## DON'T21- Write unconditionally in fallback paths22- Allow multiple writers to overwrite each other23- Fire "repair" actions that can trigger more repairs2425## Source Sessions26- a541f08a: "Redundancy is good only if idempotent"27- 1c21e6c8: "Belt-and-suspenders, but make it idempotent"28- 6a9f2d7a: "Idempotent repair hooks"
Run npx skillmds@latest add vibeeval/idempotent-redundancy in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Idempotent Redundancy It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
vibeeval (@vibeeval) published this skill. Their other Agent Skills are listed on their SkillMD profile.