Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/j4flmao/agent-skills/idempotencynpx skills add j4flmao/agent-skills --skill idempotencygit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/j4flmao/agent-skills/idempotency)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/idempotency"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/idempotency.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00110 | $0.05212 |
| Opus 5 | $0.00055 | $0.02606 |
| Sonnet 5 | $0.00022 | $0.01042 |
| Haiku 4.5 | $0.00011 | $0.00521 |
Grade A, and why
backend-idempotency scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 544 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Idempotency
Purpose
Guarantee exactly-once execution for mutating operations using idempotency keys, enabling safe retries without duplicate side effects. Idempotency is the foundation of reliable distributed systems — without it, network retries cause duplicate orders, double charges, and inconsistent state.
Agent Protocol
Trigger
Exact user phrases: "idempotency", "idempotent", "idempotency key", "exactly-once", "retry safety", "deduplication", "duplicate detection", "idempotent endpoint", "safe retry".
Input Context
- Which endpoints need idempotency guarantees.
- Existing data store (Redis, PostgreSQL, DynamoDB).
- Current retry configuration.
Output Artifact
Idempotency key handling design. No file unless requested.
Response Format
Endpoint: {method} {path}
Key Source: {client-provided|server-generated}
Storage: {store type}
TTL: {duration}
Completion Criteria
- Idempotency key storage implemented with TTL.
- Key uniqueness enforced at database level.
- Response caching: same key returns same response.
- Expired keys handled gracefully.
- Concurrent requests with same key resolved (first wins or lock).
Max Response Length
4 lines per endpoint. 15 lines for full solution.
Architecture Decision Tree
Which Idempotency Strategy?
Is the operation naturally idempotent? (PUT, DELETE, same result every time)
├── Yes → No key needed, just use the resource identifier
└── No → Is the operation a creation (POST, different result each time)?
├── Yes → Client-provided idempotency key required
│ ├── Does the client always retry on network errors?
│ │ ├── Yes → Always require key on mutating endpoints
│ │ └── No → Still require it — clients are unreliable
│ └── Is the key collision possible?
│ ├── Yes → Use UUID v4 or v7 for key generation
│ └── No → Use business key (invoice ID, order number)
└── No → Server-generated idempotency based on request hash
├── Same request body within TTL → deduplicate
└── Different body → new operation
What ships with it
8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/exactly-once-strategies.md 5.9 KB
- references/idempotency-distributed.md 8.0 KB
- references/idempotency-failure-modes.md 7.0 KB
- references/idempotency-keys.md 7.6 KB
- references/idempotency-middleware.md 9.6 KB
- references/idempotency-patterns.md 5.2 KB
- references/idempotency-storage.md 7.2 KB
- references/idempotency-testing.md 7.5 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 544 lines · 110 tokens per session scan A 0043500efe5b
backend-idempotency is a skill published in the GitHub repository j4flmao/agent-skills (20 stars, last pushed today), licensed MIT. It adds 110 tokens to every session and 5,212 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
flowguard-field-lifecycle-mesh
Use when a change adds, removes, renames, migrates, replaces, externalizes, preserves, or audits fields, schema keys, config flags, prompt fields, payload columns, persisted attributes, defaults, aliases, or fallbacks.
pinecone
Managed vector DB for production RAG and search.
redis-inspect
Inspect Redis cache keys, values, and TTLs for debugging. Supports both main cache and system cache. Use for debugging cache issues, checking cached values, and monitoring cache state. Read-only by default.
redis-js
Work with the Upstash Redis JavaScript/TypeScript SDK for serverless Redis operations. Use for caching, session storage, rate limiting, leaderboards, full-text search (querying, filtering, aggregating with @upstash/redis search extension), and all Redis data structures. Supports automatic serialization/deserialization…
using-redis-token-buckets
Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…
byted-milvus
Manages Milvus on Volcano Engine (Volcengine): provision/inspect/scale/delete clusters and run collection + CRUD/search operations via bundled CLIs. Use when the user mentions Milvus + Volcengine/Volcano Engine or asks to operate Milvus there.