KS
Killer-Skills

react-query-hook — how to use react-query-hook how to use react-query-hook, react-query-hook setup guide, react-query-hook vs TanStack Query, react-query-hook install, what is react-query-hook, react-query-hook alternative, react-query-hook for data fetching, react-query-hook and Axios, react-query-hook for web applications

v1.0.0
GitHub

About this Skill

Ideal for Frontend Agents leveraging React and TanStack Query for efficient data fetching and state management. react-query-hook is a custom React hook generator using TanStack Query for data fetching, designed for managing project progress in web applications.

Features

Generates custom hooks using TanStack Query
Supports pre-flight checks for Axios instance config
Confirms backend controller endpoint URL and response type
Follows Learning Mode guidelines from _templates/learning-mode.md
Accepts hook name or API endpoint as arguments (e.g., useTasks, GET /projects/:id)

# Core Topics

MinhNhut05 MinhNhut05
[0]
[0]
Updated: 3/4/2026

Quality Score

Top 5%
60
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add MinhNhut05/devteam-os/react-query-hook

Agent Capability Analysis

The react-query-hook MCP Server by MinhNhut05 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use react-query-hook, react-query-hook setup guide, react-query-hook vs TanStack Query.

Ideal Agent Persona

Ideal for Frontend Agents leveraging React and TanStack Query for efficient data fetching and state management.

Core Value

Empowers agents to create custom hooks for managing project progress, utilizing Axios for API interactions and confirming endpoint URLs and response types, all while following best practices outlined in Learning Mode guidelines.

Capabilities Granted for react-query-hook MCP Server

Generating custom React hooks for data fetching
Managing project progress with TanStack Query
Confirming Axios instance configurations and backend controller endpoints

! Prerequisites & Limits

  • Requires TanStack Query and Axios setup
  • Needs access to backend controller documentation and API endpoint information
Project
SKILL.md
2.3 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Generate React Query Hook

Create a custom hook using TanStack Query for data fetching.

Important: Follow the Learning Mode guidelines in _templates/learning-mode.md

Arguments

  • $ARGUMENTS - Hook name or API endpoint (e.g., "useTasks", "GET /projects/:id")

Pre-flight (BAT BUOC)

Truoc khi tao hook, DOC:

  1. apps/web/src/services/api.ts — confirm Axios instance config
  2. Backend controller tuong ung — confirm endpoint URL + response type
  3. .context/research/PITFALLS.md > React section — TanStack Query cache stale
  4. .context/research/CONVENTIONS.md > API Response Format

Instructions

Step 1: Clarify (Query vs Mutation, parameters)

Step 2: Read backend code (KHONG SKIP) — confirm endpoint URL + data shape

Step 3: Create the hook

Query (GET):

typescript
1import { useQuery } from '@tanstack/react-query'; 2import { api } from '@/services/api'; 3 4export const use[Name] = (id: string) => { 5 return useQuery({ 6 queryKey: ['[name]', id], 7 queryFn: async () => { 8 const { data } = await api.get<[Type]>(`/[endpoint]/${id}`); 9 return data; 10 }, 11 enabled: !!id, 12 }); 13};

Mutation (POST/PATCH/DELETE):

typescript
1import { useMutation, useQueryClient } from '@tanstack/react-query'; 2import { api } from '@/services/api'; 3 4export const use[Name] = () => { 5 const queryClient = useQueryClient(); 6 return useMutation({ 7 mutationFn: async (input: [Type]) => { 8 const { data } = await api.post('/[endpoint]', input); 9 return data; 10 }, 11 onSuccess: () => { 12 queryClient.invalidateQueries({ queryKey: ['[related]'] }); 13 }, 14 }); 15};

Code Standards

  1. Naming: use[Action][Resource]useGetTasks, useCreateProject
  2. Query Keys: Array ['resource', id, params]
  3. API client: LUON dung @/services/api — KHONG tao Axios instance moi
  4. Types: Match backend DTOs — KHONG tu bia type
  5. Response: Object truc tiep (khong wrapper), list { data, total, page, limit }

Pitfalls

  • enabled: !!dependency cho dependent queries
  • invalidateQueries() sau mutation — tranh stale cache
  • Destructure dung: const { data } = await api.get(...) — data la response body

After Completion

Remind user: "Test hook trong component" + "Update PROGRESS.md!"

Related Skills

Looking for an alternative to react-query-hook or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication