tanstack-devtools
Centralized, extensible devtools panel for TanStack libraries with a plugin architecture.
What this skill does
## Overview
TanStack Devtools provides a unified debugging interface that consolidates devtools for TanStack Query, Router, and other libraries into a single panel. It features a framework-agnostic plugin architecture, real-time state inspection, and support for custom plugins. Built with Solid.js for lightweight performance.
**React:** `@tanstack/react-devtools`
**Core:** `@tanstack/devtools`
**Status:** Alpha
## Installation
```bash
npm install @tanstack/react-devtools
```
## Basic Setup
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
const queryClient = new QueryClient()
function App() {
return (
<QueryClientProvider client={queryClient}>
<TanStackDevtools />
{/* Your app content */}
<MyApp />
</QueryClientProvider>
)
}
```
## Built-in Plugins
### Query Devtools
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
function App() {
return (
<QueryClientProvider client={queryClient}>
<TanStackDevtools
plugins={[
{
id: 'react-query',
name: 'React Query',
render: () => <ReactQueryDevtoolsPanel />,
},
]}
/>
<MyApp />
</QueryClientProvider>
)
}
```
### Router Devtools
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
function App() {
return (
<TanStackDevtools
plugins={[
{
id: 'router',
name: 'Router',
render: () => <TanStackRouterDevtoolsPanel router={router} />,
},
]}
/>
)
}
```
### Combined Setup
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools'
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools'
function App() {
return (
<QueryClientProvider client={queryClient}>
<TanStackDevtools
plugins={[
{
id: 'react-query',
name: 'React Query',
render: () => <ReactQueryDevtoolsPanel />,
},
{
id: 'router',
name: 'Router',
render: () => <TanStackRouterDevtoolsPanel router={router} />,
},
]}
/>
<MyApp />
</QueryClientProvider>
)
}
```
### AI Devtools
For debugging TanStack AI workflows:
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { AIDevtoolsPanel } from '@tanstack/ai-react/devtools'
function App() {
return (
<TanStackDevtools
plugins={[
{
id: 'ai',
name: 'AI',
render: () => <AIDevtoolsPanel />,
},
]}
/>
)
}
```
AI Devtools features:
- **Message Inspector** - View full conversation history with metadata
- **Token Usage** - Track input/output tokens and costs per request
- **Streaming Visualization** - Real-time view of streaming chunks
- **Tool Call Debugging** - Inspect tool calls, parameters, and results
- **Thinking/Reasoning Viewer** - Debug reasoning tokens from thinking models
- **Adapter Switching** - Test different providers in development
## Plugin System
### Plugin Interface
```typescript
interface DevtoolsPlugin {
id: string // Unique identifier
name: string // Display name in the devtools panel
render: () => JSX.Element // React component to render
}
```
### Custom Plugins
```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
// Custom state inspector plugin
const stateInspectorPlugin = {
id: 'state-inspector',
name: 'State',
render: () => (
<div style={{ padding: '16px' }}>
<h3>Application State</h3>
<pre>{JSON.stringify(appState, null, 2)}</pre>
</div>
),
}
// Custom network logger plugin
const networkLoggerPlugin = {
id: 'network-logger',
name: 'Network',
render: () => <NetworkLoggerPanel />,
}
function App() {
return (
<TanStackDevtools
plugins={[
stateInspectorPlugin,
networkLoggerPlugin,
]}
/>
)
}
```
### Dynamic Plugin Registration
```tsx
function App() {
const [plugins, setPlugins] = useState<DevtoolsPlugin[]>([])
useEffect(() => {
// Register plugins conditionally
const activePlugins: DevtoolsPlugin[] = []
if (process.env.NODE_ENV === 'development') {
activePlugins.push({
id: 'debug',
name: 'Debug',
render: () => <DebugPanel />,
})
}
setPlugins(activePlugins)
}, [])
return <TanStackDevtools plugins={plugins} />
}
```
## Vite Plugin Integration
```typescript
// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackDevtools } from '@tanstack/devtools/vite'
export default defineConfig({
plugins: [
tanstackDevtools(),
],
})
```
## Production Considerations
```tsx
// Only include devtools in development
function App() {
return (
<>
{process.env.NODE_ENV === 'development' && (
<TanStackDevtools plugins={plugins} />
)}
<MyApp />
</>
)
}
// Or use lazy loading
const TanStackDevtools = lazy(() =>
import('@tanstack/react-devtools').then((m) => ({ default: m.TanStackDevtools }))
)
```
## Framework Support
| Framework | Package | Status |
|-----------|---------|--------|
| React | `@tanstack/react-devtools` | Alpha |
| Solid | `@tanstack/solid-devtools` | Planned |
| Vue | `@tanstack/vue-devtools` | Planned |
| Angular | `@tanstack/angular-devtools` | Planned |
## Features
- **Unified Panel** - Single interface for all TanStack debugging
- **Real-time Updates** - Live monitoring of state changes
- **Plugin Architecture** - Extensible with custom and third-party plugins
- **Built-in Plugins** - Query, Router, and AI devtools panels
- **Lightweight** - Built with Solid.js for minimal overhead
- **Type-safe** - Full TypeScript support for plugin definitions
- **Framework-agnostic Core** - Plugin logic works across frameworks
## Best Practices
1. **Conditionally include in production** - use environment checks or code splitting
2. **Use specific plugins** rather than loading all available ones
3. **Give plugins unique IDs** to prevent conflicts
4. **Keep plugin render functions lightweight** - avoid expensive computations
5. **Use the Vite plugin** for automatic setup in Vite-based projects
6. **Combine Query + Router + AI plugins** for full-stack TanStack debugging
7. **Create domain-specific plugins** for app-level state inspection
8. **Use AI devtools** when debugging streaming, tool calls, or token usage
## Common Pitfalls
- Including devtools in production builds without tree-shaking
- Using duplicate plugin IDs (causes rendering conflicts)
- Heavy render functions in plugins (slows down the devtools panel)
- Forgetting to wrap with QueryClientProvider when using Query plugin
- Not passing the router instance to Router devtools panel
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.