The web-data-fetching-swr skill equips Claude with expert-level patterns for the SWR library, focusing on the stale-while-revalidate caching lifecycle. It provides specific implementation logic for complex data scenarios, including advanced mutation workflows with optimistic UI updates, infinite scrolling, and conditional fetching. By enforcing strict best practices—such as stable key management, proper differentiation between isLoading and isValidating, and centralized global configurations—this skill ensures that Claude generates production-grade, performant, and type-safe frontend data layers.
주요 기능
01Global SWR configuration and SSR hydration strategies
02Optimistic UI updates with automatic error rollback
03Typed fetcher implementations with robust error handling
041 GitHub stars
05Infinite scroll and cursor-based pagination patterns
06Stale-while-revalidate caching and background revalidation logic