zustand-store-ts
하는 일
이 코드는 Zustand 라이브러리를 사용해 웹 애플리케이션의 데이터 ‘스토어’를 만드는 데 도움을 줍니다. 데이터가 어떻게 보관되고 접근·수정되는지 정리하며, TypeScript와 함께 올바르게 작동하도록 합니다.
사용하는 경우
- ✓앱의 여러 부분에서 함께 쓰는 정보를 저장해야 할 때.
- ✓프로젝트의 상태 관리 체계를 만들 때.
- ✓시간이 지나며 바뀌는 전역 데이터를 정리하고 싶은 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/zustand-store-ts/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“장바구니의 상태를 관리하는 스토어를 만들어 주세요. 상품 목록과 합계를 포함하고, 상품을 추가하고 제거하는 함수가 있어야 합니다.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
데이터를 정의하는 방식(상태)과 그 데이터로 할 일(동작)을 정하는 패턴을 사용합니다. 또한 데이터가 바뀔 때 앱의 필요한 부분만 업데이트되도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Zustand Store
Create Zustand stores following established patterns with proper TypeScript types and middleware.
Quick Start
Copy the template from assets/template.ts and replace placeholders:
{{StoreName}}→ PascalCase store name (e.g.,Project){{description}}→ Brief description for JSDoc
Always Use subscribeWithSelector
import { create } from 'zustand';
import { subscribeWithSelector } from 'zustand/middleware';
export const useMyStore = create<MyStore>()(
subscribeWithSelector((set, get) => ({
// state and actions
}))
);
Separate State and Actions
export interface MyState {
items: Item[];
isLoading: boolean;
}
export interface MyActions {
addItem: (item: Item) => void;
loadItems: () => Promise<void>;
}
export type MyStore = MyState & MyActions;
Use Individual Selectors
// Good - only re-renders when `items` changes
const items = useMyStore((state) => state.items);
// Avoid - re-renders on any state change
const { items, isLoading } = useMyStore();
Subscribe Outside React
useMyStore.subscribe(
(state) => state.selectedId,
(selectedId) => console.log('Selected:', selectedId)
);
Integration Steps
- Create store in
src/frontend/src/store/ - Export from
src/frontend/src/store/index.ts - Add tests in
src/frontend/src/store/*.test.ts
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
‘Zustand’란 무엇인가요?
웹 애플리케이션에서 데이터를 더 쉽게 관리하도록 돕는 라이브러리입니다.
‘TypeScript’란 무엇인가요?
코드에서 오류를 막도록 추가 검사를 해 주는 프로그래밍 언어입니다.
‘미들웨어’란 무엇인가요?
스토어에 ‘플러그인’처럼 추가 기능을 더하는 것입니다. 예를 들어 변경 사항을 기록하거나 비동기 동작을 처리합니다.
상세 정보
작성자의 원본 설명
Create Zustand stores following established patterns with proper TypeScript types and middleware.
인기도
- GitHub 스타
- 48k
- 순위
- #6244
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.