devtools-framework-adapters

Use devtools-utils factory functions to create per-framework plugin adapters. createReactPlugin/createSolidPlugin/createVuePlugin/createPreactPlugin, createReactPanel/createSolidPanel/createVuePanel/createPreactPanel. [Plugin, NoOpPlugin] tuple for tree-shaking. DevtoolsPanelProps (theme). Vue uses (name, component) not options object. Solid render must be function.

443 stars

Best use case

devtools-framework-adapters is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use devtools-utils factory functions to create per-framework plugin adapters. createReactPlugin/createSolidPlugin/createVuePlugin/createPreactPlugin, createReactPanel/createSolidPanel/createVuePanel/createPreactPanel. [Plugin, NoOpPlugin] tuple for tree-shaking. DevtoolsPanelProps (theme). Vue uses (name, component) not options object. Solid render must be function.

Teams using devtools-framework-adapters should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/devtools-framework-adapters/SKILL.md --create-dirs "https://raw.githubusercontent.com/TanStack/devtools/main/packages/devtools-utils/skills/devtools-framework-adapters/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/devtools-framework-adapters/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How devtools-framework-adapters Compares

Feature / Agentdevtools-framework-adaptersStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use devtools-utils factory functions to create per-framework plugin adapters. createReactPlugin/createSolidPlugin/createVuePlugin/createPreactPlugin, createReactPanel/createSolidPanel/createVuePanel/createPreactPanel. [Plugin, NoOpPlugin] tuple for tree-shaking. DevtoolsPanelProps (theme). Vue uses (name, component) not options object. Solid render must be function.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

Use `@tanstack/devtools-utils` factory functions to create per-framework devtools plugin adapters. Each framework has a subpath export (`/react`, `/vue`, `/solid`, `/preact`) with two factories:

1. **`createXPlugin`** -- wraps a component into a `[Plugin, NoOpPlugin]` tuple for tree-shaking.
2. **`createXPanel`** -- wraps a class-based devtools core (`mount`/`unmount`) into a `[Panel, NoOpPanel]` component tuple.

## Key Source Files

- `packages/devtools-utils/src/react/plugin.tsx` -- createReactPlugin
- `packages/devtools-utils/src/react/panel.tsx` -- createReactPanel, DevtoolsPanelProps
- `packages/devtools-utils/src/vue/plugin.ts` -- createVuePlugin (different API)
- `packages/devtools-utils/src/vue/panel.ts` -- createVuePanel, DevtoolsPanelProps (includes 'system' theme)
- `packages/devtools-utils/src/solid/plugin.tsx` -- createSolidPlugin
- `packages/devtools-utils/src/solid/panel.tsx` -- createSolidPanel
- `packages/devtools-utils/src/solid/class.ts` -- constructCoreClass (Solid-specific)
- `packages/devtools-utils/src/preact/plugin.tsx` -- createPreactPlugin
- `packages/devtools-utils/src/preact/panel.tsx` -- createPreactPanel

## Shared Pattern

All four frameworks follow the same two-factory pattern:

### Plugin Factory

Every `createXPlugin` returns `readonly [Plugin, NoOpPlugin]`:

- **Plugin** -- returns a plugin object with metadata and a `render` function that renders your component.
- **NoOpPlugin** -- returns a plugin object with the same metadata but renders an empty fragment.

### Panel Factory

Every `createXPanel` returns `readonly [Panel, NoOpPanel]`:

- **Panel** -- a framework component that creates a `<div style="height:100%">`, instantiates the core class, calls `core.mount(el, theme)` on mount, and `core.unmount()` on cleanup.
- **NoOpPanel** -- renders an empty fragment.

### DevtoolsPanelProps

```ts
// React, Solid, Preact
interface DevtoolsPanelProps {
  theme?: 'light' | 'dark'
}

// Vue (note: includes 'system')
interface DevtoolsPanelProps {
  theme?: 'dark' | 'light' | 'system'
}
```

Import from the framework subpath:

```ts
import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/react'
import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/vue'
import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/solid'
import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/preact'
```

## Primary Example (React)

```tsx
import { createReactPlugin } from '@tanstack/devtools-utils/react'

function MyStorePanel({ theme }: { theme?: 'light' | 'dark' }) {
  return <div className={theme}>My Store Devtools</div>
}

const [MyPlugin, NoOpPlugin] = createReactPlugin({
  name: 'My Store',
  id: 'my-store',
  defaultOpen: false,
  Component: MyStorePanel,
})

// Tree-shaking: use NoOp in production
const ActivePlugin =
  process.env.NODE_ENV === 'development' ? MyPlugin : NoOpPlugin
```

