Xray UI Dev
bropines/xray-config-ui-editor
Development and maintenance of Xray Config UI Editor. An agent skill from bropines/xray-config-ui-editor.
Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage).
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install stellar/laboratory zustand-store-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .claude/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .claude/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install stellar/laboratory zustand-store-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .agents/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .agents/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install stellar/laboratory zustand-store-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .cursor/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .cursor/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/stellar/laboratory.git --path .claude/skills/zustand-store-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install stellar/laboratory zustand-store-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .gemini/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .gemini/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install stellar/laboratory zustand-store-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .github/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .github/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add stellar/laboratory --skill zustand-store-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install stellar/laboratory zustand-store-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/stellar/laboratory.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/zustand-store-patterns .opencode/skills/zustand-store-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "zustand-store-patterns" agent skill from https://github.com/stellar/laboratory/tree/main/.claude/skills/zustand-store-patterns into .opencode/skills/zustand-store-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "zustand-store-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
zustand-store-patternsReference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage).
Zustand Store Patterns is an agent skill from stellar/laboratory. Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage). Invoke when creating store slices, debugging hydration, or deciding where state belongs.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Frontend & Design, covering State management. It works with Zustand and React. The repository describes itself as: A set of tools that enables developers to try out and learn about the Stellar network. The licence is Apache-2.0.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit b4b6465. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Zustand Store Patterns loads about 1.4k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 453 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from stellar/laboratory at commit b4b6465, republished under its Apache-2.0 licence (© stellar). 453 words, ~1,368 tokens.
.claude/skills/zustand-store-patterns/SKILL.md (or your agent's skills folder).| Main Store | Transaction Flow Store | |
|---|---|---|
| File | src/store/createStore.ts | src/store/createTransactionFlowStore.ts |
| Hook | useStore() | useBuildFlowStore() |
| Middleware | querystring(immer(...)) | persist(immer(...)) |
| Persists to | URL querystring | sessionStorage |
| Survives tab close | Yes (URL) | No |
| Survives refresh | Yes (URL) | Yes (sessionStorage) |
| Instance type | New per provider mount | Singleton (module-level) |
| Used by | Entire app (~85 files) | Transaction build flow (~21 files) |
Main store (useStore): For state that is app-wide, URL-shareable, or used
outside the transaction flow. Network settings, XDR viewer state, endpoint
explorer state, account page state.
Flow store (useBuildFlowStore): For state within the single-page
transaction flow. Build params, operations, simulation results, signed XDR, step
navigation. This state is too large for URLs (simulation results can be 50KB+).
Cross-store reads: Components in the transaction flow read network from
the main store as a read-only dependency. Never duplicate network config into
the flow store.
export const SimulateStepContent = () => {
const { network } = useStore(); // Main store — network only
const { build, simulate } = useBuildFlowStore(); // Flow store — tx state
};create<Store>()(
querystring(
immer((set) => ({ ... })),
{
url: options.url,
select() { /* what to persist in URL */ },
}
)
);Synchronous — URL is passed at creation time in StoreProvider:
// src/store/StoreProvider.tsx
const [store] = useState(() => createStore({ url }));No manual rehydration needed. Store re-creates on route change.
Via React Context (because instance is dynamic):
import { useStore } from "@/store/useStore";
const { network } = useStore();
const network = useStore((s) => s.network); // selector formcreate<TransactionFlowStore>()(
persist(
immer((set) => ({ ... })),
{
name: "stellar_lab_tx_flow_build",
storage: createJSONStorage(() => sessionStorage),
skipHydration: true, // CRITICAL
}
)
);Never rehydrate in useEffect. Child effects fire before parent effects and
will write default state to sessionStorage, overwriting persisted data.
// WRONG — don't do this
useEffect(() => {
useBuildFlowStore.persist.rehydrate();
}, []);
// CORRECT — module-scope rehydration (runs before any component mounts)
if (typeof window !== "undefined") {
useBuildFlowStore.persist.rehydrate();
}This runs at module load time, before React renders anything. The
skipHydration: true flag prevents Zustand's automatic rehydration (which
happens too late).
Direct import (singleton, no context needed):
import { useBuildFlowStore } from "@/store/createTransactionFlowStore";
const { build, simulate, setActiveStep } = useBuildFlowStore();stellar_lab_tx_flow_build — Build flow statestellar_lab_tx_flow_import — Import flow state (independent)Each flow has its own store instance and sessionStorage key. Navigating between Build and Import tabs does not clear the other's state.
createStore.tsselect() configuseStore()build, simulate, sign,
validate, submit)setSignedXdr: (xdr: string) =>
set((state) => {
state.sign.signedXdr = xdr;
}),INITIAL_STATE with a sensible defaultuseBuildFlowStore()JSON.stringify(result))activeStep and highestCompletedStep are persisted —
they survive refreshhighestCompletedStep, never lower it
(except on explicit reset)All sessionStorage access must be wrapped in try-catch:
| Purpose | File |
|---|---|
| Main store | src/store/createStore.ts |
| Main store hook | src/store/useStore.ts |
| Store provider | src/store/StoreProvider.tsx |
| Flow store | src/store/createTransactionFlowStore.ts |
| Root layout | src/app/layout.tsx |
© stellar, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/zustand-store-patterns of stellar/laboratory.
Open the folder on GitHubat commit b4b6465
Zustand Store Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Zustand Store Patterns this skillstellar/laboratory | 112 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Xray UI Devbropines/xray-config-ui-editor | 119 | — | ~942 | Automated safety check: Pass | MIT | |
| Opik Frontend Patternscomet-ml/opik | 22k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| State Managementemanueleielo/deepagents-open-lovable | 111 | — | ~1.7k | Automated safety check: Pass | None | |
| Frontend Large Feature Architecturelangfuse/langfuse | 36k | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| React ExpertJeffallan/claude-skills | 12k | — | ~1.4k | Automated safety check: Pass | MIT |
bropines/xray-config-ui-editor
Development and maintenance of Xray Config UI Editor. An agent skill from bropines/xray-config-ui-editor.
comet-ml/opik
Sets the conventions for the Opik React frontend: TanStack Query for data, Zustand for shared state, one-way layer imports and a fix for Google Translate crashes.
emanueleielo/deepagents-open-lovable
State management patterns - Zustand, Jotai, Context. An agent skill from emanueleielo/deepagents-open-lovable.
langfuse/langfuse
Architect large or state-heavy Langfuse frontend features. An agent skill from langfuse/langfuse.
Jeffallan/claude-skills
Builds React 19 components in TypeScript with Server Components, useActionState forms, custom hooks and state libraries, checked with tsc and React Testing Library.
microsoft/skills
Create React Flow node components with TypeScript types, handles, and Zustand integration.
stellar/laboratory
Guide for building React components using @stellar/design-system and project SCSS conventions.
stellar/laboratory
Correct mental models for React re-renders and memoization. An agent skill from stellar/laboratory.
stellar/laboratory
Commit a logical unit of work with a descriptive message. An agent skill from stellar/laboratory.
stellar/laboratory
Bridge Figma MCP output to Stellar Lab code conventions. An agent skill from stellar/laboratory.
stellar/laboratory
Run e2e and unit tests related to files changed on the current branch.
Categories
Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage). Zustand Store Patterns is an agent skill from stellar/laboratory. Reference for the two Zustand store patterns in Stellar Lab — main store (querystring) and transaction flow store (sessionStorage).
Zustand Store Patterns fits situations like: tasks that involve State management.
Run `npx skills add stellar/laboratory --skill zustand-store-patterns -a claude-code`. Or copy the skill folder (.claude/skills/zustand-store-patterns in stellar/laboratory) into .claude/skills/zustand-store-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add stellar/laboratory --skill zustand-store-patterns -a codex`. Or copy the skill folder (.claude/skills/zustand-store-patterns in stellar/laboratory) into .agents/skills/zustand-store-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add stellar/laboratory --skill zustand-store-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/zustand-store-patterns, .gemini/skills/zustand-store-patterns, .github/skills/zustand-store-patterns and .opencode/skills/zustand-store-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Zustand Store Patterns is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Zustand Store Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Zustand Store Patterns: Xray UI Dev (bropines/xray-config-ui-editor, 119 stars), Opik Frontend Patterns (comet-ml/opik, 22k stars), State Management (emanueleielo/deepagents-open-lovable, 111 stars) and Frontend Large Feature Architecture (langfuse/langfuse, 36k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
stellar (a GitHub organization) maintains it in stellar/laboratory, which has 112 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 3, 2026.
Source: stellar/laboratory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.