zustand-typescript

zustand-typescript is a skill for Claude Code from punkadillo/figma-code-composer. It costs 32 tokens per session (4,037 once invoked), scanned A, original, MIT.

A guide to using Zustand with TypeScript, including typed stores, selectors, actions, and type inference. Type inference lets TypeScript work out types from your code.

In plain words
What is it for?
Use it to create type-safe Zustand stores and apply advanced TypeScript patterns in React applications.
Why use it?
It reduces mismatches between state and the code that uses it, while making store changes easier to check and maintain.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to create type-safe Zustand stores and apply advanced TypeScript patterns in React applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/punkadillo/figma-code-composer/zustand-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add punkadillo/figma-code-composer --skill zustand-typescript
Clone the repo
git clone --depth 1 https://github.com/punkadillo/figma-code-composer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zustand-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/zustand-typescript/github.svg)](https://agentmods.dev/skills/punkadillo/figma-code-composer/zustand-typescript)
Your own site
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/zustand-typescript"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/zustand-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zustand-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/zustand-typescript"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/zustand-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,037 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.04037
Opus 5.5 $0.00013 $0.01615
Sonnet 5.5 $0.00006 $0.00807
Haiku 4.5 $0.00003 $0.00404

Measured 3mo ago against content hash a12318f22ef2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

zustand-typescript scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await fetch(apiEndpoint)
.figma-pipeline/skills/zustand-typescript/SKILL.md · 688 lines

How it starts

The opening of the file, as written. The whole thing — 688 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zustand - TypeScript Integration

Zustand has excellent TypeScript support out of the box. This skill covers type-safe patterns and best practices for using Zustand with TypeScript.

Key Concepts

Basic Type-Safe Store

Define your store interface and use it with create:

import { create } from 'zustand'

interface BearStore {
  bears: number
  increasePopulation: () => void
  removeAllBears: () => void
  updateBears: (newBears: number) => void
}

const useBearStore = create<BearStore>()((set) => ({
  bears: 0,
  increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
  removeAllBears: () => set({ bears: 0 }),
  updateBears: (newBears) => set({ bears: newBears }),
}))

Type Inference

Zustand can infer types automatically:

const useStore = create((set) => ({
  count: 0,
  text: '',
  increment: () => set((state) => ({ count: state.count + 1 })),
  setText: (text: string) => set({ text }),
}))

// Types are inferred automatically
type Store = ReturnType<typeof useStore.getState>
// {
//   count: number
//   text: string
//   increment: () => void
//   setText: (text: string) => void
// }

Best Practices

1. Define Store Interfaces

Always define explicit interfaces for better type safety and IDE support:

interface User {
  id: string
  name: string
  email: string
}

interface UserStore {
  // State
  users: User[]
  selectedUserId: string | null
  isLoading: boolean
  error: string | null

  // Computed
  selectedUser: User | null

  // Actions
  fetchUsers: () => Promise<void>
  selectUser: (id: string) => void
  clearSelection: () => void
}

const useUserStore = create<UserStore>()((set, get) => ({
  users: [],
  selectedUserId: null,
  isLoading: false,
  error: null,

  get selectedUser() {
    const { users, selectedUserId } = get()
    return users.find((u) => u.id === selectedUserId) ?? null
  },

  fetchUsers: async () => {
    set({ isLoading: true, error: null })
    try {
      const users = await api.fetchUsers()
      set({ users, isLoading: false })
    } catch (error) {
      set({ error: error.message, isLoading: false })
    }
  },

  selectUser: (id) => set({ selectedUserId: id }),
  clearSelection: () => set({ selectedUserId: null }),
}))

Read the full file on GitHub · 688 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 688 lines · 32 tokens per session scan A a12318f22ef2

Subscribe to this mod's changes

zustand-typescript is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 3mo ago), licensed MIT. It adds 32 tokens to every session and 4,037 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

zustand-typescript compared with skills from other repositories

zustand-typescript next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zustand-typescriptpunkadillo/figma-code-composerSkill33mo agoMITA32Claude Code
agent-boostera5c-ai/babysitterSkill1.9k1mo agoMITA28Claude Code
V3 CLI Modernizationruvnet/rufloSkill83kyesterdayMITA35Claude Code
V3 Core Implementationruvnet/rufloSkill83kyesterdayMITA37Claude Code
V3 DDD Architectureruvnet/rufloSkill83kyesterdayMITA34Claude Code
typescriptolehsvyrydov/AI-development-teamSkill1813d agoMITA148Claude Code
sinch-functions-nodesinch/skillsSkill116d agoApache-2.0A84Claude Code, Codex