### With Class-Based Panel

```tsx
import {
  createReactPanel,
  createReactPlugin,
} from '@tanstack/devtools-utils/react'

class MyDevtoolsCore {
  mount(el: HTMLElement, theme: 'light' | 'dark') {
    /* render into el */
  }
  unmount() {
    /* cleanup */
  }
}

const [MyPanel, NoOpPanel] = createReactPanel(MyDevtoolsCore)

const [MyPlugin, NoOpPlugin] = createReactPlugin({
  name: 'My Store',
  Component: MyPanel,
})
```

## Framework API Differences

### React & Preact -- Options Object

```ts
createReactPlugin({ name, id?, defaultOpen?, Component })  // => [Plugin, NoOpPlugin]
createPreactPlugin({ name, id?, defaultOpen?, Component }) // => [Plugin, NoOpPlugin]
```

- `Component` receives `DevtoolsPanelProps` (with `theme`).
- `Plugin()` returns `{ name, id?, defaultOpen?, render(el, theme) }`.
- Preact is identical to React but uses Preact JSX types and `preact/hooks`.

### Vue -- Positional Arguments, NOT Options Object

```ts
createVuePlugin(name: string, component: DefineComponent) // => [Plugin, NoOpPlugin]
```

- Takes `(name, component)` as separate arguments, NOT an options object.
- `Plugin(props)` returns `{ name, component, props }` -- it passes props through.
- `NoOpPlugin(props)` returns `{ name, component: Fragment, props }`.
- Vue's `DevtoolsPanelProps.theme` also accepts `'system'`.

### Solid -- Same API as React, Different Internals

```ts
createSolidPlugin({ name, id?, defaultOpen?, Component }) // => [Plugin, NoOpPlugin]
```

- Same options-object API as React.
- `Component` must be a Solid component function `(props: DevtoolsPanelProps) => JSX.Element`.
- The render function internally returns `<Component theme={theme} />` -- Solid handles reactivity.
- Solid also exports `constructCoreClass` from `@tanstack/devtools-utils/solid/class` for building lazy-loaded devtools cores.

## Common Mistakes

### CRITICAL: Using React JSX Pattern in Vue Adapter

Vue uses positional `(name, component)` arguments, NOT an options object.

```ts
// WRONG -- will fail at compile time or produce garbage at runtime
const [MyPlugin, NoOpPlugin] = createVuePlugin({
  name: 'My Plugin',
  Component: MyPanel,
})

// CORRECT
const [MyPlugin, NoOpPlugin] = createVuePlugin('My Plugin', MyPanel)
```

Vue plugins also work differently at call time -- you pass props:

```ts
// WRONG -- calling Plugin() with no args (React pattern)
const plugin = MyPlugin()

// CORRECT -- Vue Plugin takes props
const plugin = MyPlugin({ theme: 'dark' })
```

### CRITICAL: Solid Render Prop Not Wrapped in Function

When using Solid components, `Component` must be a function reference, not raw JSX.

```tsx
// WRONG -- evaluates immediately, breaks Solid reactivity
createSolidPlugin({
  name: 'My Store',
  Component: <MyPanel />, // This is JSX.Element, not a component function
})

// CORRECT -- pass the component function itself
createSolidPlugin({
  name: 'My Store',
  Component: (props) => <MyPanel theme={props.theme} />,
})

// ALSO CORRECT -- pass the component reference directly
createSolidPlugin({
  name: 'My Store',
  Component: MyPanel,
})
```

### HIGH: Ignoring NoOp Variant for Production

The factory returns `[Plugin, NoOpPlugin]`. Both must be destructured and used for proper tree-shaking.

```tsx
// WRONG -- NoOp variant discarded, devtools code ships to production
const [MyPlugin] = createReactPlugin({ name: 'Store', Component: MyPanel })

// CORRECT -- conditionally use NoOp in production
const [MyPlugin, NoOpPlugin] = createReactPlugin({
  name: 'Store',
  Component: MyPanel,
})
const ActivePlugin =
  process.env.NODE_ENV === 'development' ? MyPlugin : NoOpPlugin
```

### MEDIUM: Not Passing Theme Prop to Panel Component

`DevtoolsPanelProps` includes `theme`. The devtools shell passes it so panels can match light/dark mode. If your component ignores it, the panel will not adapt to theme changes.

