Install
$ agentstack add skill-dobroslavradosavljevic-skills-tanstack-store ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
TanStack Store
Use this skill when work touches TanStack Store, especially @tanstack/react-store, framework-agnostic stores, atoms, derived state, or migration from older useStore examples.
Workflow
- Inspect the local state shape before changing code:
- Package versions for
@tanstack/store,@tanstack/react-store, framework adapters, React, and test utilities. - Store lifetime: module singleton, context-provided bundle, component-lifetime store, request-scoped SSR state, or local atom.
- Read/write APIs in use:
useSelector, deprecateduseStore,_useStore,useAtom,setState, actions factories, subscriptions, or atoms. - Update expectations: immutable object updates, derived computations, batching, persistence side effects, and selector re-render behavior.
- Refresh current docs and package evidence when behavior or versions matter. Start from [source-map.md](references/source-map.md).
- For installation, package names, core
createStore,Store, actions, subscriptions, immutable updates, and batching, use [setup-core.md](references/setup-core.md). - For React usage,
useSelector, selectorcompare,useAtom,useCreateStore,useCreateAtom, contexts, anduseStoremigrations, use [react-patterns.md](references/react-patterns.md). - For atoms, async atoms, derived stores, previous values, equality,
shallow, and reactive graph behavior, use [atoms-derived-batching.md](references/atoms-derived-batching.md). - For SSR, testing, lifecycle, persistence, framework adapters, debugging without devtools, and production checks, use [production-testing.md](references/production-testing.md).
Implementation Judgment
- Prefer
useSelectorin React. TreatuseStoreas a deprecated alias and_useStoreas transitional unless the codebase deliberately adopted it. - Keep store updates immutable.
setStatereplaces the store value with the updater return, so object updates should spread or construct the complete next state. - Use narrow selectors for React rendering. Selecting the whole store couples a component to every change.
- Add
compareorshallowonly when a selector returns composite values that would otherwise churn; prefer stable primitive selections first. - Use
batchwhen multiple store or atom updates should notify subscribers once with final state. - Use action factories when a store owns domain operations; keep UI components from hand-rolling repeated update logic.
- Avoid module-scope user/session stores in SSR unless the state is truly global and public. Create request- or component-scoped stores for per-user data.
- Use
subscribefor side effects like persistence or logging, and always keep theunsubscribecleanup. - Check current docs before relying on adapter details. Store is v0, and adapter APIs are still evolving.
Verification
Prefer the repo's existing checks. For meaningful TanStack Store changes, include the relevant subset:
- Typecheck for store state, action factories, selectors, atom values, and context bundles.
- Unit tests for
setState, action methods, derived stores, atoms, async atoms, batching, and subscription cleanup. - Component tests for selector re-render boundaries,
compare,useAtomsetters, context errors, and deprecated API migrations. - SSR/request tests when changing store lifetime, module scope, context providers, or server-created initial state.
- Browser smoke for UI flows that depend on derived state, optimistic local state, persistence, or cross-component subscriptions.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: DobroslavRadosavljevic
- Source: DobroslavRadosavljevic/skills
- License: MIT
- Homepage: https://dobroslav.dev
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.