<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:
,
,
,
,
,
,
,
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: , , are forbidden. Use , , .
- NO Prop Destructuring: breaks reactivity. Always access via or use /.
- NO Early Returns in Components: Reactivity setup runs once. Early returns stop effects from being created.
- NO for JSX: Use or for reactive lists.
- NO : Strictly forbidden. Use or proper types.
- NO : Fix errors instead.
🤖 Agent Tool Strategy
- Discovery: Check for first. Prefer recipes (e.g., , ) over raw or commands.
- Runtime: Prefer over or for script execution and package management.
- Build: Use or if no exists.
- Routing: Identify if or file-based routing (SolidStart) is used.
- Type Checking: Use or to 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:
- : Returns . tracks, updates.
- : Re-runs when tracked signals change.
- : Computed value, caches result.
- : Proxy for deep nested reactivity.
- : Async data loading.
Tooling Preferences:
- Task Runner: Just ()
- Runtime: Bun ()
- 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
is used, but usually you just read signals where you need them.
-
Batching:
Solid batches updates automatically in effects/event handlers. Use
for manual grouping outside those contexts.
Resources
- Examples: See for detailed code patterns.
- References: See for official documentation links.
</skill_doc>