react-query-skills

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

React Query Skills

Note: This is a community-maintained skill. If/when the TanStack team releases an official skill, we recommend switching to theirs for the most up-to-date and authoritative guidance.

Agent skills for TanStack Query (React Query) best practices, based on TkDodo's authoritative blog posts.

Installation

npx skills add umxr/react-query-skills

What's Included

react-query

Comprehensive TanStack Query guidance covering:

  • Core Mental Model - Understanding React Query as an async state manager
  • Query Keys - Structuring keys, factories, and dependency management
  • Status Handling - Data-first patterns, error boundaries, loading states
  • Mutations - Invalidation, optimistic updates, cache synchronization
  • TypeScript - Type inference, queryOptions, type-safe factories
  • Cache Management - placeholderData vs initialData, seeding strategies
  • Error Handling - Global callbacks, granular throwOnError, fetch API gotchas
  • Render Optimization - Tracked queries, selectors, structural sharing
  • Testing - Setup patterns, MSW integration, async assertions
  • Advanced Patterns - WebSockets, React Router integration, infinite queries

Source

All content is derived from TkDodo's blog, the authoritative resource for TanStack Query best practices. TkDodo (Dominik Dorfmeister) is a core maintainer of TanStack Query.

Key articles referenced:

  • Practical React Query (foundational series)
  • Thinking in React Query
  • Effective React Query Keys
  • Mastering Mutations in React Query
  • React Query and TypeScript
  • The Query Options API
  • And 30+ more specialized articles

Supported Agents

  • Claude Code
  • Cursor
  • Windsurf
  • GitHub Copilot
  • And other agents supporting the Agent Skills format

License

MIT

Contributing

Contributions welcome! Please ensure any additions align with TkDodo's blog content and official TanStack Query documentation.

Disclaimer

This is a community-maintained skill. If the TanStack team creates an official skill, we recommend using theirs instead.