This one walks you through Jotai's atomic state management with decision trees for when to use atoms versus useState, which hooks prevent unnecessary rerenders, and how to handle lists and large objects efficiently. It covers splitAtom for independent list items, selectAtom for granular subscriptions, and loadable for async states without Suspense boundaries. The reference stability section alone will save you from the classic mistake of creating atoms inside components. Strong on performance patterns and TypeScript integration. If you're already using Jotai and hitting rerender issues or wondering whether to reach for atomFamily versus atoms-in-atom, this gives you the practical guidance to make that call.

skills.sh installs
204
last updated
Aug 21, 2026

Install

$ npx -y skills add s-hiraoku/skills-factory --skill jotai-expert --agent claude-code

Installs into .claude/skills of the current project.

Files

Jotai Expert

Jotai is a primitive and flexible state management library for React using an atomic approach. Always reference https://jotai.org/ for the latest API details.

Decision Tree

Need state management?
├── Simple local state → useState (no Jotai needed)
├── Shared state across components
│   ├── Few components, same tree → Context may suffice
│   └── Many components, complex → Use Jotai ✓
└── Global app state → Use Jotai ✓

Choosing atom type:
├── Static value → atom(initialValue)
├── Computed from other atoms → atom((get) => ...)
├── Need to modify other atoms → atom(null, (get, set) => ...)
├── Persist to storage → atomWithStorage()
├── List of items → splitAtom() or atoms-in-atom
└── Parameterized data → atomFamily()

Performance issue?
├── Component re-renders too often
│   ├── Only reading? → useAtomValue
│   ├── Only writing? → useSetAtom
│   ├── Large object? → selectAtom / focusAtom
│   └── List items? → splitAtom
└── Async loading states → loadable() or manual loading atoms

Core Patterns

Atom Types

import { atom } from 'jotai'

// 1. Primitive: holds value
const countAtom = atom(0)

Sponsors

Details

Repository
github.com/s-hiraoku/skills-factory
Categories
Frontend Development, Code Review & Quality, Debugging
First seen
Jun 3, 2026
1jezweb avatartesting-libraryjezweb/claude-skillsTest React components with Testing Library patterns. Covers queries (getBy/findBy/queryBy), user-event interactions, async testing (findBy vs waitFor), accessib203skills.sh installs
2dbjpanda avatarconvex-tenantsdbjpanda/convex-tenantsMulti-tenant organization and team management for Convex with @djpanda/convex-tenants and @djpanda/convex-authz. Use when (1) setting up or integrating multi-te192skills.sh installs
3warpdotdev avatarwebapp-testingwarpdotdev/oz-skillsTest local web applications with Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or inspect browser192skills.sh installs
4qodex-ai avataraesthetic-analysisqodex-ai/ai-agent-skillsAnalyze and extract design patterns from visual examples. Deconstructs design systems, color palettes, typography, and layout principles from reference material190skills.sh installs
5davila7 avatarplaywrightdavila7/claude-code-templatesUse when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) vi185skills.sh installs
6rand avatarelegant-designrand/cc-polymathCreate world-class, accessible, responsive interfaces with sophisticated interactive elements including chat, terminals, code display, and streaming content. Us184skills.sh installs