# async-parallel

async-parallel — a Claude rule that sends independent async calls through Promise.all() instead of awaiting them one by one. Useful when a handler piles up sequential awaits.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 1064 repo stars
- Author: jarrodwatts
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jarrodwatts/claude-code-config/tree/HEAD/skills/vercel-react-best-practices/rules/async-parallel.md
- Updated: 2026-01-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/async-parallel

## What it does

The rule covers async code: calls with no dependency between them should be fired together with `Promise.all()`. The author rates the impact as CRITICAL and puts the gain at 2-10×.

Two TypeScript snippets sit in the file. The bad one awaits user, posts and comments one after another, which costs three round trips. The good one passes the same three calls into `Promise.all()` and gets them back in a single round trip.

Its own condition is the limit. Once the second call needs data from the first, running them together breaks the logic, so those calls stay sequential.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/async-parallel.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/async-parallel.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/async-parallel.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/async-parallel.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/async-parallel.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jarrodwatts/claude-code-config/tree/HEAD/skills/vercel-react-best-practices/rules/async-parallel.md

## When to use it
- replace a chain of sequential awaits in a request handler
- collapse three independent fetches into one round trip
- show the agent why parallel calls beat a waterfall
- spot the calls that must stay in order

## Example prompts
- Rewrite the sequential awaits in `src/api/profile.ts` with `Promise.all()` where the calls don't depend on each other.
- Check `loadDashboard` against the `async-parallel` rule and tell me which awaits can run together.
- Find places in this repo where `Promise.all()` would break logic because the second call needs the first.

## Similar
- [async-dependencies](https://affpapa.org/en/nevibecode/rules/async-dependencies.md) — rule · ★ 7191 repo stars
- [async-api-routes](https://affpapa.org/en/nevibecode/rules/async-api-routes.md) — rule · ★ 7191 repo stars
- [async-expert](https://affpapa.org/en/nevibecode/skills/async-expert.md) — skill · 212 installs
- [unit-test-scheduled-async](https://affpapa.org/en/nevibecode/skills/unit-test-scheduled-async.md) — skill · 3900 installs
- [fastapi-async-patterns](https://affpapa.org/en/nevibecode/skills/fastapi-async-patterns.md) — skill · 961 installs
- [rust-async-internals](https://affpapa.org/en/nevibecode/skills/rust-async-internals.md) — skill · 555 installs

From the same set: [jarrodwatts/claude-code-config](https://affpapa.org/en/nevibecode/by/jarrodwatts/claude-code-config.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
