/solidjs:solid-startfrom solidjs
Solid bindings for TanStack Start: useServerFn hook, tanstackStart Vite plugin, StartClient, StartServer, Solid-specific setup, re-exports from @tanstack/start-client-core. Full project setup with Solid.
Ships in solidjs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
@tanstack/solid-start)This skill builds on start-core. Read @tanstack/start-client-core#start-core first for foundational concepts.
This skill covers the Solid-specific bindings, setup, and patterns for TanStack Start.
CRITICAL: All code is ISOMORPHIC by default. Loaders run on BOTH server and client. Use
createServerFnfor server-only logic.
CRITICAL: Do not confuse
@tanstack/solid-startwith SolidStart (@solidjs/start). They are completely different frameworks with different APIs.
CRITICAL: Types are FULLY INFERRED. Never cast, never annotate inferred values.
@tanstack/solid-start re-exports everything from @tanstack/start-client-core plus:
useServerFn — Solid hook for calling server functions from componentsAll core APIs (createServerFn, createMiddleware, createStart, createIsomorphicFn, createServerOnlyFn, createClientOnlyFn) are available from @tanstack/solid-start.
Server utilities (getRequest, getRequestHeader, setResponseHeader, setCookie, getCookie) are imported from @tanstack/solid-start/server.
npm i @tanstack/solid-start @tanstack/solid-router solid-js
npm i -D vite vite-plugin-solid typescript
{
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"start": "node .output/server/index.mjs"
}
}
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "solid-js",
"moduleResolution": "Bundler",
"module": "ESNext",
"target": "ES2022",
"skipLibCheck": true,
"strictNullChecks": true
}
}
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
import solidPlugin from 'vite-plugin-solid'
export default defineConfig({
plugins: [
tanstackStart(), // MUST come before solid plugin
solidPlugin({ ssr: true }),
],
})
import { createRouter } from '@tanstack/solid-router'
import { routeTree } from './routeTree.gen'
export function getRouter() {
const router = createRouter({
routeTree,
scrollRestoration: true,
})
return router
}
import {
Outlet,
createRootRoute,
HeadContent,
Scripts,
} from '@tanstack/solid-router'
import { HydrationScript } from 'solid-js/web'
import { Suspense } from 'solid-js'
export const Route = createRootRoute({
head: () => ({
meta: [
{ charSet: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ title: 'My TanStack Start App' },
],
}),
// shellComponent renders the HTML document shell (always SSR'd)
shellComponent: RootDocument,
})
function RootDocument(props: { children: any }) {
return (
<html>
<head>
<HydrationScript />
</head>
<body>
<HeadContent />
<Suspense>{props.children}</Suspense>
<Scripts />
</body>
</html>
)
}
import { createFileRoute } from '@tanstack/solid-router'
import { createServerFn } from '@tanstack/solid-start'
const getGreeting = createServerFn({ method: 'GET' }).handler(async () => {
return 'Hello from TanStack Start!'
})
export const Route = createFileRoute('/')({
loader: () => getGreeting(),
component: HomePage,
})
function HomePage() {
const greeting = Route.useLoaderData()
return <h1>{greeting()}</h1>
}
Use useServerFn to call server functions from Solid components with automatic redirect handling:
import { createServerFn, useServerFn } from '@tanstack/solid-start'
import { createSignal } from 'solid-js'
const updatePost = createServerFn({ method: 'POST' })
.validator((data: { id: string; title: string }) => data)
.handler(async ({ data }) => {
await db.posts.update(data.id, { title: data.title })
return { success: true }
})
function EditPostForm(props: { postId: string }) {
const updatePostFn = useServerFn(updatePost)
const [title, setTitle] = createSignal('')
return (
<form
onSubmit={async (e) => {
e.preventDefault()
await updatePostFn({ data: { id: props.postId, title: title() } })
}}
>
<input value={title()} onInput={(e) => setTitle(e.target.value)} />
<button type="submit">Save</button>
</form>
)
}
Unlike the React version, useServerFn does NOT wrap the returned function in any memoization (no useCallback equivalent needed — Solid's setup runs once).
All routing components from @tanstack/solid-router work in Start:
<Outlet> — renders matched child route<Link> — type-safe navigation<Navigate> — declarative redirect<HeadContent> — renders head tags via @solidjs/meta (must be in <body> — uses portals to inject into <head>)<Scripts> — renders body scripts (must be in <body>)<Await> — renders deferred data with <Suspense><ClientOnly> — renders children only after hydration<CatchBoundary> — error boundary wrapping Solid.ErrorBoundaryAll hooks from @tanstack/solid-router work in Start. Most return Accessor<T> — call the accessor to read:
useRouter() — router instance (NOT an Accessor)useRouterState() — Accessor<T>, subscribe to router stateuseNavigate() — navigation function (NOT an Accessor)useSearch({ from }) — Accessor<T>, validated search paramsuseParams({ from }) — Accessor<T>, path paramsuseLoaderData({ from }) — Accessor<T>, loader datauseMatch({ from }) — Accessor<T>, full route matchuseRouteContext({ from }) — Accessor<T>, route contextRoute.useLoaderData() — Accessor<T>, typed loader data (preferred in route files)Route.useSearch() — Accessor<T>, typed search params (preferred in route files)// WRONG — this is the SPA router, NOT Start
import { createServerFn } from '@tanstack/solid-router'
// CORRECT — server functions come from solid-start
import { createServerFn } from '@tanstack/solid-start'
// CORRECT — routing APIs come from solid-router (re-exported by Start too)
import { createFileRoute, Link } from '@tanstack/solid-router'
Most hooks return Accessor<T>. Must call to read the value.
// WRONG
const data = Route.useLoaderData()
return <h1>{data.message}</h1>
// CORRECT
const data = Route.useLoaderData()
return <h1>{data().message}</h1>
Without <Scripts /> in the root route's <body>, client JavaScript doesn't load and the app won't hydrate.
// WRONG
plugins: [solidPlugin(), tanstackStart()]
// CORRECT
plugins: [tanstackStart(), solidPlugin()]
@tanstack/start-client-core#start-core — core Start concepts@tanstack/router-core#router-core — routing fundamentals@tanstack/solid-router#solid-router — Solid Router hooks and componentsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fcakiroglu16/marketplace --plugin solidjs5 skills in this plugin
/agent-loopsVerify Solid 2.0 reactive code with evidence from @solidjs/diagnostics captureArtifact instead of reading it; generation, acceptance, attribution, responsiveness and server-render loops. Use when checking that generated or ported Solid code is quiet, within budget and re-runs only for the right reasons./reactivity-diagnosticsMap a Solid 2.0 dev diagnostic code (STRICT_READ_UNTRACKED, REACTIVE_WRITE_IN_OWNED_SCOPE, LOADING_ON_OUTSIDE_HOLD, HOT_SCOPE_*, ...) to its repair. Use when a Solid console warning, test failure or @solidjs/diagnostics artifact reports a [CODE]./server-componentsRules for writing Solid 2.0 server components ("use server" functions that return a template) and their slots with @solidjs/web. Use when writing or reviewing a server component, deciding what lives on the server versus the client, or wiring a slot./solid-routerSolid bindings for TanStack Router: RouterProvider, useRouter, useRouterState, useMatch, useMatches, useLocation, useSearch, useParams, useNavigate, useLoaderData, useLoaderDeps, useRouteContext, useBlocker, useCanGoBack, Link, Navigate, Outlet, CatchBoundary, ErrorComponent. Solid-specific patterns with Accessor<T> returns, createSignal/createMemo/createEffect, Show/Switch/Match/Dynamic, and @solidjs/meta for head management.