Skip to content
Skills Library
Programming · Building & coding

idempotency-annotation

/idempotency-annotation

Mark which tools change state so a retry after a timeout cannot duplicate an action. Use when a tool writes to disk, sends a request or mutates a remote record

Repository
skillmcp ↗
Licence
MIT
Last repository change
29.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 29.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Mark which tools change state so a retry after a timeout cannot duplicate an action. Use when a tool writes to disk, sends a request or mutates a remote record

Original author description

Mark which tools change state so a retry after a timeout cannot duplicate an action. Use when a tool writes to disk, sends a request or mutates a remote record

How it works

  1. Procedure
  2. Signals
  3. Patterns
  4. Pitfalls
  5. Done when
  6. References
Original SKILL.md headings · 61 lines, 266 words
SKILL.md preview
---
name: idempotency-annotation
description: "Mark which tools change state so a retry after a timeout cannot duplicate an action. Use when a tool writes to disk, sends a request or mutates a remote record"
pack: skillmcp
version: 1.0.0
category: ai-tool
tags: [design, idempotency, retries]
---

# Idempotency Annotation

> Mark which tools change state so a retry after a timeout cannot duplicate an action

**Use when:** a tool writes to disk, sends a request or mutates a remote record

**Avoid when:** every tool is a pure read, which is the safest design for a skill server

## Procedure

1. Classify each tool as read, write or destructive
2. Say which class it is in the tool description, in plain words
3. Design writes to be idempotent where possible, keyed by content or id
4. Refuse retries of destructive tools without an explicit identifier
5. Log the identifier so a duplicate can be recognised later
6. Test a repeated identical write and confirm no second effect

## Signals

- a repeated write with the same key produces one effect
- the description states whether the call mutates state
- destructive tools require an explicit target argument
- logs show the key that made the operation idempotent

## Patterns

**1. Class in words**

```text
read-only: returns indexed skills, changes nothing
```

**2. Content key**

```text
idempotency key = sha256(payload)
```

**3. Refusal shape**

```text
refusing repeat delete without an explicit id
```

## Pitfalls

- Leaving idempotency implicit and letting an agent retry a write
- Making every write destructive and unguarded because the tool is internal
- Hashing a payload that includes a timestamp, which defeats the key

## Done when

- each tool states whether it mutates state
- a repeated identical write is proven to have one effect

## References

- [RFC 9110 - idempotent methods](https://www.rfc-editor.org/rfc/rfc9110.html)
- [MCP - tools](https://modelcontextprotocol.io/specification/2025-03-26/server/tools)

Versions

The database has no other skills named idempotency-annotation.

Database snapshot: 13.11.2026 · package version 7136523d2db6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90idempotency-and-retries
    Make an operation safe to repeat — idempotency keys and their storage, what a replay returns, retry policy with backoff and jitter, and how to reconcile after a timeout whose outcome is unknown. Use when an operation has an external side effect (a charge, an email, a…
  • 100idempotent-apis
    Use when designing or reviewing any state-changing HTTP endpoint (POST, PUT, PATCH, DELETE) — covers idempotency keys, request deduplication, retry safety, exactly-once semantics over at-least-once delivery, and the Stripe/standard idempotency-key pattern. Use anytime an…
  • 90backend-idempotency
    Use this skill when the user says 'idempotency', 'idempotent', 'idempotency key', 'exactly-once', 'retry safety', 'deduplication', 'duplicate detection', 'idempotent endpoint', 'safe retry'. This skill implements idempotency keys and exactly-once semantics so retries never…
  • 90order-placement-idempotency
    Use when a bot places or modifies live orders and must never double-execute or send a duplicate order after a retry, timeout or reconnect, because a timeout means unknown rather than failed. For cancel races see broker-api-idempotent-cancel-requests.
  • 100api-idempotency-retry
    Design idempotency-key support and client retry guidance for a public API so integrators retry safely - key derivation and per-caller scoping, storage TTL and replay windows, atomic claim mechanisms (DB unique constraint, SERIALIZABLE row lock, conditional writes),…
  • 100idempotency-key-handling
    Replay one request with the same idempotency key and compare the effects, because a key that is recorded but not enforced produces a duplicate every retry. Use when the API accepts an idempotency key or a client-generated identifier for a create operation

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.