data-fetching

Standardize API calls, data fetching, and error handling across fetch-based workflows, Axios, React Query, and SWR.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/jp2507-max/growbro-cultivation-app --skill data-fetching-jp2507-max
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-fetching
Source: https://github.com/jp2507-max/growbro-cultivation-app/tree/main/.github/skills/data-fetching
Command: npx skills add https://github.com/jp2507-max/growbro-cultivation-app --skill data-fetching-jp2507-max

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Data fetching in modern apps often leads to inconsistent API usage, scattered error handling, and missing offline support. This Skill provides a cohesive, battle-tested approach to network requests, data retrieval, caching, and resilience across fetch-based workflows, Axios, React Query, and SWR.

Core Features & Use Cases

  • Unified API calling patterns with a robust fetch wrapper and standardized error handling.
  • Caching, stale-while-revalidate, and offline support via React Query and SWR.
  • Auth-aware requests with token management and simple environment configuration.
  • Use Case: Build a resilient data layer for a dashboard that shows real-time data with offline support and consistent error messages.

Quick Start

Use the data-fetching skill to configure a fetch wrapper and a basic React Query setup for a sample endpoint.

Frequently Asked Questions about data-fetching

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

FAQPage Schema
How do I standardize API calls and error handling across fetch, Axios, and React Query?

Standardize API calls by implementing a unified fetch wrapper with structured error classes and retry logic. This approach enforces consistent networking patterns, centralized error recovery, and auth-aware token management across fetch-based workflows, Axios, React Query, and SWR.

What is the best way to add offline support and caching to a React data fetching layer?

Add offline support and caching by configuring React Query or SWR with stale-while-revalidate strategies. This builds a resilient data layer that serves cached data during network interruptions and automatically synchronizes real-time updates when connectivity restores.

Does this data fetching approach work with token-based authentication and environment variables?

Yes, the data fetching approach supports auth-aware requests with token management and simple environment-variable configuration. It integrates authentication seamlessly into the fetch wrapper, ensuring API calls include the correct credentials based on your environment setup.

How do I configure a fetch wrapper and basic React Query setup for a sample endpoint?

Configure a fetch wrapper and basic React Query setup by applying the skill's structured patterns to a sample endpoint. This initializes standardized network requests, applies caching strategies, and establishes baseline error recovery for your data layer.

Why does my data fetching logic fail during network interruptions without retry mechanisms?

Data fetching logic fails during network interruptions without retry mechanisms because standard fetch lacks built-in resilience. Implementing structured retry logic and error classes ensures your application automatically recovers from transient network failures and maintains consistent error messaging.