jyjeanne/ai-setup-forge/api-data-fetching-tanstack

Claude Code and agent skill by jyjeanne/ai-setup-forge

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

To handle server state (fetching, caching, synchronizing, and updating) in React applications, replacing manual useEffect fetching logic. Use when: Fetching data from REST or GraphQL APIs; When you need caching, deduplication, background updates, or optimistic UI.

Install

npx vskill@latest install jyjeanne/ai-setup-forge/api-data-fetching-tanstack

SKILL.md

The same SKILL.md was published earlier as jyjeanne/ai-setup-forge/api-data-fetching-tanstack.

Purpose

To handle server state (fetching, caching, synchronizing, and updating) in React applications, replacing manual useEffect fetching logic.

When to Use

  • Fetching data from REST or GraphQL APIs.
  • When you need caching, deduplication, background updates, or optimistic UI.

Procedure

  1. Setup Provider: Wrap app in QueryClientProvider.
  2. Create Query: Use useQuery.
  • Key: Unique array ['todos', { status }].
  • Fetcher: Async function returning data.
  • const { data, isLoading, error } = useQuery({ queryKey: [...], queryFn: fetchTodos }).
  1. Create Mutation: Use useMutation for POST/PUT/DELETE.
  • const mutation = useMutation({ mutationFn: addTodo }).
  1. Invalidate: On mutation success, invalidate query to refetch fresh data: queryClient.invalidateQueries({ queryKey: ['todos'] }).

Constraints

  • Define query keys consistently.
  • Handle loading and error states explicitly in the UI.
  • Do not use for local synchronous state (use useState or Redux).

Expected Output

A data-fetching layer that automatically handles loading states, caching, and re-validation, reducing boilerplate significantly.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jyjeanne/ai-setup-forge/api-data-fetching-tanstack/badge)](https://verified-skill.com/skills/jyjeanne/ai-setup-forge/api-data-fetching-tanstack)

Something wrong with this skill or its page? Tell us.