atom-reactivity-specialist
Skill78 starsChanged 8 days agoApache-2.0View on GitHub
Specialist skill for Effect Atom + Reactivity frontend state management. Use when building React components, managing client/server state, creating atoms, wiring frontend services via Atom.runtime, replacing React hooks, implementing mutations with reactivity key invalidation, or reviewing frontend code for Atom compliance. Covers effect/reactivity and @effect/atom-react.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- explorations/AGENTS.mdAGENTS.md
- adhdSkill
- browser-qa-loopSkill
- closeoutSkill
- codex-findingsSkill
- crispenSkill
- effect-first-developmentSkill
- exploreSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- jsdoc-annotation-specialistSkill
- motion-evidence-reviewSkill
- onepassword-secret-refsSkill
- ontology-architectSkill
- ontology-conceptualizerSkill
- ontology-curatorSkill
- ontology-foundational-auditorSkill
- ontology-mapperSkill
- ontology-requirementsSkill
- ontology-scoutSkill
- ontology-validatorSkill
- operator-handoffSkill
- orchestrateSkill
- plasma-sensitive-entrySkill
- portlessSkill
- qa-session-opsSkill
- quality-review-fix-loopSkill
- reflectSkill
- remote-development-agentsSkill
- schema-first-developmentSkill
- shadcnSkill
- sparql-expertSkill
- teachSkill
- turborepoSkill
- unslopSkill
- yeetSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use this skill for all frontend state management in this repository.
- Distinctive: line 19
If there is any conflict with this skill, repository laws win.
- Very specific: line 49
All state through Atom.make, Atom.readable, Atom.writable, runtime.atom(), or runtime.fn().
- Very specific: line 58
Never call Effect.runSync / Effect.runPromise / Effect.runFork in component code.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Atom + Reactivity Specialist
Use this skill for all frontend state management in this repository. React hooks are banned in new code. All state flows through Effect Atom. If there is any conflict with this skill, repository laws win.
When to Activate
- Adding or modifying React components that manage state
- Creating atoms for client, server, URL, or persisted state
- Wiring frontend services via
Atom.runtimeandLayer - Implementing mutations with reactivity key invalidation
- Replacing legacy
useState,useEffect,useCallback,useMemocode - Reviewing frontend code for Atom compliance
- Working with
AsyncResultlifecycle rendering orAtomRpcclients
Non-Negotiable Laws
Banned React Hooks
| Banned Hook | Replacement |
React.useState | Atom.make(value) or useAtom(writableAtom) |
React.useEffect (for subscriptions) | useAtomSubscribe(atom, fn) |
React.useEffect (for data fetching) | runtime.atom(effect) + useAtomValue |
React.useCallback | Define atom or function outside component |
React.useMemo | Atom.readable(get => ...) or Atom.map(atom, fn) |
React.useRef (for mutable state) | Atom.make(value) with useAtom |
React.useContext | RegistryProvider + atom composition |
Exception: React.useRef for DOM element refs (not state) is permitted.
Required Patterns
- All state through
Atom.make,Atom.readable,Atom.writable,runtime.atom(), orruntime.fn(). - Frontend services as
Context.Serviceclasses, implementations asLayer, provided toAtom.runtime(layer). exactOptionalPropertyTypes: true-- optional props typed asundefined | T.factory.addGlobalLayer()for logging and tracing in all runtimes.- Server state uses
runtime.atom(effect)withAsyncResultlifecycle. - Mutations use
runtime.fn<Arg>()(effect)with reactivity key invalidation. - Client-only state uses
Atom.make(value)(returnsWritable<A>). - URL state uses
Atom.searchParam("key")with optional Schema parsing. - Persisted state uses
Atom.kvs({ runtime, key, schema, defaultValue }). - Never call
Effect.runSync/Effect.runPromise/Effect.runForkin component code. Atoms handle execution.
State Category Decision Tree
Is this state...
|
+-- From the server? (API call, database, RPC)
| |
| +-- One-shot fetch? --> runtime.atom(effect)
| +-- Mutation? -------> runtime.fn<Arg>()(effect, { reactivityKeys })
| +-- Realtime stream? -> runtime.pull(stream) or runtime.atom(stream)
| +-- RPC group? ------> AtomRpc.Service
|
+-- Client-only? (UI state, toggles, form values)
| |
| +-- Simple value? ---> Atom.make(initialValue)
| +-- Derived? --------> Atom.readable(get => ...) or Atom.map(atom, fn)
| +-- Per-key? --------> Atom.family(key => Atom.make(value))
|
+-- URL search param? -----> Atom.searchParam("key", { schema? })
|
+-- Persisted to storage? -> Atom.kvs({ runtime, key, schema, defaultValue })
|
+-- Component-scoped? -----> ScopedAtom.make(() => Atom.make(value))References (load on demand)
references/api-reference.md-- full API: Atom constructors/combinators, AtomContext, AtomRuntime, AsyncResult, Reactivity, AtomRpc, @effect/atom-react hooks/provider/ScopedAtom/SSRreferences/service-pattern.md-- 5-step canonical frontend service pattern; canonical in-repo example ispackages/agents/client/src/Chat.atoms.tsreferences/examples-antipatterns.md-- 10 Always/Never examples, anti-pattern table, extended verification greps
Escalation
effect-first-developmentwhen the task is broader than frontend state, including service/Layer wiring and typed error recovery outside atom rendering.schema-first-developmentfor schema modeling within atoms.
Source References
.repos/effect points to $HOME/YeeBois/references/effect/effect, the Effect
child of the reference workspace; Effect main is v4.
.repos/effect/packages/effect/src/reactivity/{Atom,Reactivity,AtomRpc,AsyncResult}.tsnode_modules/@effect/atom-react/src/{Hooks,RegistryContext,ScopedAtom,ReactHydration}.ts
Verification
# 1. Banned React hooks in new frontend code
rg -n "React\.useState|React\.useEffect|React\.useCallback|React\.useMemo" packages/*/client packages/*/ui apps
# 2. Raw hook imports (not from @effect/atom-react)
rg -n "import.*\{.*(useState|useEffect|useCallback|useMemo).*\}.*from ['\"]react['\"]" packages/*/client packages/*/ui apps
# 3. Effect.run* in component files
rg -n "Effect\.run(Sync|Promise|Fork)\(" packages/*/client packages/*/ui apps --glob "*.tsx"
# 4. Missing reactivity keys on mutations
rg -n "runtime\.fn" packages/*/client packages/*/ui apps -A3Extended checks: references/examples-antipatterns.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

