data-fetching

Automate data fetching and updating from server endpoints with TanStack Query.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @tanstack/react-query, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the need for efficient and effective data fetching from servers, eliminating the complexities of traditional data fetching methods.

Core Features & Use Cases

  • Data Fetching: Utilizes TanStack Query's useQuery and useMutation hooks for fetching and updating data.
  • Query Keys: Centralizes query key definitions to avoid duplication and ensure consistency.
  • Use Case: Ideal for developers who need to fetch server data for applications, create data hooks, and manage cache invalidation.

Quick Start

Use the data-fetching skill to fetch a list of users from the server.

Frequently Asked Questions about data-fetching

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

FAQPage Schema
How do I fetch and manage server data using TanStack Query?

You can fetch and manage server data using TanStack Query by utilizing the useQuery and useMutation hooks to automate data retrieval, updates, and cache invalidation. This approach eliminates the complexities of traditional data fetching methods.

What is the best way to organize query keys for data fetching?

The best way to organize query keys for data fetching is to centralize their definitions. This prevents duplication and ensures consistency across your application when managing cache invalidation and data updates with TanStack Query.

How do I handle cache invalidation after a data mutation?

You handle cache invalidation after a data mutation by using TanStack Query's useMutation hook alongside centralized query keys. This ensures that cached server data is accurately updated or invalidated after modifications.

Do I need TanStack Query installed to use this data fetching approach?

Yes, you need TanStack Query installed as a dependency. This data fetching approach requires the @tanstack/react-query package to manage the data fetching lifecycle, including queries and mutations.

How do I create custom data hooks for fetching a list of users from the server?

You create custom data hooks for fetching users by implementing the useQuery hook from TanStack Query. This automates the data retrieval process from your server endpoints and manages the fetching lifecycle efficiently.