Skip to content

secondsky/claude-skills / plugins/tanstack-query/skills/tanstack-query

tanstack-query

Verified

TanStack Query v5 (React Query) server state management. Use for data fetching, caching, mutations, or encountering v4 migration, stale data, invalidation errors.

templates/provider-setup.tsx

View on GitHub
// src/main.tsx
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { QueryClientProvider } from '@tanstack/react-query'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { queryClient } from './lib/query-client'
import App from './App'
import './index.css'

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <QueryClientProvider client={queryClient}>
      <App />
      {/* DevTools are automatically removed in production builds */}
      <ReactQueryDevtools
        initialIsOpen={false}
        buttonPosition="bottom-right"
        position="bottom"
      />
    </QueryClientProvider>
  </StrictMode>
)

/**
 * Important notes:
 *
 * 1. QueryClientProvider must wrap all components that use TanStack Query hooks
 * 2. DevTools must be inside the provider
 * 3. DevTools are tree-shaken in production (safe to leave in code)
 * 4. Only create ONE QueryClient instance for entire app (imported from query-client.ts)
 *
 * DevTools configuration options:
 * - initialIsOpen: true/false - Start open or closed
 * - buttonPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right"
 * - position: "top" | "bottom" | "left" | "right"
 * - toggleButtonProps: Custom button styles
 * - panelProps: Custom panel styles
 *
 * Example with custom styles:
 * <ReactQueryDevtools
 *   initialIsOpen={false}
 *   buttonPosition="bottom-right"
 *   toggleButtonProps={{
 *     style: { marginBottom: '4rem' }
 *   }}
 *   panelProps={{
 *     style: { height: '500px' }
 *   }}
 * />
 */
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall