The Complete Production SOP: How to Deploy and Run SolidStart Fullstack Framework & Server Functions in Autonomous AI Agents
Production SOP to run SolidStart Fullstack Framework & Server Functions in Codex, Claude Code, and Cursor. Master server$, createAsync, and Nitro configs.
Technical Overview & Architectural Context
Modern fullstack development with SolidStart relies on fine-grained reactivity and RPC boundary abstractions via Vinxi and Nitro. Autonomous coding agents frequently stumble in this domain: they attempt to import server-only database drivers directly into isomorphic client files, misapply React-style data fetching patterns instead of Solid's fine-grained createAsync signal primitives, and fail to isolate server-side RPC closures using the `server$` macro. This results in bundle leakage, serialization runtime errors, and broken client-server hydration boundaries. The SolidStart Fullstack Framework & Server Functions skill eliminates non-deterministic guessing by injecting strict SOP guardrails into Codex, Claude Code, Cursor, and Windsurf. It explicitly constrains agent execution to use validated `server$` definitions, binds asynchronous server outputs to reactive primitives via `createAsync`, enforces automated form action invalidation via `createServerAction$`, and mandates proper Nitro output target presets within `app.config.ts`. By establishing clear permissions and deterministic validation gates, this skill guarantees reliable, production-ready fullstack SolidStart code generation.
Prerequisites & Environment Requirements
Verified Search Intents & Long-Tail Queries Solved
This operational tutorial is engineered to provide deterministic solutions for these developer search queries:
Step-by-Step Execution Playbook
Local Environment Setup & SKILL.md Mounting
Create the local skill manifest directory and inject verified procedural rules into agent runtime search paths.
Autonomous runtimes such as Claude Code, Codex, Cursor, and Windsurf parse toolsets and procedural policies from local markdown manifests. Mount the SolidStart Fullstack Framework & Server Functions skill into the local agent directory so that triggering keywords (such as 'write solidstart server function' or 'solidstart file routing') immediately activate Vinxi/Nitro procedural constraints.
mkdir -p ~/.agents/skills/solid-start-server-functions && curl -fsSL https://askills.dev/api/skills/solid-start-server-functions/raw -o ~/.agents/skills/solid-start-server-functions/SKILL.md---
name: "solid-start-server-functions"
description: "Build fullstack web applications with SolidStart, file-based routing, and RPC server functions."
metadata:
author: "SolidJS"
version: "1.0.0"
runtime_compatibility:
- "codex"
- "claude-code"
- "cursor"
- "windsurf"
triggers:
- "write solidstart server function"
- "solidstart file routing"
- "cache server function solidstart"
permissions:
fs_read: true
fs_write: "workspace"
shell_exec: false
net_access: false
---
# SolidStart Fullstack Framework & Server Functions
Configures SolidStart: file-based routing, server functions (server$ RPC), route loaders with cache(), form actions, server-side rendering (SSR), and deploying to Cloudflare Workers or Node.js.
## Execution SOP & Rules
1. Define server RPC: const getUser = server$(async (id: string) => { return await db.find(id); }).
2. Use createAsync(() => getUser(params.id)) to bind server promises to reactive client signals.
3. Handle form mutations using createServerAction$ for automatic invalidation.
4. Configure nitro presets in app.config.ts for desired deployment target (node, cloudflare, vercel).Place the SKILL.md inside workspace root `.cursor/skills/` or `.claude/skills/` to prevent cross-project context pollution and minimize baseline prompt overhead.
Ensure permissions specify fs_write: 'workspace'. Runtimes will block unauthorized writes to paths outside the active SolidStart workspace root.
Environment Secrets & Dependency Validation
Ensure required SolidStart dependencies and Nitro environmental contracts are met without committing client-exposed credentials.
SolidStart uses Nitro for backend runtime resolution. You must ensure core dependencies (`@solidjs/start`, `solid-js`, `vinxi`) are installed, and any database credentials or third-party API keys are isolated in server-only runtime contexts or prefixed for environmental safety.
pnpm add @solidjs/start solid-js vinxi && echo 'DATABASE_URL="postgres://user:secret@localhost:5432/app"' >> .env.localimport { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: process.env.NITRO_PRESET || "node-server",
prerender: {
crawlLinks: true
}
}
});Never use VITE_ prefix on database credentials; in SolidStart, un-prefixed environment variables remain server-only inside server$ closures.
Verify `.env.local` is present in `.gitignore`. Claude Code and Cursor will inspect repository trees and fail automated security gates if secrets are tracked.
Intent Matching & Trigger Invocation
Activate deterministic agent behaviors using exact trigger phrases paired with fine-grained reactivity requirements.
Provide high-intent instructions matching the skill's defined triggers. Explicitly prompt the agent to use `server$` RPC declarations wrapped with `cache()` and consumed by `createAsync()`, avoiding non-reactive Promise unrolling.
import { createAsync, type RouteSectionProps } from "@solidjs/router";
import { cache } from "@solidjs/router";
import { server$ } from "@solidjs/start/server";
import { Show, Suspense } from "solid-js";
const getUser = cache(server$(async (userId: string) => {
"use server";
// Database calls execute exclusively on the server
return { id: userId, name: `User ${userId}`, timestamp: new Date().toISOString() };
}), "users");
export const route = {
load: ({ params }) => getUser(params.id)
};
export default function UserPage(props: RouteSectionProps) {
const user = createAsync(() => getUser(props.params.id));
return (
<main class="p-6">
<Suspense fallback={<p>Loading user profile...</p>}>
<Show when={user()}>
{(u) => (
<div>
<h1 class="text-xl font-bold">{u().name}</h1>
<p class="text-sm text-gray-500">ID: {u().id}</p>
</div>
)}
</Show>
</Suspense>
</main>
);
}Always wrap `server$` functions inside `cache(..., key)` when using them for route loaders to leverage automatic client-side deduplication.
Do not pass reactive accessors (signals) directly as arguments into `server$()`; evaluate the signal in the caller and pass serializable JSON primitives.
Verification, Linting & Output Quality Gate
Execute automated compiler, type, and bundling checks before declaring fullstack tasks complete.
The agent must self-validate that the Vinxi bundler correctly extracts server code from client chunks. Running the TypeScript compiler and Nitro build ensures zero client-side import leaks and guarantees that server-side functions resolve valid RPC signatures.
pnpm tsc --noEmit && pnpm buildRun `vinxi build` in audit mode to inspect the `.output/server` and `.output/client` directories, ensuring server secrets are completely omitted from client bundles.
Be aware that server functions that return non-serializable instances (such as raw database connection handles or Map/Set without custom serializers) will fail compilation or runtime RPC serialization.
Real-World Scenario: Fullstack User Profile Mutation with Server Functions and Automatic Cache Invalidation
“Write solidstart server function to fetch user profile details and handle username update mutations using createServerAction$ with cache server function solidstart rules in src/routes/profile.tsx.”
Runtime Troubleshooting & Failure Modes
Root Cause: The agent invoked a bare server$ function without wrapping it in createAsync() or a route load function, causing execution outside Solid's synchronous SSR render tracking.
const data = createAsync(() => myServerFunction(id)); // Wrap promise in createAsync signalRoot Cause: The agent imported a Node.js built-in module directly in a file containing both client UI and server logic without isolating it within a `server$` closure or a `*.server.ts` file.
Move Node-specific imports into a dedicated `db.server.ts` module or inline the import strictly inside `server$(async () => { const fs = await import('node:fs'); })`.Frequently Asked Questions (SolidStart Fullstack Framework & Server Functions SOP)
Q:Can I use SolidStart Fullstack Framework & Server Functions across Codex, Claude Code, and Cursor simultaneously?
Yes. This skill adheres strictly to standard SKILL.md agent specifications. You can symlink or copy the skill directory into ~/.codex/skills, ~/.claude/skills, or .cursor/skills to maintain uniform fullstack code generation behavior across all supported IDEs and agent runners.
Q:How does SolidStart Fullstack Framework & Server Functions prevent context window overflow during long agent sessions?
By prescribing precise 4-step execution rules (defining RPC via server$, binding signals via createAsync, handling mutations via createServerAction$, and configuring Nitro in app.config.ts), the skill prevents the agent from entering exploratory trial-and-error loops, saving thousands of tokens per generation session.
Q:Does this skill require escalated root or container permissions?
No. The skill is audited with a Security Score of 98/100. It requires only standard workspace filesystem write access (fs_write: workspace) to generate routes and configuration files. It disables shell execution escalation and network access within the agent harness.
Ready to equip your autonomous agent with SolidStart Fullstack Framework & Server Functions?
Copy the complete audited SKILL.md specification or download the 1-click zip bundle directly from our verified registry.