
vuex-vue2
Provides comprehensive guidance for Vuex 2.x state management in Vue 2 applications including state, mutations, actions, getters, modules, and plugins. Use when the user asks about Vuex for Vue 2, needs to manage state in Vue 2 applications, or implement Vuex patterns.
- Installs
- 206
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/full-stack-skills/vue-skills --skill vuex-vue2- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads vuex-vue2 automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
When to use this skill
Use this skill whenever the user wants to:
- Install and set up Vuex in a Vue 2 project
- Manage application state with Vuex
- Use Vuex store in Vue components
- Understand Vuex core concepts (state, getters, mutations, actions)
- Use Vuex modules for large applications
- Handle Vuex plugins and devtools
- Understand Vuex API and methods
- Troubleshoot Vuex issues
How to use this skill
This skill is organized to match the Vuex official documentation structure (https://vuex.vuejs.org/zh/, https://vuex.vuejs.org/zh/guide/, https://vuex.vuejs.org/zh/api/). When working with Vuex:
-
Identify the topic from the user's request:
- Installation/安装 →
examples/guide/installation.md - Quick Start/快速开始 →
examples/guide/quick-start.md - Core Concepts/核心概念 →
examples/core-concepts/ - Advanced/高级 →
examples/advanced/ - API/API 文档 →
api/
- Installation/安装 →
-
Load the appropriate example file from the
examples/directory:Guide (使用指南):
examples/guide/intro.md- Introduction to Vuexexamples/guide/installation.md- Installation guideexamples/guide/quick-start.md- Quick start guideexamples/guide/what-is-vuex.md- What is Vuex
Core Concepts (核心概念):
examples/core-concepts/state.md- Stateexamples/core-concepts/getters.md- Gettersexamples/core-concepts/mutations.md- Mutationsexamples/core-concepts/actions.md- Actionsexamples/core-concepts/modules.md- Modules
Advanced (高级):
examples/advanced/plugins.md- Pluginsexamples/advanced/strict-mode.md- Strict modeexamples/advanced/form-handling.md- Form handlingexamples/advanced/testing.md- Testingexamples/advanced/hot-reload.md- Hot reload
-
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- Vuex is for Vue 2.x
- Store is the central state management
- State is reactive
- Mutations are synchronous
- Actions are asynchronous
- Each example file includes key concepts, code examples, and key points
-
Reference API documentation in the
api/directory when needed:api/store-api.md- Store APIapi/state-api.md- State APIapi/getters-api.md- Getters APIapi/mutations-api.md- Mutations APIapi/actions-api.md- Actions APIapi/modules-api.md- Modules APIapi/plugins-api.md- Plugins API
-
Use templates from the
templates/directory:templates/installation.md- Installation templatestemplates/store-setup.md- Store setup templatestemplates/component-usage.md- Component usage templates
1. Understanding Vuex
Vuex is a state management pattern and library for Vue.js applications. It serves as a centralized store for all the components in an application.
Key Concepts:
- Store: Centralized state container
- State: Application state (data)
- Getters: Computed properties for store
- Mutations: Synchronous state changes
- Actions: Asynchronous operations
- Modules: Store organization
2. Installation
Using npm:
npm install vuex@3
Using yarn:
yarn add vuex@3
Using CDN:
<script src="https://unpkg.com/vuex@3"></script>
3. Basic Setup
// store/index.js
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment(state) {
state.count++
}
}
})
export default store
// main.js
import Vue from 'vue'
import store from './store'
new Vue({
store,
render: h => h(App)
}).$mount('#app')
Doc mapping (one-to-one with official documentation)
examples/guide/orexamples/getting-started/→ https://vuex.vuejs.org/zh/guide/api/→ https://vuex.vuejs.org/zh/api/
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).
To use examples:
- Identify the topic from the user's request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/directory for common scaffolding - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the api/ directory, organized to match the official Vuex API documentation structure (https://vuex.vuejs.org/zh/api/):
Store API (api/store-api.md)
- Store constructor options
- Store instance properties
- Store instance methods
State API (api/state-api.md)
- State definition
- State access
- State reactivity
Getters API (api/getters-api.md)
- Getter definition
- Getter access
- Getter arguments
Mutations API (api/mutations-api.md)
- Mutation definition
- Mutation commit
- Mutation payload
Actions API (api/actions-api.md)
- Action definition
- Action dispatch
- Action context
Modules API (api/modules-api.md)
- Module definition
- Module namespacing
- Module registration
Plugins API (api/plugins-api.md)
- Plugin definition
- Plugin usage
- Built-in plugins
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the
api/directory - Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the
examples/directory
Best Practices
- Use mutations for synchronous changes: Mutations must be synchronous
- Use actions for async operations: Actions can contain async operations
- Keep state normalized: Avoid nested state structures
- Use modules for large apps: Organize store with modules
- Use getters for computed state: Derive state with getters
- Follow naming conventions: Use consistent naming patterns
- Use TypeScript: Leverage TypeScript for type safety
Resources
- Official Documentation: https://vuex.vuejs.org/zh/
- Guide: https://vuex.vuejs.org/zh/guide/
- API Documentation: https://vuex.vuejs.org/zh/api/
- GitHub Repository: https://github.com/vuejs/vuex
Keywords
Vuex, vuex, Vue 2, state management, 状态管理, store, state, getters, mutations, actions, modules, 存储, 状态, 获取器, 变更, 动作, 模块, Vuex store, Vuex state, Vuex getters, Vuex mutations, Vuex actions, Vuex modules, Vuex plugins, centralized state, reactive state, synchronous mutations, asynchronous actions
FAQ
What does the vuex-vue2 skill do?
Provides comprehensive guidance for Vuex 2.x state management in Vue 2 applications including state, mutations, actions, getters, modules, and plugins. Use when the user asks about Vuex for Vue 2, needs to manage state in Vue 2 applications, or implement Vuex patterns.
How do I install vuex-vue2?
Run npx skills add https://github.com/full-stack-skills/vue-skills --skill vuex-vue2 in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/vuex-vue2/ (personal) or .claude/skills/vuex-vue2/ (project).
Which AI agents can use vuex-vue2?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is vuex-vue2 safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains vuex-vue2?
It is published by full-stack-skills in full-stack-skills/vue-skills. It has 206 recorded installs.
More from full-stack-skills/vue-skills
vue3
full-stack-skills/vue-skills
Guidance for Vue 3 using the official guide and API reference. Use when the user needs Vue 3 concepts, patterns, or API details to build components, apps, and tooling.
pinia
full-stack-skills/vue-skills
Provides comprehensive guidance for Pinia state management including stores, state, getters, actions, plugins, and TypeScript support. Use when the user asks about Pinia, needs to manage application state, create stores, implement state persistence, or migrate from Vuex.
vue-router-v4
full-stack-skills/vue-skills
Open the skill to read its SKILL.md instructions.
vue2
full-stack-skills/vue-skills
Provides comprehensive guidance for Vue 2.x development including Options API, components, directives, lifecycle hooks, computed properties, watchers, Vuex state management, and Vue Router. Use when the user asks about Vue 2, needs to create Vue 2 components, implement reactive data binding, handle component communication, or work with Vue 2 ecosystem tools.
vue-router
full-stack-skills/vue-skills
Provides comprehensive guidance for Vue Router including route configuration, navigation, dynamic routes, nested routes, route guards, programmatic navigation, and route meta. Use when the user asks about Vue Router, needs to set up routing, implement navigation guards, handle route parameters, or manage route transitions.
vue-router-v3
full-stack-skills/vue-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.