Agent skill
solid-reactivity-safety
Solid reactivity safety: never destructure signals/stores/props, use getters and splitProps, keep render pure, use stable keys, and use children()/mergeProps for safe access.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/solid-reactivity-safety
Metadata
Additional technical details for this skill
- globs
-
[ "src/**/*" ]
SKILL.md
Solid Reactivity Safety
Signals
- Do not destructure signals; always use getters.
- ✅
const [count, setCount] = createSignal(0); count(); - ❌
const { count } = createSignal();
- ✅
- Keep render bodies pure: no side effects, no non-deterministic values (random/time) in JSX.
- Read signals inside reactive scopes (
createEffect,createMemo) when you need derived values.
Stores & Props
- Avoid destructuring reactive props/stores; access properties directly or with
splitProps.- ✅
const [local, others] = splitProps(props, ["title"]); - ✅
store.user.name(fine-grained) - ❌
const { user } = store;
- ✅
- Use
mergePropsfor defaults instead of spreading reactive objects into JSX. - Use
children()helper when accessingprops.childrenmultiple times or outside tracking; direct access is fine for a single pass.
Derived Values
- Use
createMemofor computed values; avoid recomputing in render. - Don’t read signals in non-reactive closures that won’t rerun; wrap in
createEffect/createMemo.
Lists & Keys
- Use stable keys in
<For>; prefer IDs, not array index or random. - If data can reorder, never use
indexas key.
Client-only & Guards
- Guard browser-only APIs with
if (!isServer)ortypeof window !== "undefined"before use. - Use
onMountfor browser-only initialization.
Quick Anti-Patterns to Avoid
- Destructuring signals/stores/props.
- Spreading reactive objects into JSX without care.
- Side effects in render bodies.
- Unstable IDs/keys or
Math.random()in render.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?