aspcore-idempotency

aspcore-idempotency is a skill for Claude Code, Codex from baoduy/drunk-mcp-proxy. It costs 32 tokens per session (2,906 once invoked), scanned A, original, MIT.

A guide for using an ASP.NET Core package that makes repeated API requests safe to handle once. An idempotent operation gives the same result when the same request is accidentally sent again.

In plain words
What is it for?
Use it when building ASP.NET Core controller or minimal APIs that accept idempotency keys and store request results in SQL Server or Redis.
Why use it?
It prevents duplicate actions when clients retry requests because of timeouts, network failures, or concurrent submissions, while supporting stored responses and duplicate-request detection.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building ASP.NET Core controller or minimal APIs that accept idempotency keys and store request results in SQL Server or Redis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/baoduy/drunk-mcp-proxy/aspcore-idempotency
Install

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.

Any agent
npx skills add baoduy/drunk-mcp-proxy --skill aspcore-idempotency
Clone the repo
git clone --depth 1 https://github.com/baoduy/drunk-mcp-proxy

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for aspcore-idempotency

README.md
[![agentmods](https://agentmods.dev/badge/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency/github.svg)](https://agentmods.dev/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency)
Your own site
<a href="https://agentmods.dev/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency"><img src="https://agentmods.dev/badge/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aspcore-idempotency

Your own site · 80×15
<a href="https://agentmods.dev/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency"><img src="https://agentmods.dev/badge/skills/baoduy/drunk-mcp-proxy/aspcore-idempotency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,906 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02906
Opus 5.5 $0.00013 $0.01162
Sonnet 5.5 $0.00006 $0.00581
Haiku 4.5 $0.00003 $0.00291

Measured 3mo ago against content hash 96b8a5c078af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aspcore-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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (sample.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

data/skills/dknet/aspcore-idempotency/SKILL.md · 449 lines

How it starts

The opening of the file, as written. The whole thing — 449 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ASP.NET Core Idempotency Skill

This skill helps GitHub Copilot generate code using DKNet's ASP.NET Core Idempotency package (DKNet.AspCore.Idempotency) for building idempotent APIs that safely handle duplicate requests.

🎯 Package Purpose

DKNet.AspCore.Idempotency provides:

  • Idempotency Keys - Request deduplication using unique keys
  • Response Caching - Cache successful responses for replay
  • Distributed Support - Works with SQL Server and Redis stores
  • Automatic Integration - Minimal API and Controller support
  • Conflict Detection - Handles concurrent duplicate requests

NuGet Packages:

  • DKNet.AspCore.Idempotency (Core)
  • DKNet.AspCore.Idempotency.MsSqlStore (SQL Server storage)

📦 Installation

dotnet add package DKNet.AspCore.Idempotency
dotnet add package DKNet.AspCore.Idempotency.MsSqlStore

🏗️ Setup

Configure Services

using DKNet.AspCore.Idempotency;
using DKNet.AspCore.Idempotency.MsSqlStore;

var builder = WebApplication.CreateBuilder(args);

// Add idempotency with SQL Server store
builder.Services.AddIdempotency<SqlServerIdempotencyStore>(options =>
{
    options.IdempotencyKeyHeader = "X-Idempotency-Key";
    options.CacheTimeout = TimeSpan.FromMinutes(5);
    options.EnableDistributedLocking = true;
});

// Or use in-memory store for testing
builder.Services.AddIdempotency(options =>
{
    options.IdempotencyKeyHeader = "X-Idempotency-Key";
    options.CacheTimeout = TimeSpan.FromMinutes(5);
});

var app = builder.Build();

// Add idempotency middleware
app.UseIdempotency();

app.Run();

Configure Database (SQL Server)

// Apply migrations to create idempotency table
services.AddDbContext<IdempotencyDbContext>(options =>
    options.UseSqlServer(connectionString));

// Table: IdempotencyRecords (Key, Response, CreatedAt, ExpiresAt)

🎯 Usage Patterns

Pattern 1: Minimal API with Idempotency

using DKNet.AspCore.Idempotency;

app.MapPost("/orders", async (
    CreateOrderRequest request,
    IOrderService orderService,
    CancellationToken cancellationToken) =>
{
    var order = await orderService.CreateOrderAsync(request, cancellationToken);
    return Results.Created($"/orders/{order.Id}", order);
})
.WithIdempotency(); // Enable idempotency

// Client sends:
// POST /orders
// X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
// { "customerId": "...", "items": [...] }

// Duplicate requests with same key return cached response

Read the full file on GitHub · 449 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 3mo ago First seen · 449 lines · 32 tokens per session scan A 96b8a5c078af

Subscribe to this mod's changes

aspcore-idempotency is a skill published in the GitHub repository baoduy/drunk-mcp-proxy (0 stars, last pushed 8mo ago), licensed MIT. It adds 32 tokens to every session and 2,906 once invoked, about $0.0001 per session on Opus 5.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-08-31.

Related

aspcore-idempotency compared with skills from other repositories

aspcore-idempotency next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aspcore-idempotencybaoduy/drunk-mcp-proxySkill08mo agoMITA32Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70kyesterdayApache-2.0A217Claude Code, Codex
tao-run-inference-serviceNVIDIA/skillsSkill4.4ktodayApache-2.0A92Claude Code
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.3kyesterdayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.3kyesterdayMITA46Claude Code
dev-runtimelangwatch/langwatchSkill5.1ktodayApache-2.0A172Claude Code
api-designericrisco/rsc-harnessSkill7093d agoMITA105Claude Code, Codex