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.

259 stars 28 forksFrontend & Design

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add PatternsDev/skills --skill state-management
Manual install
git 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-management

Personal 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.
Read the full skill on GitHub

Details

Skill name
state-management
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

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.