home / skills / joncrangle / .dotfiles / tanstack-solid
This skill helps you build type-safe, reactive Solid apps with TanStack Start, Query, Router, Table, and Form patterns.
npx playbooks add skill joncrangle/.dotfiles --skill tanstack-solidReview the files below or copy the command above to add this skill to your agents.
---
name: tanstack-solid
description: Specialist in the TanStack ecosystem for SolidJS, including TanStack Start, Query, Router, Table, and Form. Focuses on Solid-specific reactivity patterns.
---
<skill_doc>
<trigger_keywords>
## Trigger Keywords
Activate this skill when the user mentions any of:
**Meta-Framework**: TanStack Start, TanStack Start Solid, Server Functions, createServerFn
**Libraries**: @tanstack/solid-query, @tanstack/solid-router, @tanstack/solid-table, @tanstack/solid-form
**Concepts**: createQuery, createMutation, createRouter, createSolidTable, createForm
</trigger_keywords>
## â›” Forbidden Patterns
1. **NO Destructuring Query Results**: `const { data } = createQuery(...)` breaks reactivity. Always use `query.data`.
2. **NO Static Options Objects**: Passing a static object to `createQuery` prevents updates when dependencies change. Pass a function: `createQuery(() => ({ ... }))`.
3. **NO React Patterns**: Do not use `useQuery` or `useEffect`. Use `createQuery` and `createEffect`.
4. **NO Direct Prop Access in Options**: If using props in options, access them inside the getter function: `() => props.id`.
5. **NO Manual Refetching Loop**: Do not use `setInterval` to refetch. Use `refetchInterval` in Query options.
## 🤖 Agent Tool Strategy
1. **Reactivity Check**: Verify that all options objects passed to TanStack creators are wrapped in functions (e.g., `() => ({ ... })`) if they depend on signals/props.
2. **Server Functions**: For TanStack Start, use `createServerFn` for backend logic instead of API routes where possible.
3. **Type Safety**: Prioritize the type-safe routing features of TanStack Router (file-based routing, `createFileRoute`).
## Quick Reference (30 seconds)
TanStack Solid Specialist - Type-safe, Headless, Reactive.
**Core Philosophy**:
- **Solid Adapter**: All libraries use Solid's fine-grained reactivity.
- **Getters are King**: Options must be getters to track dependencies.
- **Type Safety**: End-to-end type safety from router to server functions.
**Key Libraries**:
- **Start**: Full-stack meta-framework.
- **Query**: Async state management (`createResource` alternative).
- **Router**: Type-safe routing.
- **Table**: Headless data tables.
- **Form**: Headless form state management.
---
## Resources
- **Examples**: See `examples/examples.md` for detailed code patterns.
- **References**: See `references/reference.md` for official documentation links.
</skill_doc>
This skill specializes in the TanStack ecosystem for SolidJS, covering TanStack Start, Query, Router, Table, and Form with a focus on Solid-specific reactivity patterns. It helps you build type-safe, headless, and reactive UI and full-stack flows using Solid's fine-grained signals and getters. The guidance centers on correct option usage, server functions, and avoiding common reactivity pitfalls.
I inspect code for Solid-compatible TanStack patterns and flag anti-patterns that break reactivity, such as static option objects or destructured query results. I enforce wrapping options in getters, recommend createServerFn for server-side logic, and favor TanStack Router's type-safe routing. I also validate that Query/Table/Form/Router creators receive functions when they depend on signals or props.
Why must options be getters?
Getters allow Solid to track dependencies. Static option objects prevent updates when dependent signals or props change.
Can I destructure createQuery results?
No. Destructuring (const { data } = query) breaks fine-grained reactivity. Always reference query.data.