deco-loader-n-plus-1-detector

Detect N+1 API call patterns in Deco storefront section loaders.

5|2|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/decocms/deco-start --skill deco-loader-n-plus-1-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deco-loader-n-plus-1-detector
Source: https://github.com/decocms/deco-start/tree/main/.cursor/skills/deco-loader-n-plus-1-detector
Command: npx skills add https://github.com/decocms/deco-start --skill deco-loader-n-plus-1-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detects and fixes N+1 API call patterns in Deco storefront section loaders to prevent slow SSR caused by per-product API calls.

Core Features & Use Cases

  • Detection: scans loaders for API calls inside map/forEach and flags N+1 anti-patterns.
  • Guidance: classifies endpoints and suggests batch or data-bridging strategies.
  • Fix Strategies: recommends strategies like reuse of existing product data, batch endpoints, caching, and lazy loading.

Quick Start

Run the detector on your Deco storefront loaders to identify and begin refactoring N+1 API patterns.

Frequently Asked Questions about deco-loader-n-plus-1-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix N+1 API calls slowing down my SSR storefront pages?

To fix N+1 API calls in SSR, scan your section loaders for map or forEach loops containing external API requests, then replace them with batch endpoints or existing data bridging to reduce server-side latency.

What is an N+1 API pattern in server-side rendering?

An N+1 API pattern in server-side rendering occurs when loaders make individual API calls for each item in a list, triggering excessive requests that degrade SSR page performance.

Can I detect N+1 query issues in VTEX or Shopify integrations?

Yes, you can detect N+1 query issues across VTEX and Shopify integrations by analyzing loaders in shelves and search results where per-product API calls are commonly executed inside iteration loops.

What's the best way to optimize per-product API requests in Deco loaders?

The best way to optimize per-product API requests in Deco loaders is to reuse existing product data, implement batch endpoints, apply caching strategies, or utilize lazy loading to minimize external calls.

Why does my Deco storefront loader cause slow SSR response times?

Your Deco storefront loader causes slow SSR response times when it executes external API calls inside iteration loops like map or forEach, creating an N+1 request bottleneck that delays page rendering.