/solidjs:server-componentsfrom solidjs
Rules 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.
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.
A Solid server component is a "use server" function that returns a
template; the browser receives its markup and never its code. Anything the
client contributes goes through a slot on the component's props: a
client component the client places at a position in the server's markup.
This guide is the set of rules an author — a person or an agent — needs to
write one correctly the first time. The design record is
documentation/server-components/server-components-principles.md; this
file is the operative subset.
An element lives where the data that creates it lives.
action — it works without JavaScript, and the router marks a
submission in flight (aria-busy) so CSS can show the intent.When the client confirms an optimistic entity and the server renders it, the
row becomes server markup; $key on the element reconciles the two.
import type { Slot } from "@solidjs/web/frames";
interface TodosProps {
pending: Slot; // no props
editor: Slot<{ id: string; title: string }>; // props from the server
}
A slot is placed as an element: <props.pending />,
<props.editor id={t.id} title={t.title} />. The client owns the nodes
between the slot's markers; the server's markup around them stays the
server's.
export async function todoList() {
"use server";
const todos = await db.list();
return (props: TodosProps) => (
<ul>
{todos.map(t => (
<li $key={t.id}>
{t.title}
<props.editor $key={t.id} id={t.id} title={t.title} />
</li>
))}
<props.pending />
</ul>
);
}
The client passes the fill — a component of the slot's props:
<Todos editor={p => <Editor id={p.id} title={p.title} />} pending={() => <For each={adds}>{…}</For>} />
onCleanup) lives as long as the
occurrence. A top-level read is read once, and STRICT_READ_UNTRACKED
names it ("the `editor` template-slot fill").props.status({ … })) evaluates its args eagerly in the server
component's body.$key is optional. Add it when the fill holds its own state (an edit
draft, a signal created inside) that must follow the entity across
refetches and reorders.asyncArg.
<props.status progress={asyncArg(gen.progress)} /> ships the promise or
async iterable; the fill's read settles (suspends until the first value).A handler on a server-rendered element cannot come from the server: a server function never runs in the browser. Pick one:
<form action={…}>; it works before
JavaScript and needs no client code.<props.toggle id={t.id} done={t.completed} />, rendering
the checkbox on the client).onSettled and
finds its target from the event (closest("button.copy-code")). Inside a
live hole this is the shape that keeps the hole streaming: a slot placed
inside a live hole latches it (SSR_LIVE_HOLE_LATCHED, data.cause
"records"). examples/chat's Copy button is this shape.One component can render on both sides. Put $key={props.id} on the
element it renders (morph identity) — the slot's own $key is a different
key for a different job. Do not read document/window during render;
that is the ordinary isomorphic rule.
With @solidjs/vite-plugin, solid({ ssr: true, serverFunctions: { components: true } }) is the turnkey setup (the examples under
examples/todos-server, examples/notes, examples/chat).
What SKILL.md sets; muted values are Claude Code's defaults
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]./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.Other plugins' skills for the same job