knowledge-base
This file contains domain knowledge about the Cal.diy product and codebase. For coding…
In API routes and Server Actions, start independent operations immediately, even if you don't await them yet.
$ npx -y skills add calcom/cal.diy --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
In API routes and Server Actions, start independent operations immediately, even if you don't await them yet.
title: Prevent Waterfall Chains in API Routes impact: CRITICAL impactDescription: 2-10× improvement tags: api-routes, server-actions, waterfalls, parallelization
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).
Repo: calcom/cal.com
This file contains domain knowledge about the Cal.diy product and codebase. For coding…
The `packages/features` package should contain only framework-agnostic code: - Repositories…