evo-nextjs-api-optimization
SkillDev toolsIdentifies and fixes performance anti-patterns in Next.js API routes including artificial delays, N+1 sequential fetch patterns, missing caching headers, and unnecessary data processing.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the evo-nextjs-api-optimization skill
What this skill tells your AI
The instructions your AI receives, as published by openlair/openskill in tasks-evolved/react-performance-debugging/environment/skills/evo-nextjs-api-optimization/SKILL.md and read by ahel’s review.
Optimizes Next.js API routes by:
- Removing artificial delays (setTimeout in production)
- Parallelizing sequential awaits with Promise.all
- Adding caching headers (Cache-Control)
- Optimizing data fetching patterns
Key Patterns
Sequential Awaits → Promise.all
Anti-pattern:
const user = await fetchUser();
const products = await fetchProducts();
const reviews = await fetchReviews();
Fix:
const [user, products, reviews] = await Promise.all([
fetchUser(),
fetchProducts(),
fetchReviews(),
]);
Artificial Delays
Remove await new Promise(resolve => setTimeout(...)) from production routes.
Cache-Control Headers
Add appropriate Cache-Control headers to API responses.
Usage
import sys
sys.path.insert(0, '/app/environment/skills/evo-nextjs-api-optimization/scripts')
from utils import find_sequential_awaits, fix_sequential_awaits, find_artificial_delays, apply_api_fixes
# Analyze a file
issues = find_sequential_awaits('/app/src/app/page.tsx')
# Apply fixes
apply_api_fixes('/app/src/app/page.tsx')
Signals
- GitHub stars
- 89
- Forks
- 4
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
evo-nextjs-api-optimization- Source
- github.com/openlair/openskill