EffectorJS Skill
Use this skill to produce deterministic, scope-safe Effector solutions for new features, refactors, and code reviews.
Workflow
- •Classify the request:
- •
modeling: create or extend stores/events/effects. - •
refactor: replace anti-patterns with declarative flows. - •
ssr: implement or debug scope-safe SSR. - •
review: assess risks, regressions, and missing tests. - •
legacy-migration: move old patterns to modern v23+ safely.
- •Load only required references:
- •Always start with
references/core-patterns.md. - •Add
references/react-ssr-scope.mdwhen React/SSR/scope appears. - •Add
references/solid-scope.mdwhen Solid integration appears. - •Add
references/vue-scope.mdwhen Vue integration appears. - •Add
references/anti-patterns-and-fixes.mdwhen fixing or reviewing existing logic. - •Add
references/legacy-migration-map.mdwhen deprecated APIs/imports are present. - •End with
references/checklists.mdfor acceptance criteria.
- •Build solution in this order:
- •Model atomic stores and explicit events.
- •Move side effects to effects.
- •Connect units with
samplefirst; useattachfor effect composition. - •Apply scope-first rules (
fork,allSettled) for tests and SSR. - •For UI frameworks, use
useUnitand correct provider wiring.
- •Produce output contract:
- •Proposed model topology (stores/events/effects and responsibilities).
- •Wiring snippets (
sample,attach,splitif needed). - •Scope/SSR notes when applicable.
- •Test scenarios and acceptance checklist.
Defaults
- •Target Effector modern v23+.
- •Treat deprecated/legacy patterns as migration targets, not defaults.
- •Prefer minimal, explicit unit graph over clever abstractions.
Guardrails
- •Do not place business logic in
watch. - •Do not call events/effects imperatively from effect bodies when declarative wiring can express the flow.
- •Do not use
$store.getState()for business dataflow; pass state throughsamplesource. - •Do not create units dynamically at runtime.
- •Keep naming explicit (
$store,eventHappened,someFx).
Legacy Handling
If legacy code is present:
- •Keep behavior unchanged first.
- •Mark legacy section explicitly.
- •Propose modern replacement with a migration-safe diff strategy.
- •Add tests that prove parity before cleanup.