State Management
Teaches Vue state management with stores, Pinia, and the Composition API. Use when you need to share and synchronize state across multiple components beyond what props and events can handle.
Install
npx skills add PatternsDev/skills --skill state-managementgit clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/vue/state-management ~/.claude/skills/state-managementPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# State Management
## Table of Contents
- [When to Use](#when-to-use)
- [Instructions](#instructions)
- [Details](#details)
- [Source](#source)
**Vue components are the building blocks of Vue apps** by allowing us to couple markup (HTML), logic (JS), and styles (CSS) within them.
## When to Use
- Use this when you need to share reactive data between sibling or deeply nested components
- This is helpful for managing global application state beyond simple parent-child prop passing
## Instructions
- Use props for parent-to-child data flow and custom events for child-to-parent communication
- Create a simple store using `reactive()` for small applications
- Use Pinia (the official Vue state management library) for larger apps needing devtools, plugins, and TypeScript support
- Choose the state management approach based on your app's complexity — don't over-engineer small apps
## Details
Here's an example of a Single-File component that displays a series of numbers from a data property:
```html
<template>
<div>
<h2>The numbers are {{ numbers }}!</h2>
</div>
</template>
<script setup>
import { ref } from "vue";
const numbers = ref([1, 2, 3]);
</script>
```
The `ref()` function prepares the component to be _reactive_. If a reactive property value that's being used in the template changes, the component view will re-render to show the change.Details
- Skill name
state-management- Repository
- PatternsDev/skills
- Path
vue/state-management/SKILL.md- Repo updated
- 15 April 2026
FAQ
What does the State Management skill do?
Teaches Vue state management with stores, Pinia, and the Composition API. Use when you need to share and synchronize state across multiple components beyond what props and events can handle.
How do I install the State Management skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill state-management. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is State Management popular?
It lives in PatternsDev/skills, which has 259 GitHub stars and 28 forks.
Related skills
AI UI Patterns
259PatternsDev/skills
Teaches design patterns for building AI-powered React interfaces. Use when creating chatbots, intelligent assistants, streaming UIs, or any AI-driven user experience in React.
Async Components
259PatternsDev/skills
Teaches async component loading in Vue for performance optimization. Use when you have heavy components that aren't needed on initial render and can be loaded on demand.
Bundle Splitting
259PatternsDev/skills
Teaches bundle splitting techniques for web performance. Use when your application has a large JavaScript bundle that affects load times or when you need to reduce FCP/LCP.
Static Rendering
259PatternsDev/skills
Teaches static rendering (SSG) for build-time HTML generation. Use when your pages don't change per request and can be pre-rendered at build time for maximum cacheability and performance.
Server Side Rendering
259PatternsDev/skills
Teaches server-side rendering (SSR) for React applications. Use when you need faster initial page loads, better SEO, or dynamic per-request HTML generation.
Streaming Ssr
259PatternsDev/skills
Teaches streaming server-side rendering for chunked HTML delivery. Use when you need faster Time to First Byte and First Contentful Paint by streaming HTML as it's generated on the server.
Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.