/fuse-tanstack-start:solid-tanstack-startfrom fuse-tanstack-start
Applies SOLID principles and clean architecture to TanStack Start projects: enforces file-size limits, type-only interfaces directory, isomorphic/server-only boundary, and modular route-based structure. Includes code templates for routes, server functions, interfaces, and hooks.
Ships in fuse-tanstack-start. 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.
Establishes the isomorphic/server-only boundary as an architectural concern: DB access, secrets, and filesystem work must sit behind createServerFn or createServerOnlyFn, never inside a bare loader.
Absolute rules include never hand-editing the generated src/routeTree.gen.ts, no module importing another feature module except cores/, no barrel exports, and no any types. Includes code templates for routes, server functions, interfaces, and hooks, and DRY guidance to grep for existing logic in src/modules/cores/ or src/lib/ before writing new code.
Do NOT use this skill for initial framework setup (use start-core), for the server/client execution-boundary deep dive itself (use start-execution-model), or for a generic React SPA that has no Start route tree (use solid-react).
SOLID and clean architecture for TanStack Start v1.169.5 projects (Vite plugin
tanstackStart(), file-based routes in src/routes/, server functions via
createServerFn). Start code is isomorphic by default — architecture must make
the server/client boundary explicit.
Before ANY implementation:
src/routes/ tree and existing modules/ to learn conventions.createServerFn wrappers.~/, @/), and data-flow patterns.Before writing ANY new code:
src/modules/cores/, src/lib/.src/modules/cores/ directly.npx jscpd ./src --threshold 3 after creating new files.Source files must not exceed FUSE_SOLID_MAX_LINES - the hook's ceiling is the only authority.
Split by responsibility when cohesion drops; see references/single-responsibility.md.
src/routeTree.gen.tsIt is generated by the tanstackStart() plugin on every dev/build run. Editing
it by hand is always wrong — the change is overwritten and route types break.
Add/rename files in src/routes/ instead and let the plugin regenerate it.
src/modules/[feature]/src/interfaces/
├── user.interface.ts
└── api.interface.ts
NEVER declare types inside a route or component file. See
references/interface-segregation.md.
/**
* Fetch a user by ID (server-only).
*
* @param data - Lookup payload with the user id
* @returns The user row, or throws notFound()
*/
export const getUser = createServerFn({ method: 'GET' })
.validator((data: { id: string }) => data)
.handler(async ({ data }) => findUserById(data.id))
createServerFnLoaders are isomorphic. DB access, secrets, and filesystem MUST sit inside a
createServerFn().handler() (or a createServerOnlyFn), never a bare loader.
See start-execution-model for the full boundary model.
references/single-responsibility.md — Load when a route/server function
grows past its limit; line budgets + split strategy for Start files.references/interface-segregation.md — Load when designing route loader
data, server-function payloads, or router context; keep them focused.references/dependency-inversion.md — Load when a server function calls a
service; depend on abstractions in interfaces/, inject implementations.See references/solid-principles.md for the overview and
references/architecture-patterns.md for the full directory layout.
Ready-to-copy code in references/templates/:
| Template | Usage |
|---|---|
route.md | createFileRoute component + loader |
server-fn.md | createServerFn with Zod validator |
interface.md | TypeScript interfaces in src/interfaces/ |
hook.md | Client hook wrapping a server function |
src/routeTree.gen.ts (generated).createServerFn).cores/).FUSE_SOLID_MAX_LINES, missing JSDoc on exports, any type.index.ts re-exports).references/architecture-patterns.md (opens in a new tab)references/dependency-inversion.md (opens in a new tab)references/interface-segregation.md (opens in a new tab)references/single-responsibility.md (opens in a new tab)references/solid-principles.md (opens in a new tab)references/templates/hook.md (opens in a new tab)references/templates/interface.md (opens in a new tab)references/templates/route.md (opens in a new tab)references/templates/server-fn.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/start-authUse when adding auth to a TanStack Start app — route protection, server-function authorization, sessions, CSRF. Do NOT use for generic route guards./start-coreUse when scaffolding a TanStack Start project, wiring the build tool, or debugging setup (blank page, hydration, no client JS)./start-deploymentUse when building or deploying a TanStack Start app — Cloudflare, Netlify, Vercel/Node/Bun, prerendering, or env vars. Do NOT use for app logic or generic Vite config./start-execution-modelUse when deciding where TanStack Start code runs, fixing secret leaks, DB-in-loader bugs, or hydration mismatches./start-middlewareUse when composing cross-cutting server logic in TanStack Start with createMiddleware — chaining, context, auth factories./start-routing-dataUse when loading data in Start routes — isomorphic loaders, TanStack Query in a loader, mutations, or per-route SSR. Do NOT use for generic Router/Query API.npx claudepluginhub fusengine/claude-plugins --plugin fuse-tanstack-startOther plugins' skills for the same job