async-api-routes
In API routes and Server Actions, start independent operations immediately, even if you don't await them yet.
Claude Code
$ npx -y skills add calcom/cal.diy --agent claude-code
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
Agent definition
async-api-routes.mdtitle: Prevent Waterfall Chains in API Routes impact: CRITICAL impactDescription: 2-10× improvement tags: api-routes, server-actions, waterfalls, parallelization
Prevent Waterfall Chains in API Routes
In API routes and Server Actions, start independent operations immediately, even if you don't await them yet.
**Incorrect (config waits for auth, data waits for both):**
export async function GET(request: Request) {
const session = await auth()
const config = await fetchConfig()
const data = await fetchData(session.user.id)
return Response.json({ data, config })
}**Correct (auth and config start immediately):**
export async function GET(request: Request) {
const sessionPromise = auth()
const configPromise = fetchConfig()
const session = await sessionPromise
const [config, data] = await Promise.all([
configPromise,
fetchData(session.user.id)
])
return Response.json({ data, config })
}For operations with more complex dependency chains, use `better-all` to automatically maximize parallelism (see Dependency-Based Parallelization).
More agents from other plugins.
CSharpExpert.agent
AgentAn agent designed to assist with software development tasks for .NET projects.
coder
AgentFocused coder - implements exactly the assigned subtask in its worktree
Argon
AgentGoogle cross-vendor agent named for the model it runs — Gemini 4 Argon, Google’s top reasoning model, via…
Questions about async-api-routes.
- Which coding agents can use async-api-routes?
- async-api-routes installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.

