native-data-fetching

Implement authenticated fetch wrappers with error handling and retries for React Query or SWR workflows.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ashleytower/claude-code-workflow --skill native-data-fetching-ashleytower
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-data-fetching
Source: https://github.com/ashleytower/claude-code-workflow/tree/main/skills/native-data-fetching
Command: npx skills add https://github.com/ashleytower/claude-code-workflow --skill native-data-fetching-ashleytower

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Traditional network code is brittle and repetitive, leading to scattered error handling, insecure token storage, and inconsistent data fetching across platforms.

Core Features & Use Cases

  • Unified fetch patterns for REST and GraphQL APIs across web and mobile apps.
  • Built-in error handling, retries, and standardized API error shapes for reliability.
  • Token management and refresh flows with secure storage to keep users authenticated.
  • Offline support and React Query/SWR integration for resilient data access.
  • Environment-based configuration using EXPO_PUBLIC_* vars to adapt to dev/prod.

Quick Start

Configure your API base URL with EXPO_PUBLIC_API_URL and start by wrapping your fetch calls with the provided helper functions.

Frequently Asked Questions about native-data-fetching

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

FAQPage Schema
How do I handle API errors and retries in React Query?

API errors in React Query are handled using standardized ApiError shapes and automatic retries. This approach implements exponential backoff to manage network failures and ensure reliable data fetching without crashing the application.

What is the best way to manage authentication tokens for network requests?

Authentication tokens for network requests are managed using built-in token refresh flows and secure storage. This ensures users remain authenticated during data fetching by wrapping fetch calls with secure token management helpers.

How do I implement offline support for data fetching in mobile apps?

Offline support for data fetching is implemented by integrating React Query or SWR caching mechanisms. This allows your web and mobile apps to access resilient data locally when the network connection drops.

Can I use this data fetching approach for both REST and GraphQL APIs?

Yes, you can use this data fetching approach for both REST and GraphQL APIs. It provides unified fetch patterns that standardize network requests, error handling, and request cancellation across different API types.

How do I configure environment variables for API base URLs?

You configure API base URLs using environment-based configuration variables like EXPO_PUBLIC_API_URL. This adapts your data fetching logic to match development or production environments seamlessly.

Why does my network request fail when the user goes offline?

Network requests fail offline when offline support and caching are not configured. This Skill prevents failures by implementing resilient data access patterns and request cancellation to handle abrupt connection drops gracefully.