Async request deduplication and caching for improved performance.
Install
mkdir -p .claude/skills/idmp && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10087" && unzip -o skill.zip -d .claude/skills/idmp && rm skill.zipInstalls to .claude/skills/idmp
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when you need to deduplicate concurrent or repeated async calls, prevent duplicate API requests, cache async function results, add automatic retry with exponential backoff, memoize heavy computation wrapped in Promise, replace SWR/Provider for request sharing, invalidate cache with flush, or persist cached data to localStorage, sessionStorage, node-fs, or redis. Covers install, usage, and plugin code generation for idmp in browser, React, and Node.js projects.Key capabilities
- →Deduplicate concurrent async network requests
- →Cache async function results with configurable TTL
- →Implement automatic retries with exponential backoff
- →Invalidate cache entries using specific keys or flush all
- →Persist cached data to browser storage, file system, or Redis
How it works
The library wraps an async function with a stable key, intercepting calls to return cached results or deduplicate concurrent executions.
Inputs & outputs
When to use idmp
- →Deduplicating API requests
- →Caching async function results
- →Adding retry logic to network calls
About this skill
idmp
Use this skill whenever the task involves:
- Deduplicating concurrent or repeated async/network requests
- Preventing duplicate API calls across components or modules
- Caching async function results with a TTL (
maxAge) - Memoizing expensive computation wrapped in a Promise
- Adding automatic retry with exponential backoff on failure
- Replacing SWR, Provider, or Redux for simple data sharing
- Invalidating cache after mutations (
flush/flushAll) - Persisting cached data to localStorage, sessionStorage, file system, or Redis
- Installing
idmpor any of its official plugins
Installation
Install the main package:
npm install idmp
Or use any other package manager: pnpm add idmp / yarn add idmp / bun add idmp.
The official plugin entry points are exported from the same package:
idmp/browser-storageidmp/node-fsidmp/redis
Core Pattern
Wrap the original async function with a stable deduplication key.
import idmp from 'idmp'
const fetchUser = async (userId: string) => {
const response = await fetch(`/api/users/${userId}`)
return await response.json()
}
export const fetchUserIdmp = (userId: string) =>
idmp(`/api/users/${userId}`, () => fetchUser(userId))
Options To Reach For
maxAge: keep resolved data for a period of time (default 3000ms, max 7 days)maxRetry: retry transient failures automatically (default 30)minRetryDelay: minimum retry backoff in ms (default 50)maxRetryDelay: maximum retry backoff in ms (default 5000)signal: pass anAbortSignalto cancel all pending calls sharing this keyonBeforeRetry: log or monitor retry attempts
const controller = new AbortController()
const fetchUserIdmp = (userId: string) =>
idmp(`/api/users/${userId}`, () => fetchUser(userId), {
maxAge: 5_000,
maxRetry: 5,
signal: controller.signal,
})
// Abort all pending calls for this key
controller.abort('user navigated away')
Cache Invalidation
Use the same key when invalidating cache:
idmp.flush(`/api/users/${userId}`)
idmp.flushAll()
Official Plugins
Browser storage:
import idmp from 'idmp'
import storageWrap from 'idmp/browser-storage'
const storageIdmp = storageWrap(idmp, 'localStorage')
Node file system:
import idmp from 'idmp'
import fsWrap from 'idmp/node-fs'
const fsIdmp = fsWrap(idmp, 'your-project-namespace')
Redis:
import idmp from 'idmp'
import redisWrap from 'idmp/redis'
const redisIdmp = redisWrap(idmp, 'your-project-namespace', {
url: 'redis://localhost:6379',
})
Guidance
- Prefer deterministic string keys that reflect the real request identity.
- When a function accepts parameters, build the key from those parameters.
- Preserve the original function return type by forwarding arguments into the wrapped function.
- Use
flushafter mutations when the next read must bypass cache. - Use browser storage for frontend persistence,
node-fsfor local Node.js persistence, andredisfor shared server-side persistence.
When not to use it
- →When the request identity cannot be represented by a deterministic string key
Prerequisites
Limitations
- →Requires deterministic string keys for effective deduplication
How it compares
Unlike manual caching, this provides built-in retry logic, TTL management, and standardized cache invalidation methods.
Compared to similar skills
idmp side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| idmp (this skill) | 0 | 3mo | Review | Intermediate |
| telegram-mini-app | 62 | 6mo | Review | Advanced |
| stripe-integration | 48 | 2mo | No flags | Advanced |
| bullmq-specialist | 25 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
stripe-integration
wshobson
Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.
bullmq-specialist
davila7
BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when: bullmq, bull queue, redis queue, background job, job queue.
nodejs-backend-patterns
wshobson
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices. Use when creating Node.js servers, REST APIs, GraphQL backends, or microservices architectures.
agent-dev-backend-api
ruvnet
Agent skill for dev-backend-api - invoke with $agent-dev-backend-api
shopify-apps
alinaqi
Shopify app development - Remix, Admin API, checkout extensions