Command Palette

Search for a command to run...

Назад к скиллам
скилл № 21792

frontend-solidjs-architecture

Use when the user asks about SolidJS, createSignal, createMemo, createEffect, createStore, Show/For control flow, @solidjs/router, SolidStart or SolidJS vs…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить frontend-solidjs-architecture в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

SolidJS Architecture

Purpose

Build applications with SolidJS fine-grained reactivity — no virtual DOM, compiled JSX, signals-based state management, and declarative control flow.

Agent Protocol

Trigger

Exact user phrases: "SolidJS", "SolidJS architecture", "Solid signal", "Solid component", "Solid reactivity", "SolidJS app", "Solid router", "SolidJS vs React", "SolidJS fine-grained".

Input Context

Before activating, verify:

  • package.json has solid-js dependency.
  • Whether the project uses Vite with the Solid plugin.
  • Whether @solidjs/router is installed for routing.

Output Artifact

No file output. Produces component patterns, signal/store usage, control flow examples, and routing setup as text.

Response Format

Code: show signal/component definitions. No imports. Control flow with Show/For/Switch.

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • Components use signals (createSignal) for local state.
  • Derived values use createMemo, not createEffect.
  • Deep state uses createStore with path syntax for updates.
  • Control flow uses , , , components.
  • @solidjs/router configured with lazy loading for code splitting.
  • No use of hooks rules — components run once.
  • JSX compiles to real DOM expressions, not vdom.

Max Response Length

Code: 15 lines per example. Unlimited patterns.

Component Architecture / Decision Trees

Architecture Options

Approach Trade-off When to Use
createSignal for local state Simple, per-value granularity Individual values, toggles, inputs
createStore for deep objects Path-based updates, nested tracking Forms, complex state objects
createMutable for mutable syntax Direct mutation, less boilerplate Legacy code migration, prototyping
Context + createContext Shared state via provider tree Theming, auth, i18n
Resources (createResource) Async data with Suspense API data fetching
createMemo for derived state Cached computation Computed values from signals/stores

Decision Tree: State Management

Is the state local to one component?
  ├── Is it a single value? -> createSignal
  ├── Is it a complex object? -> createStore
  └── Is it an async resource? -> createResource
  └── No (shared) -> Is it tree-scoped?
       ├── Yes -> Context + createContext
       └── No -> Module-level signal or store

Decision Tree: Control Flow

Are you conditionally showing content?
  ├── Simple if/else -> <Show>
  ├── Multiple conditions -> <Switch> + <Match>
  └── List rendering:
       ├── Array of primitives -> <Index>
       └── Array of objects -> <For> (with stable keys)

Decision Tree: Effect Strategy

What kind of side effect?
  ├── React to signal change -> createEffect with tracking
  ├── DOM mutation after render -> createEffect (DOM access safe here)
  ├── Cleanup on dispose -> onCleanup inside createEffect
  └── No tracking needed -> createRenderEffect (runs before DOM paint)

Component Design Patterns

Counter with createSignal

function Counter(props: { initial?: number }) {
  const [count, setCount] = createSignal(props.initial ?? 0)
  const doubled = createMemo(() => count() * 2)
  return (
    <div>
      <p>Count: {count()}</p>
      <p>Doubled: {doubled()}</p>
      <button onClick={() => setCount(c => c + 1)}>+</button>
      <button onClick={() => setCount(c => c - 1)}>-</button>
    </div>
  )
}

Form with createStore

function SignupForm() {
  const [form, setForm] = createStore({
    email: '', password: '', confirmPassword: '',
    errors: {} as Record<string, string>,
  })
  const [submitted, setSubmitted] = createSignal(false)

  const isValid = createMemo(() =>
    form.email.includes('@') && form.password.length >= 8
  )

  const handleSubmit = async (e: Event) => {
    e.preventDefault()
    const result = schema.safeParse({ email: form.email, password: form.password })
    if (!result.success) {
      setForm('errors', result.error.flatten().fieldErrors)
      return
    }
    await submitToApi(result.data)
    setSubmitted(true)
  }

  return (
    <form onSubmit={handleSubmit}>
      <input value={form.email} onInput={(e) => setForm('email', e.currentTarget.value)} />
      {form.errors.email && <span>{form.errors.email}</span>}
      <input type="password" value={form.password} onInput={(e) => setForm('password', e.currentTarget.value)} />
      <button type="submit" disabled={!isValid()}>Submit</button>
    </form>
  )
}

Data Fetching with createResource

function UserProfile() {
  const params = useParams()
  const [user, { mutate, refetch }] = createResource(() => params.id, fetchUser)

  return (
    <Suspense fallback={<div>Loading...</div>}>
      <Show when={user()} fallback={<div>User not found</d
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/solid-components.md
  • references/solid-reactivity.md
  • references/solidjs-component-architecture.md
  • references/solidjs-composables-primitives.md
  • references/solidjs-optimization.md
  • references/solidjs-reactivity-deep-dive.md
  • references/solidjs-reactivity.md
  • references/solidjs-signal-patterns.md

FAQ

Что делает скилл frontend-solidjs-architecture?

Use when the user asks about SolidJS, createSignal, createMemo, createEffect, createStore, Show/For control flow, @solidjs/router, SolidStart or SolidJS vs React. Produces a fine-grained reactive Solid app structure without a virtual DOM. Not for createResource, forms or animation patterns (use frontend-solidjs-patterns).

Как установить скилл frontend-solidjs-architecture?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл frontend-solidjs-architecture запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить frontend-solidjs-architecture с