---
slug: "react-query-skills"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/umxr/react-query-skills@main/README.md"
repo: "https://github.com/umxr/react-query-skills"
source_file: "README.md"
branch: "main"
---
# 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](https://tkdodo.eu/blog).

## Installation

```bash
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](https://tkdodo.eu/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](https://skills.sh)

## 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.