```tsx
// WRONG -- theme is ignored
const Component = () => <div>My Panel</div>

// CORRECT -- use theme for styling
const Component = ({ theme }: DevtoolsPanelProps) => (
  <div className={theme === 'dark' ? 'dark-mode' : 'light-mode'}>My Panel</div>
)
```

## Design Tension

The core architecture is framework-agnostic, but each framework has different idioms:

- React/Preact use an options object with `Component` as a JSX function component.
- Vue uses positional arguments with a `DefineComponent` and passes props through.
- Solid uses the same options API as React but with Solid's JSX and reactivity model.

Agents trained on React patterns will get Vue wrong. Always check the import path to determine which factory API to use.

## Cross-References

- **devtools-plugin-panel** -- Build your panel component first, then wrap it with the appropriate framework adapter.
- **devtools-production** -- NoOp variants are the primary mechanism for stripping devtools from production bundles.

## Reference Files

- `references/react.md` -- Full React factory API and examples
- `references/vue.md` -- Full Vue factory API and examples (different from React)
- `references/solid.md` -- Full Solid factory API and examples
- `references/preact.md` -- Full Preact factory API and examples

Related Skills

devtools-instrumentation

443
from TanStack/devtools

Analyze library codebase for critical architecture and debugging points, add strategic event emissions. Identify middleware boundaries, state transitions, lifecycle hooks. Consolidate events (1 not 15), debounce high-frequency updates, DRY shared payload fields, guard emit() for production. Transparent server/client event bridging.

devtools-event-client

443
from TanStack/devtools

Create typed EventClient for a library. Define event maps with typed payloads, pluginId auto-prepend namespacing, emit()/on()/onAll()/onAllPluginEvents() API. Connection lifecycle (5 retries, 300ms), event queuing, enabled/disabled state, SSR fallbacks, singleton pattern. Unique pluginId requirement to avoid event collisions.

devtools-bidirectional

443
from TanStack/devtools

Two-way event patterns between devtools panel and application. App-to-devtools observation, devtools-to-app commands, time-travel debugging with snapshots and revert. structuredClone for snapshot safety, distinct event suffixes for observation vs commands, serializable payloads only.

devtools-production

443
from TanStack/devtools

Handle devtools in production vs development. removeDevtoolsOnBuild, devDependency vs regular dependency, conditional imports, NoOp plugin variants for tree-shaking, non-Vite production exclusion patterns.

devtools-plugin-panel

443
from TanStack/devtools

Build devtools panel components that display emitted event data. Listen via EventClient.on(), handle theme (light/dark), use @tanstack/devtools-ui components. Plugin registration (name, render, id, defaultOpen), lifecycle (mount, activate, destroy), max 3 active plugins. Two paths: Solid.js core with devtools-ui for multi-framework support, or framework-specific panels.

devtools-marketplace

443
from TanStack/devtools

Publish plugin to npm and submit to TanStack Devtools Marketplace. PluginMetadata registry format, plugin-registry.ts, pluginImport (importName, type), requires (packageName, minVersion), framework tagging, multi-framework submissions, featured plugins.

devtools-app-setup

443
from TanStack/devtools

Install TanStack Devtools, pick framework adapter (React/Vue/Solid/Preact), register plugins via plugins prop, configure shell (position, hotkeys, theme, hideUntilHover, requireUrlFlag, eventBusConfig). TanStackDevtools component, defaultOpen, localStorage persistence.

devtools-vite-plugin

443
from TanStack/devtools

Configure @tanstack/devtools-vite for source inspection (data-tsd-source, inspectHotkey, ignore patterns), console piping (client-to-server, server-to-client, levels), enhanced logging, server event bus (port, host, HTTPS), production stripping (removeDevtoolsOnBuild), editor integration (launch-editor, custom editor.open). Must be FIRST plugin in Vite config. Vite ^6 || ^7 only.

metasploit-framework

31392
from sickn33/antigravity-awesome-skills

⚠️ AUTHORIZED USE ONLY > This skill is for educational purposes or authorized security assessments only. > You must have explicit, written permission from the system owner before using this tool. > Misuse of this tool is illegal and strictly prohibited.

Security AuditingClaude

framework-migration-legacy-modernize

31392
from sickn33/antigravity-awesome-skills

Orchestrate a comprehensive legacy system modernization using the strangler fig pattern, enabling gradual replacement of outdated components while maintaining continuous business operations through ex

framework-migration-deps-upgrade

31392
from sickn33/antigravity-awesome-skills

You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa

Software DevelopmentClaude

framework-migration-code-migrate

31392
from sickn33/antigravity-awesome-skills

You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and

Code MigrationClaude