Agent skill
framework-solidjs
Specialist in SolidJS 1.8+ and SolidStart development, focusing on fine-grained reactivity, efficient DOM rendering, and modern data-fetching patterns (Solid Router/Actions).
Install this agent skill to your Project
npx add-skill https://github.com/joncrangle/.dotfiles/tree/main/dot_config/opencode/skills/framework-solidjs
SKILL.md
<skill_doc> <trigger_keywords>
Trigger Keywords
Activate this skill when the user mentions any of:
Core: SolidJS, Solid.js, createSignal, createStore, createMemo, createEffect, createResource, createAsync
Components: <Show>, <For>, <Index>, <Switch>, <Match>, <Dynamic>, <Portal>, <ErrorBoundary>
Lifecycles: onMount, onCleanup, batch, untrack
Ecosystem: SolidStart, Solid Router, Solid Primitives, Vinxi, Server Functions, "use server", createServerFn
Tooling: justfile, just, bun, bun run, biome </trigger_keywords>
⛔ Forbidden Patterns
- NO Virtual DOM Mentions: SolidJS does NOT use a VDOM. Never imply it does.
- NO React Hooks:
useState,useEffect,useMemoare forbidden. UsecreateSignal,createEffect,createMemo. - NO Prop Destructuring:
const { name } = props;breaks reactivity. Always access viaprops.nameor usesplitProps/mergeProps. - NO Early Returns in Components: Reactivity setup runs once. Early returns stop effects from being created.
- NO
array.mapfor JSX: Use<For>or<Index>for reactive lists. - NO
any: Strictly forbidden. Useunknownor proper types. - NO
@ts-ignore: Fix errors instead.
🤖 Agent Tool Strategy
- Discovery: Check for
justfilefirst. Preferjustrecipes (e.g.,just dev,just build) over rawbunornpmcommands. - Runtime: Prefer
bunovernpmoryarnfor script execution and package management. - Build: Use
bun run devorbun run buildif nojustfileexists. - Routing: Identify if
solid-routeror file-based routing (SolidStart) is used. - Type Checking: Use
bun run tsc --noEmitorjust typecheckto verify safety.
Quick Reference (30 seconds)
SolidJS Specialist - Fine-grained reactivity without a Virtual DOM.
Philosophy:
- Run Once: Components are setup functions that run once.
- Fine-Grained: Updates are surgical; only changed nodes update.
- Direct DOM: JSX compiles to real DOM nodes.
Core Primitives:
createSignal(v): Returns[get, set].get()tracks,set(v)updates.createEffect(fn): Re-runsfnwhen tracked signals change.createMemo(fn): Computed value, caches result.createStore(obj): Proxy for deep nested reactivity.createResource: Async data loading.
Tooling Preferences:
- Task Runner: Just (
justfile) - Runtime: Bun (
bun run) - Linter: Biome (recommended)
Gotchas & Best Practices
-
Destructuring Props: ❌
const MyComp = ({ title }) => <div>{title}</div>(Loses reactivity) ✅const MyComp = (props) => <div>{props.title}</div> -
Tracking Scopes: Reactivity is only tracked synchronously within a tracking scope (Effect, Memo, Render). Async callbacks lose the tracking context unless
runWithOwneris used, but usually you just read signals where you need them. -
Batching: Solid batches updates automatically in effects/event handlers. Use
batch(() => ...)for manual grouping outside those contexts.
Resources
- Examples: See
examples/examples.mdfor detailed code patterns. - References: See
references/reference.mdfor official documentation links. </skill_doc>
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
lang-javascript
This skill should be used when the user asks to "write JavaScript", "debug a Node.js/Bun app", "create a Hono server", "configure Biome", "run tests with bun test", or mentions .js/.mjs files. Covers ES2024+, Bun, and Hono patterns.
opentui
Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.
vitest
Specialist in Vitest, a blazing fast unit test framework powered by Vite. Focuses on Jest compatibility, in-source testing, and native ESM support.
PreventionPatterns
Known bug patterns and their fixes to prevent regression.
lang-typescript
This skill should be used when the user asks to "write TypeScript", "debug TypeScript", "create a SolidJS component", "configure TanStack Start", "validate data with Valibot", or mentions .ts/.tsx files. Covers TypeScript 5.9+, SolidJS, and TanStack patterns.
just-cli
This skill should be used when the user asks to "create a justfile", "write just recipes", "configure just settings", "add just modules", "use just attributes", "set up task automation", mentions justfile, just command runner, or task automation with just.
Didn't find tool you were looking for?