hassanzohdy/reinforcements/async
Claude Code and agent skill by hassanzohdy/reinforcements
- community
Checking that the SKILL.md file is still in the repository.
Async/Promise utilities from @mongez/reinforcements — sleep, retry with backoff, timeout racing, pProps/pAll/pMap/pSeries/pFilter for concurrent work, defer, and debounceAsync.
Install
npx vskill@latest install hassanzohdy/reinforcements/asyncSKILL.md
Async
Promise-based control flow: sleep, retry, timeout, bounded concurrent map/filter/series, defer, async debounce.
sleep
retry
Throws the last error if all attempts fail. All options are optional and default to today's behaviour — nothing here is a breaking change.
Bail out on non-retryable errors with shouldRetry — observe with onError, decide with shouldRetry (called in that order):
Avoid thundering herd + cap the wait with jitter and maxDelay:
jitter: "full" (or true) → random(0, delay); "equal" → delay/2 + random(0, delay/2). Jitter draws from the package's seedable Random, so Random.seed(n) makes the schedule reproducible in tests.
Cancel a long retry loop with an AbortSignal — a pending delay is raced against the signal, so an abort resolves promptly instead of waiting the delay out:
retryable
Pre-bind retry options to a function, returning a reusable wrapper so you don't re-pass options at every call site:
Tip:exponentialbackoff with manyattemptsand nomaxDelaycan produce very long waits — setmaxDelayto bound the worst case.
timeout
Races promise against a timer; rejects with new Error(message) if the timer wins.
Combines well with retry:
pProps — parallel object destructuring
Run an object's worth of promises in parallel and resolve to an object with the same keys but unwrapped values. Modelled on Bluebird's Promise.props. Non-promise values pass through unchanged.
Rejects on the first rejected promise (same semantics as Promise.all).
pAll / pAllSettled
Typed tuple-preserving wrappers around Promise.all / Promise.allSettled.
Bounded concurrency
pMap
Preserves input order in the output. With stopOnError: false, every error is collected and the first one is thrown after all items complete.
pSeries
Strictly sequential. Stops at the first thrown error.
pFilter
defer
Externally resolvable promise — useful for bridging callback APIs.
debounceAsync
Async-aware debounce: every call returns a promise; bursts collapse into a single fn invocation; all the burst's promises resolve with the same final result.
poll
Repeatedly call fn until until(result) is truthy, then resolve with that result. Rejects on timeout, the attempts cap, or abort. Ideal for polling job status or readiness.
waitFor
Convenience wrapper around poll for boolean readiness checks — resolves once condition is truthy.
pReduce
Sequential async reduce — awaits the accumulator between steps. The async sibling of Array.prototype.reduce.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/async/SKILL.md
Popularity
- Repository stars
- 3
- Repository forks
- 2
- Repository npm downloads, 7 days
- 154
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 4 Aug 2026, 3 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hassanzohdy/reinforcements/async)