ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Implement idempotency keys and handling to ensure operations can be safely retried without duplicate effects. Use when building payment systems, APIs with retries, or distributed transactions.
Claude Code
$ npx -y skills add aj-geddes/useful-ai-prompts --skill idempotency-handling --agent claude-code
Codex
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a codex -y
Cursor
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a cursor -y
Gemini CLI
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a gemini-cli -y
GitHub Copilot
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a github-copilot -y
OpenCode
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a opencode -y
Windsurf
$ npx skills add aj-geddes/useful-ai-prompts --skill idempotency-handling -a windsurf -y
name: idempotency-handling description: > Implement idempotency keys and handling to ensure operations can be safely retried without duplicate effects. Use when building payment systems, APIs with retries, or distributed transactions.
Implement idempotency to ensure operations produce the same result regardless of how many times they're executed.
Minimal working example:
import express from "express";
import Redis from "ioredis";
import crypto from "crypto";
interface IdempotentRequest {
key: string;
status: "processing" | "completed" | "failed";
response?: any;
error?: string;
createdAt: number;
completedAt?: number;
}
class IdempotencyService {
private redis: Redis;
private ttl = 86400; // 24 hours
constructor(redisUrl: string) {
this.redis = new Redis(redisUrl);
}
async getRequest(key: string): Promise<IdempotentRequest | null> {
const data = await this.redis.get(`idempotency:${key}`);
return data ? JSON.parse(data) : null;
}
// ... (see reference guides for full implementation)Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [Express Idempotency Middleware](references/express-idempotency-middleware.md) | Express Idempotency Middleware | | [Database-Based Idempotency](references/database-based-idempotency.md) | Database-Based Idempotency | | [Stripe-Style Idempotency](references/stripe-style-idempotency.md) | Stripe-Style Idempotency | | [Message Queue Idempotency](references/message-queue-idempotency.md) | Message Queue Idempotency |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Implement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard navigation, and a11y testing. Use when…
Test web applications for WCAG compliance and ensure usability for users with disabilities. Use for accessibility test, a11y,…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate user stories, manage sprint backlog,…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident coordination. Use when setting up…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…