[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79AGXKPSTK26MNWK44X3CDV":3,"skill-same:01M79AGXKPSTK26MNWK44X3CDV":138},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":14,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M79AGXKPSTK26MNWK44X3CDV","pinia-v3",null,"Pinia v3 Vue state management with defineStore, getters, actions. Use for Vue 3 stores, Nuxt SSR, Vuex migration, or encountering store composition, hydration, testing errors.","Elogic360\u002Fsoftware-factory","Elogic360","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F156535519?v=4","01M74NH3F0RB13PWB7JZDE2V80","elogic360","01M74NH3FPC65082MDZVMFHDM3",0,"MIT","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pinia-v3\ndescription: \"Pinia v3 Vue state management with defineStore, getters, actions. Use for Vue 3 stores, Nuxt SSR, Vuex migration, or encountering store composition, hydration, testing errors.\"\n\nmetadata:\n  keywords:\n    - pinia\n    - vue state management\n    - pinia stores\n    - defineStore\n    - vue 3 state\n    - state management\n    - getters\n    - actions\n    - pinia plugins\n    - pinia ssr\n    - nuxt pinia\n    - vuex migration\n    - store composition\n    - pinia testing\n    - setup stores\n    - option stores\n    - storeToRefs\n    - mapState\n    - mapActions\n    - state hydration\n    - pinia nuxt module\n    - createPinia\n    - useStore\n    - pinia devtools\n    - pinia hmr\n    - hot module replacement\n\nlicense: MIT\n---\n# Pinia v3 - Vue State Management\n\n**Status**: Production Ready ✅\n**Last Updated**: 2025-11-11\n**Dependencies**: Vue 3 (or Vue 2.7 with @vue\u002Fcomposition-api)\n**Latest Versions**: pinia@^3.0.4, @pinia\u002Fnuxt@^0.11.2, @pinia\u002Ftesting@^1.0.2\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Install Pinia\n\n```bash\nbun add pinia\n# or\nbun add pinia\n# or\nbun add pinia\n```\n\n**For Vue \u003C2.7 users**: Also install `@vue\u002Fcomposition-api` with `bun add @vue\u002Fcomposition-api`\n\n**Why this matters:**\n- Pinia is the official Vue state management library\n- Provides better TypeScript support than Vuex\n- Eliminates mutations and namespacing complexity\n- Full DevTools support with time-travel debugging\n\n### 2. Create and Register Pinia Instance\n\n```typescript\n\u002F\u002F main.ts\nimport { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from '.\u002FApp.vue'\n\nconst pinia = createPinia()\nconst app = createApp(App)\n\napp.use(pinia)\napp.mount('#app')\n```\n\n**CRITICAL:**\n- Install Pinia BEFORE using any store\n- Call `app.use(pinia)` before mounting the app\n- Only one Pinia instance per application (unless SSR)\n\n### 3. Define Your First Store\n\n```typescript\n\u002F\u002F stores\u002Fcounter.ts\nimport { defineStore } from 'pinia'\n\nexport const useCounterStore = defineStore('counter', {\n  state: () => ({\n    count: 0,\n    name: 'Eduardo'\n  }),\n  getters: {\n    doubleCount: (state) => state.count * 2\n  },\n  actions: {\n    increment() {\n      this.count++\n    }\n  }\n})\n```\n\n### 4. Use Store in Components\n\n```vue\n\u003Cscript setup>\nimport { useCounterStore } from '@\u002Fstores\u002Fcounter'\n\nconst counter = useCounterStore()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Cp>Count: {{ counter.count }}\u003C\u002Fp>\n    \u003Cp>Double: {{ counter.doubleCount }}\u003C\u002Fp>\n    \u003Cbutton @click=\"counter.increment\">Increment\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n---\n\n## The Two Store Syntaxes\n\n**Load `references\u002Fstore-syntax-guide.md` for complete comparison of Option vs Setup stores.**\n\n### Quick Overview\n\nPinia supports two store definition syntaxes:\n\n**Option Stores:**\n- Similar to Vue Options API\n- Built-in `$reset()` method\n- Best for: Simpler use cases, teams familiar with Vuex\n\n**Setup Stores:**\n- Uses Composition API pattern\n- Full composables integration\n- Best for: Advanced patterns, need watchers\u002FVueUse integration\n\n**→ Load `references\u002Fstore-syntax-guide.md` for:** Complete syntax comparison, examples, choosing criteria\n\n---\n\n## State, Getters, and Actions\n\n**Load `references\u002Fstate-getters-actions.md` for complete API reference.**\n\n### Quick Reference\n\n**State:**\n- Define in `state: () => ({...})` (option) or `ref()` (setup)\n- Access directly: `store.count`\n- Mutate directly: `store.count++` or `store.$patch({...})`\n- Reset: `store.$reset()` (option stores only)\n\n**Getters:**\n- Computed properties: `getters: { double: (state) => state.count * 2 }`\n- Access other getters with `this` (must type return value)\n\n**Actions:**\n- Business logic: `actions: { increment() { this.count++ } }`\n- Can be async\n- Access other stores directly\n\n**Store Destructuring:**\n```typescript\nimport { storeToRefs } from 'pinia'\n\n\u002F\u002F ✅ For reactivity\nconst { name, count } = storeToRefs(store)\n\n\u002F\u002F ✅ Actions can destructure directly\nconst { increment } = store\n```\n\n**→ Load `references\u002Fstate-getters-actions.md` for:** Complete API, subscriptions, store composition patterns, Options API usage\n\n---\n\n## Plugins and Composables\n\n**Load `references\u002Fplugins-composables.md` for complete plugin and composables guide.**\n\n### Plugin Basics\n\n```typescript\npinia.use(({ store, options }) => {\n  \u002F\u002F Add properties to every store\n  return { customProperty: 'value' }\n})\n```\n\n### Composables Integration\n\n**Option Stores:** Limited to `useLocalStorage` style in `state()`\n**Setup Stores:** Full VueUse\u002Fcomposables support\n\n**→ Load `references\u002Fplugins-composables.md` for:** Complete plugin patterns, VueUse integration, TypeScript typing, common patterns (persistence, router, logger)\n\n---\n\n## Using Stores Outside Components\n\n### The Problem\n\nStores need the Pinia instance, which is auto-injected in components but not available in module scope.\n\n### ❌ Wrong: Accessing Store at Module Level\n\n```typescript\n\u002F\u002F router.ts\nimport { useUserStore } from '@\u002Fstores\u002Fuser'\n\n\u002F\u002F ❌ Fails: Pinia not installed yet\nconst userStore = useUserStore()\n\nrouter.beforeEach((to) => {\n  if (userStore.isLoggedIn) { \u002F* ... *\u002F }\n})\n```\n\n### ✅ Right: Accessing Store Inside Callbacks\n\n```typescript\n\u002F\u002F router.ts\nimport { useUserStore } from '@\u002Fstores\u002Fuser'\n\nrouter.beforeEach((to) => {\n  \u002F\u002F ✅ Works: Called after Pinia is installed\n  const userStore = useUserStore()\n\n  if (userStore.isLoggedIn) { \u002F* ... *\u002F }\n})\n```\n\n**Why it works**: Router guards execute AFTER `app.use(pinia)` completes.\n\n### SSR: Explicit Pinia Instance\n\n```typescript\n\u002F\u002F server-side\nexport function setupRouter(pinia) {\n  router.beforeEach((to) => {\n    const userStore = useUserStore(pinia) \u002F\u002F Pass explicitly\n  })\n}\n```\n\n---\n\n## Server-Side Rendering & Nuxt\n\n**Load `references\u002Fssr-and-nuxt.md` for complete SSR and Nuxt integration guide.**\n\n### SSR Quick Reference\n\n**State Hydration:**\n- Server: Serialize with `devalue()` (not `JSON.stringify`)\n- Client: Hydrate BEFORE calling `useStore()`\n- Critical: Call all `useStore()` BEFORE `await` in actions\n\n### Nuxt 3\u002F4 Integration\n\n```bash\nbunx nuxi@latest module add pinia\n```\n\n**Auto-imports:** `defineStore`, `storeToRefs`, `usePinia`, `acceptHMRUpdate`, all stores\n\n**→ Load `references\u002Fssr-and-nuxt.md` for:** Complete SSR patterns, Nuxt configuration, server-side data fetching, SSR pitfalls, debugging\n\n---\n\n## Testing\n\n**Load `references\u002Ftesting-guide.md` for complete testing guide.**\n\n### Testing Quick Start\n\n```typescript\nimport { setActivePinia, createPinia } from 'pinia'\n\nbeforeEach(() => {\n  setActivePinia(createPinia()) \u002F\u002F Fresh Pinia for each test\n})\n```\n\n### Component Testing\n\n```bash\nbun add -d @pinia\u002Ftesting\n```\n\n```typescript\nimport { createTestingPinia } from '@pinia\u002Ftesting'\n\nmount(Component, {\n  global: { plugins: [createTestingPinia()] }\n})\n```\n\n**→ Load `references\u002Ftesting-guide.md` for:** Complete test patterns, stubbing actions, mocking getters, async testing, SSR testing\n\n---\n\n## Hot Module Replacement (HMR)\n\n### Vite Setup\n\n```typescript\n\u002F\u002F stores\u002Fcounter.ts\nimport { defineStore, acceptHMRUpdate } from 'pinia'\n\nexport const useCounterStore = defineStore('counter', {\n  \u002F\u002F store definition\n})\n\nif (import.meta.hot) {\n  import.meta.hot.accept(acceptHMRUpdate(useCounterStore, import.meta.hot))\n}\n```\n\n### Webpack Setup\n\n```typescript\nif (import.meta.webpackHot) {\n  import.meta.webpackHot.accept(acceptHMRUpdate(useCounterStore, import.meta.webpackHot))\n}\n```\n\n**Benefits:**\n- Edit stores without full page reload\n- Preserve application state during development\n- Faster development iteration\n\n---\n\n## Options API Usage\n\nFor projects still using Options API, load complete mapper documentation.\n\n**→ Load `references\u002Fstate-getters-actions.md` for:** Complete Options API integration, all mappers (`mapStores`, `mapState`, `mapWritableState`, `mapActions`)\n\n---\n\n## Migrating from Vuex\n\n**Load `references\u002Fvuex-migration.md` for complete migration guide.**\n\n### Quick Conversion Overview\n\n**Key Changes:**\n1. Remove `namespaced` (automatic via store ID)\n2. Eliminate `mutations` (direct state mutation)\n3. Replace `commit()` with direct mutations\n4. Replace `rootState`\u002F`rootGetters` with store imports\n5. Use `store.$reset()` instead of custom clear mutations\n\n**Directory:** `store\u002Fmodules\u002F` → `stores\u002F` (each module = separate store)\n\n**→ Load `references\u002Fvuex-migration.md` for:** Complete conversion steps, component migration, checklist, gradual migration strategy\n\n---\n\n## Critical Rules\n\n### Always Do\n\n✅ Define all state properties in `state()` or return them from setup stores\n✅ Use `storeToRefs()` when destructuring state\u002Fgetters in components\n✅ Call `app.use(pinia)` BEFORE mounting the app\n✅ Return all state from setup stores (private state breaks SSR\u002FDevTools)\n✅ Call `useStore()` inside functions\u002Fcallbacks when used outside components\n✅ Use `acceptHMRUpdate()` for development HMR support\n✅ Type return values when getters use `this` to access other getters\n✅ Use `devalue` for SSR state serialization (prevents XSS)\n✅ Hydrate state BEFORE calling any `useStore()` on the client (SSR)\n✅ Call all `useStore()` BEFORE any `await` in async actions (SSR)\n\n### Never Do\n\n❌ Add state properties dynamically after store creation\n❌ Destructure store directly without `storeToRefs()` (loses reactivity)\n❌ Use arrow functions for actions (need `this` context)\n❌ Return private state in setup stores (breaks SSR\u002FDevTools\u002Fplugins)\n❌ Call `useStore()` at module top-level (before Pinia installed)\n❌ Create circular dependencies between stores (both reading each other's state)\n❌ Use `JSON.stringify()` for SSR serialization (vulnerable to XSS)\n❌ Call `useStore()` after `await` in actions (breaks SSR)\n❌ Forget to type getter return values when using `this`\n❌ Skip `beforeEach(() => setActivePinia(createPinia()))` in unit tests\n\n---\n\n## Known Issues Prevention\n\nThis skill prevents **12** documented issues:\n\n### Issue #1: Lost Reactivity from Direct Destructuring\n**Error**: State changes don't update in template after destructuring\n**Why It Happens**: JavaScript destructuring breaks Vue reactivity\n**Prevention**: Always use `storeToRefs()` for state\u002Fgetters\n\n### Issue #2: Cannot Add State Properties Dynamically\n**Error**: New properties added after store creation aren't reactive\n**Why It Happens**: Pinia needs all properties defined upfront for reactivity\n**Prevention**: Declare all properties in `state()`, even if initially `undefined`\n\n### Issue #3: Store Not Found Before Pinia Install\n**Error**: `getActivePinia()` returns undefined\n**Why It Happens**: Calling `useStore()` before `app.use(pinia)`\n**Prevention**: Call `app.use(pinia)` before mounting or accessing stores\n\n### Issue #4: Setup Store Private State Breaks SSR\n**Error**: State not serialized\u002Fhydrated correctly in SSR\n**Why It Happens**: Properties not returned from setup aren't tracked\n**Prevention**: Return ALL state properties from setup stores\n\n### Issue #5: Getters with `this` Don't Infer Types\n**Error**: TypeScript can't infer return type when getter uses `this`\n**Source**: Known TypeScript limitation with Pinia\n**Prevention**: Explicitly type return value: `getterName(): ReturnType { ... }`\n\n### Issue #6: Options API Store Suffix Confusion\n**Error**: Can't find `this.counterStore` in component\n**Why It Happens**: `mapStores()` automatically adds 'Store' suffix\n**Prevention**: Use store name + 'Store' or call `setMapStoreSuffix()`\n\n### Issue #7: Actions Called After `await` Break SSR\n**Error**: Wrong Pinia instance used in SSR, causing state pollution\n**Why It Happens**: `await` changes execution context in async functions\n**Prevention**: Call all `useStore()` before any `await` statements\n\n### Issue #8: Circular Store Dependencies Crash App\n**Error**: Maximum call stack exceeded\n**Why It Happens**: Both stores read each other's state during initialization\n**Prevention**: Use getters\u002Factions for cross-store access, not setup-time reads\n\n### Issue #9: XSS Vulnerability in SSR State Serialization\n**Error**: User input in state can execute malicious scripts\n**Why It Happens**: `JSON.stringify()` doesn't escape executable code\n**Prevention**: Use `devalue` library for safe serialization\n\n### Issue #10: HMR Doesn't Work in Development\n**Error**: Changes to store require full page reload\n**Why It Happens**: Vite\u002Fwebpack HMR not configured for store\n**Prevention**: Add `acceptHMRUpdate()` block to each store file\n\n### Issue #11: Composables Return Functions Break Option Stores\n**Error**: Store state contains non-serializable functions\n**Why It Happens**: Option stores `state()` can only return writable refs\n**Prevention**: Use setup stores for complex composables, or extract only writable state\n\n### Issue #12: State Not Reset Between Unit Tests\n**Error**: Tests affect each other, sporadic failures\n**Why It Happens**: Single Pinia instance shared across tests\n**Prevention**: `beforeEach(() => setActivePinia(createPinia()))` in test suites\n\n---\n\n## Package Versions (Verified 2025-11-21)\n\n**Core:** `pinia@^3.0.4`, `vue@^3.5.24`\n**Nuxt:** `@pinia\u002Fnuxt@^0.11.2`, `nuxt@^3.13.0`\n**Testing:** `@pinia\u002Ftesting@^1.0.2`, `vitest@^1.0.0`\n**SSR:** `devalue@^5.3.2` (for safe serialization)\n\n---\n\n## Common Patterns\n\nSee reference files for complete pattern examples:\n- **Authentication stores** → `references\u002Fstate-getters-actions.md`\n- **Persistence plugins** → `references\u002Fplugins-composables.md`\n- **Form stores** → `references\u002Fstore-syntax-guide.md` (setup store examples)\n- **Router integration** → `references\u002Fstate-getters-actions.md` (accessing stores outside components)\n\n---\n\n## Official Documentation\n\n- **Pinia**: https:\u002F\u002Fpinia.vuejs.org\u002F\n- **Getting Started**: https:\u002F\u002Fpinia.vuejs.org\u002Fgetting-started.html\n- **Core Concepts**: https:\u002F\u002Fpinia.vuejs.org\u002Fcore-concepts\u002F\n- **SSR Guide**: https:\u002F\u002Fpinia.vuejs.org\u002Fssr\u002F\n- **Nuxt Integration**: https:\u002F\u002Fpinia.vuejs.org\u002Fssr\u002Fnuxt.html\n- **Testing**: https:\u002F\u002Fpinia.vuejs.org\u002Fcookbook\u002Ftesting.html\n- **Vuex Migration**: https:\u002F\u002Fpinia.vuejs.org\u002Fcookbook\u002Fmigration-vuex.html\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fpinia\n\n---\n\n## Troubleshooting\n\n### Problem: \"getActivePinia() was called with no active Pinia\"\n**Solution**:\n1. Ensure `app.use(pinia)` is called before mounting\n2. If outside component, call `useStore()` inside callback\u002Ffunction\n3. For SSR, pass pinia instance explicitly: `useStore(pinia)`\n\n### Problem: State changes don't update in template\n**Solution**: Use `storeToRefs()` instead of direct destructuring\n\n### Problem: Getter using `this` has TypeScript errors\n**Solution**: Explicitly type the return value: `myGetter(): ReturnType { return this.otherGetter }`\n\n### Problem: $reset() not available in setup store\n**Solution**: Implement custom reset manually:\n```typescript\nfunction $reset() {\n  count.value = 0\n  name.value = ''\n}\nreturn { count, name, $reset }\n```\n\n### Problem: HMR not working for stores\n**Solution**: Add HMR acceptance block:\n```typescript\nif (import.meta.hot) {\n  import.meta.hot.accept(acceptHMRUpdate(useMyStore, import.meta.hot))\n}\n```\n\n### Problem: Tests fail intermittently\n**Solution**: Create fresh Pinia in `beforeEach()`:\n```typescript\nbeforeEach(() => {\n  setActivePinia(createPinia())\n})\n```\n\n---\n\n## When to Load References\n\n**Load `references\u002Fstore-syntax-guide.md` when:**\n- Need detailed comparison between Option and Setup store syntaxes\n- Deciding which syntax to use for a new store\n- Questions about Option vs Setup stores trade-offs\n- Need complete examples of both syntaxes\n\n**Load `references\u002Fstate-getters-actions.md` when:**\n- Need complete API reference for state, getters, or actions\n- Questions about `$patch`, `$subscribe`, or `$onAction`\n- Implementing store composition patterns\n- Using Options API mappers (`mapStores`, `mapState`, `mapActions`)\n- Accessing stores outside components (router, plugins)\n\n**Load `references\u002Fplugins-composables.md` when:**\n- Creating custom Pinia plugins\n- Integrating VueUse or other composables into stores\n- Need persistence, routing, or logging plugin patterns\n- Questions about TypeScript typing for plugins\n- Advanced composables integration\n\n**Load `references\u002Fssr-and-nuxt.md` when:**\n- Setting up server-side rendering\n- Integrating with Nuxt 3\u002F4\n- Questions about state hydration or serialization\n- SSR-related errors (wrong Pinia instance, hydration mismatch)\n- Nuxt auto-imports or configuration\n- Server-side data fetching patterns\n\n**Load `references\u002Ftesting-guide.md` when:**\n- Setting up unit tests for stores\n- Testing components that use Pinia stores\n- Need to stub actions or mock getters\n- Questions about `createTestingPinia`\n- Testing SSR stores\n- Vitest or testing framework integration\n\n**Load `references\u002Fvuex-migration.md` when:**\n- Migrating existing Vuex codebase to Pinia\n- Questions about Vuex→Pinia conversion\n- Need migration checklist or examples\n- Gradual migration strategy needed\n\n---\n\n## Complete Setup Checklist\n\n- [ ] Installed `pinia` package\n- [ ] Created Pinia instance with `createPinia()`\n- [ ] Registered with `app.use(pinia)` before mounting\n- [ ] Created stores directory (e.g., `src\u002Fstores\u002F`)\n- [ ] Defined at least one store with `defineStore()`\n- [ ] Used `storeToRefs()` when destructuring in components\n- [ ] Typed getter return values when using `this`\n- [ ] Added HMR support with `acceptHMRUpdate()` (development)\n- [ ] Configured SSR hydration (if using SSR)\n- [ ] Configured `@pinia\u002Fnuxt` (if using Nuxt)\n- [ ] Set up testing with `createTestingPinia()` (if testing)\n- [ ] All stores follow consistent naming: `use[Name]Store`\n- [ ] Verified DevTools integration works\n\n---\n\n**Questions? Issues?**\n\n1. Check official docs: https:\u002F\u002Fpinia.vuejs.org\u002F\n2. Review \"Known Issues Prevention\" section above\n3. Verify setup checklist is complete\n4. Check for TypeScript configuration issues\n5. Ensure Pinia is installed before using stores\n","# Pinia v3 - Vue State Management\n\n**Status**: Production Ready ✅\n**Last Updated**: 2025-11-11\n**Dependencies**: Vue 3 (or Vue 2.7 with @vue\u002Fcomposition-api)\n**Latest Versions**: pinia@^3.0.4, @pinia\u002Fnuxt@^0.11.2, @pinia\u002Ftesting@^1.0.2\n\n---\n\n## Quick Start (5 Minutes)\n\n### 1. Install Pinia\n\n```bash\nbun add pinia\n# or\nbun add pinia\n# or\nbun add pinia\n```\n\n**For Vue \u003C2.7 users**: Also install `@vue\u002Fcomposition-api` with `bun add @vue\u002Fcomposition-api`\n\n**Why this matters:**\n- Pinia is the official Vue state management library\n- Provides better TypeScript support than Vuex\n- Eliminates mutations and namespacing complexity\n- Full DevTools support with time-travel debugging\n\n### 2. Create and Register Pinia Instance\n\n```typescript\n\u002F\u002F main.ts\nimport { createApp } from 'vue'\nimport { createPinia } from 'pinia'\nimport App from '.\u002FApp.vue'\n\nconst pinia = createPinia()\nconst app = createApp(App)\n\napp.use(pinia)\napp.mount('#app')\n```\n\n**CRITICAL:**\n- Install Pinia BEFORE using any store\n- Call `app.use(pinia)` before mounting the app\n- Only one Pinia instance per application (unless SSR)\n\n### 3. Define Your First Store\n\n```typescript\n\u002F\u002F stores\u002Fcounter.ts\nimport { defineStore } from 'pinia'\n\nexport const useCounterStore = defineStore('counter', {\n  state: () => ({\n    count: 0,\n    name: 'Eduardo'\n  }),\n  getters: {\n    doubleCount: (state) => state.count * 2\n  },\n  actions: {\n    increment() {\n      this.count++\n    }\n  }\n})\n```\n\n### 4. Use Store in Components\n\n```vue\n\u003Cscript setup>\nimport { useCounterStore } from '@\u002Fstores\u002Fcounter'\n\nconst counter = useCounterStore()\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Cp>Count: {{ counter.count }}\u003C\u002Fp>\n    \u003Cp>Double: {{ counter.doubleCount }}\u003C\u002Fp>\n    \u003Cbutton @click=\"counter.increment\">Increment\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n```\n\n---\n\n## The Two Store Syntaxes\n\n**Load `references\u002Fstore-syntax-guide.md` for complete comparison of Option vs Setup stores.**\n\n### Quick Overview\n\nPinia supports two store definition syntaxes:\n\n**Option Stores:**\n- Similar to Vue Options API\n- Built-in `$reset()` method\n- Best for: Simpler use cases, teams familiar with Vuex\n\n**Setup Stores:**\n- Uses Composition API pattern\n- Full composables integration\n- Best for: Advanced patterns, need watchers\u002FVueUse integration\n\n**→ Load `references\u002Fstore-syntax-guide.md` for:** Complete syntax comparison, examples, choosing criteria\n\n---\n\n## State, Getters, and Actions\n\n**Load `references\u002Fstate-getters-actions.md` for complete API reference.**\n\n### Quick Reference\n\n**State:**\n- Define in `state: () => ({...})` (option) or `ref()` (setup)\n- Access directly: `store.count`\n- Mutate directly: `store.count++` or `store.$patch({...})`\n- Reset: `store.$reset()` (option stores only)\n\n**Getters:**\n- Computed properties: `getters: { double: (state) => state.count * 2 }`\n- Access other getters with `this` (must type return value)\n\n**Actions:**\n- Business logic: `actions: { increment() { this.count++ } }`\n- Can be async\n- Access other stores directly\n\n**Store Destructuring:**\n```typescript\nimport { storeToRefs } from 'pinia'\n\n\u002F\u002F ✅ For reactivity\nconst { name, count } = storeToRefs(store)\n\n\u002F\u002F ✅ Actions can destructure directly\nconst { increment } = store\n```\n\n**→ Load `references\u002Fstate-getters-actions.md` for:** Complete API, subscriptions, store composition patterns, Options API usage\n\n---\n\n## Plugins and Composables\n\n**Load `references\u002Fplugins-composables.md` for complete plugin and composables guide.**\n\n### Plugin Basics\n\n```typescript\npinia.use(({ store, options }) => {\n  \u002F\u002F Add properties to every store\n  return { customProperty: 'value' }\n})\n```\n\n### Composables Integration\n\n**Option Stores:** Limited to `useLocalStorage` style in `state()`\n**Setup Stores:** Full VueUse\u002Fcomposables support\n\n**→ Load `references\u002Fplugins-composables.md` for:** Complete plugin patterns, VueUse integration, TypeScript typing, common patterns (persistence, router, logger)\n\n---\n\n## Using Stores Outside Components\n\n### The Problem\n\nStores need the Pinia instance, which is auto-injected in components but not available in module scope.\n\n### ❌ Wrong: Accessing Store at Module Level\n\n```typescript\n\u002F\u002F router.ts\nimport { useUserStore } from '@\u002Fstores\u002Fuser'\n\n\u002F\u002F ❌ Fails: Pinia not installed yet\nconst userStore = useUserStore()\n\nrouter.beforeEach((to) => {\n  if (userStore.isLoggedIn) { \u002F* ... *\u002F }\n})\n```\n\n### ✅ Right: Accessing Store Inside Callbacks\n\n```typescript\n\u002F\u002F router.ts\nimport { useUserStore } from '@\u002Fstores\u002Fuser'\n\nrouter.beforeEach((to) => {\n  \u002F\u002F ✅ Works: Called after Pinia is installed\n  const userStore = useUserStore()\n\n  if (userStore.isLoggedIn) { \u002F* ... *\u002F }\n})\n```\n\n**Why it works**: Router guards execute AFTER `app.use(pinia)` completes.\n\n### SSR: Explicit Pinia Instance\n\n```typescript\n\u002F\u002F server-side\nexport function setupRouter(pinia) {\n  router.beforeEach((to) => {\n    const userStore = useUserStore(pinia) \u002F\u002F Pass explicitly\n  })\n}\n```\n\n---\n\n## Server-Side Rendering & Nuxt\n\n**Load `references\u002Fssr-and-nuxt.md` for complete SSR and Nuxt integration guide.**\n\n### SSR Quick Reference\n\n**State Hydration:**\n- Server: Serialize with `devalue()` (not `JSON.stringify`)\n- Client: Hydrate BEFORE calling `useStore()`\n- Critical: Call all `useStore()` BEFORE `await` in actions\n\n### Nuxt 3\u002F4 Integration\n\n```bash\nbunx nuxi@latest module add pinia\n```\n\n**Auto-imports:** `defineStore`, `storeToRefs`, `usePinia`, `acceptHMRUpdate`, all stores\n\n**→ Load `references\u002Fssr-and-nuxt.md` for:** Complete SSR patterns, Nuxt configuration, server-side data fetching, SSR pitfalls, debugging\n\n---\n\n## Testing\n\n**Load `references\u002Ftesting-guide.md` for complete testing guide.**\n\n### Testing Quick Start\n\n```typescript\nimport { setActivePinia, createPinia } from 'pinia'\n\nbeforeEach(() => {\n  setActivePinia(createPinia()) \u002F\u002F Fresh Pinia for each test\n})\n```\n\n### Component Testing\n\n```bash\nbun add -d @pinia\u002Ftesting\n```\n\n```typescript\nimport { createTestingPinia } from '@pinia\u002Ftesting'\n\nmount(Component, {\n  global: { plugins: [createTestingPinia()] }\n})\n```\n\n**→ Load `references\u002Ftesting-guide.md` for:** Complete test patterns, stubbing actions, mocking getters, async testing, SSR testing\n\n---\n\n## Hot Module Replacement (HMR)\n\n### Vite Setup\n\n```typescript\n\u002F\u002F stores\u002Fcounter.ts\nimport { defineStore, acceptHMRUpdate } from 'pinia'\n\nexport const useCounterStore = defineStore('counter', {\n  \u002F\u002F store definition\n})\n\nif (import.meta.hot) {\n  import.meta.hot.accept(acceptHMRUpdate(useCounterStore, import.meta.hot))\n}\n```\n\n### Webpack Setup\n\n```typescript\nif (import.meta.webpackHot) {\n  import.meta.webpackHot.accept(acceptHMRUpdate(useCounterStore, import.meta.webpackHot))\n}\n```\n\n**Benefits:**\n- Edit stores without full page reload\n- Preserve application state during development\n- Faster development iteration\n\n---\n\n## Options API Usage\n\nFor projects still using Options API, load complete mapper documentation.\n\n**→ Load `references\u002Fstate-getters-actions.md` for:** Complete Options API integration, all mappers (`mapStores`, `mapState`, `mapWritableState`, `mapActions`)\n\n---\n\n## Migrating from Vuex\n\n**Load `references\u002Fvuex-migration.md` for complete migration guide.**\n\n### Quick Conversion Overview\n\n**Key Changes:**\n1. Remove `namespaced` (automatic via store ID)\n2. Eliminate `mutations` (direct state mutation)\n3. Replace `commit()` with direct mutations\n4. Replace `rootState`\u002F`rootGetters` with store imports\n5. Use `store.$reset()` instead of custom clear mutations\n\n**Directory:** `store\u002Fmodules\u002F` → `stores\u002F` (each module = separate store)\n\n**→ Load `references\u002Fvuex-migration.md` for:** Complete conversion steps, component migration, checklist, gradual migration strategy\n\n---\n\n## Critical Rules\n\n### Always Do\n\n✅ Define all state properties in `state()` or return them from setup stores\n✅ Use `storeToRefs()` when destructuring state\u002Fgetters in components\n✅ Call `app.use(pinia)` BEFORE mounting the app\n✅ Return all state from setup stores (private state breaks SSR\u002FDevTools)\n✅ Call `useStore()` inside functions\u002Fcallbacks when used outside components\n✅ Use `acceptHMRUpdate()` for development HMR support\n✅ Type return values when getters use `this` to access other getters\n✅ Use `devalue` for SSR state serialization (prevents XSS)\n✅ Hydrate state BEFORE calling any `useStore()` on the client (SSR)\n✅ Call all `useStore()` BEFORE any `await` in async actions (SSR)\n\n### Never Do\n\n❌ Add state properties dynamically after store creation\n❌ Destructure store directly without `storeToRefs()` (loses reactivity)\n❌ Use arrow functions for actions (need `this` context)\n❌ Return private state in setup stores (breaks SSR\u002FDevTools\u002Fplugins)\n❌ Call `useStore()` at module top-level (before Pinia installed)\n❌ Create circular dependencies between stores (both reading each other's state)\n❌ Use `JSON.stringify()` for SSR serialization (vulnerable to XSS)\n❌ Call `useStore()` after `await` in actions (breaks SSR)\n❌ Forget to type getter return values when using `this`\n❌ Skip `beforeEach(() => setActivePinia(createPinia()))` in unit tests\n\n---\n\n## Known Issues Prevention\n\nThis skill prevents **12** documented issues:\n\n### Issue #1: Lost Reactivity from Direct Destructuring\n**Error**: State changes don't update in template after destructuring\n**Why It Happens**: JavaScript destructuring breaks Vue reactivity\n**Prevention**: Always use `storeToRefs()` for state\u002Fgetters\n\n### Issue #2: Cannot Add State Properties Dynamically\n**Error**: New properties added after store creation aren't reactive\n**Why It Happens**: Pinia needs all properties defined upfront for reactivity\n**Prevention**: Declare all properties in `state()`, even if initially `undefined`\n\n### Issue #3: Store Not Found Before Pinia Install\n**Error**: `getActivePinia()` returns undefined\n**Why It Happens**: Calling `useStore()` before `app.use(pinia)`\n**Prevention**: Call `app.use(pinia)` before mounting or accessing stores\n\n### Issue #4: Setup Store Private State Breaks SSR\n**Error**: State not serialized\u002Fhydrated correctly in SSR\n**Why It Happens**: Properties not returned from setup aren't tracked\n**Prevention**: Return ALL state properties from setup stores\n\n### Issue #5: Getters with `this` Don't Infer Types\n**Error**: TypeScript can't infer return type when getter uses `this`\n**Source**: Known TypeScript limitation with Pinia\n**Prevention**: Explicitly type return value: `getterName(): ReturnType { ... }`\n\n### Issue #6: Options API Store Suffix Confusion\n**Error**: Can't find `this.counterStore` in component\n**Why It Happens**: `mapStores()` automatically adds 'Store' suffix\n**Prevention**: Use store name + 'Store' or call `setMapStoreSuffix()`\n\n### Issue #7: Actions Called After `await` Break SSR\n**Error**: Wrong Pinia instance used in SSR, causing state pollution\n**Why It Happens**: `await` changes execution context in async functions\n**Prevention**: Call all `useStore()` before any `await` statements\n\n### Issue #8: Circular Store Dependencies Crash App\n**Error**: Maximum call stack exceeded\n**Why It Happens**: Both stores read each other's state during initialization\n**Prevention**: Use getters\u002Factions for cross-store access, not setup-time reads\n\n### Issue #9: XSS Vulnerability in SSR State Serialization\n**Error**: User input in state can execute malicious scripts\n**Why It Happens**: `JSON.stringify()` doesn't escape executable code\n**Prevention**: Use `devalue` library for safe serialization\n\n### Issue #10: HMR Doesn't Work in Development\n**Error**: Changes to store require full page reload\n**Why It Happens**: Vite\u002Fwebpack HMR not configured for store\n**Prevention**: Add `acceptHMRUpdate()` block to each store file\n\n### Issue #11: Composables Return Functions Break Option Stores\n**Error**: Store state contains non-serializable functions\n**Why It Happens**: Option stores `state()` can only return writable refs\n**Prevention**: Use setup stores for complex composables, or extract only writable state\n\n### Issue #12: State Not Reset Between Unit Tests\n**Error**: Tests affect each other, sporadic failures\n**Why It Happens**: Single Pinia instance shared across tests\n**Prevention**: `beforeEach(() => setActivePinia(createPinia()))` in test suites\n\n---\n\n## Package Versions (Verified 2025-11-21)\n\n**Core:** `pinia@^3.0.4`, `vue@^3.5.24`\n**Nuxt:** `@pinia\u002Fnuxt@^0.11.2`, `nuxt@^3.13.0`\n**Testing:** `@pinia\u002Ftesting@^1.0.2`, `vitest@^1.0.0`\n**SSR:** `devalue@^5.3.2` (for safe serialization)\n\n---\n\n## Common Patterns\n\nSee reference files for complete pattern examples:\n- **Authentication stores** → `references\u002Fstate-getters-actions.md`\n- **Persistence plugins** → `references\u002Fplugins-composables.md`\n- **Form stores** → `references\u002Fstore-syntax-guide.md` (setup store examples)\n- **Router integration** → `references\u002Fstate-getters-actions.md` (accessing stores outside components)\n\n---\n\n## Official Documentation\n\n- **Pinia**: https:\u002F\u002Fpinia.vuejs.org\u002F\n- **Getting Started**: https:\u002F\u002Fpinia.vuejs.org\u002Fgetting-started.html\n- **Core Concepts**: https:\u002F\u002Fpinia.vuejs.org\u002Fcore-concepts\u002F\n- **SSR Guide**: https:\u002F\u002Fpinia.vuejs.org\u002Fssr\u002F\n- **Nuxt Integration**: https:\u002F\u002Fpinia.vuejs.org\u002Fssr\u002Fnuxt.html\n- **Testing**: https:\u002F\u002Fpinia.vuejs.org\u002Fcookbook\u002Ftesting.html\n- **Vuex Migration**: https:\u002F\u002Fpinia.vuejs.org\u002Fcookbook\u002Fmigration-vuex.html\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fpinia\n\n---\n\n## Troubleshooting\n\n### Problem: \"getActivePinia() was called with no active Pinia\"\n**Solution**:\n1. Ensure `app.use(pinia)` is called before mounting\n2. If outside component, call `useStore()` inside callback\u002Ffunction\n3. For SSR, pass pinia instance explicitly: `useStore(pinia)`\n\n### Problem: State changes don't update in template\n**Solution**: Use `storeToRefs()` instead of direct destructuring\n\n### Problem: Getter using `this` has TypeScript errors\n**Solution**: Explicitly type the return value: `myGetter(): ReturnType { return this.otherGetter }`\n\n### Problem: $reset() not available in setup store\n**Solution**: Implement custom reset manually:\n```typescript\nfunction $reset() {\n  count.value = 0\n  name.value = ''\n}\nreturn { count, name, $reset }\n```\n\n### Problem: HMR not working for stores\n**Solution**: Add HMR acceptance block:\n```typescript\nif (import.meta.hot) {\n  import.meta.hot.accept(acceptHMRUpdate(useMyStore, import.meta.hot))\n}\n```\n\n### Problem: Tests fail intermittently\n**Solution**: Create fresh Pinia in `beforeEach()`:\n```typescript\nbeforeEach(() => {\n  setActivePinia(createPinia())\n})\n```\n\n---\n\n## When to Load References\n\n**Load `references\u002Fstore-syntax-guide.md` when:**\n- Need detailed comparison between Option and Setup store syntaxes\n- Deciding which syntax to use for a new store\n- Questions about Option vs Setup stores trade-offs\n- Need complete examples of both syntaxes\n\n**Load `references\u002Fstate-getters-actions.md` when:**\n- Need complete API reference for state, getters, or actions\n- Questions about `$patch`, `$subscribe`, or `$onAction`\n- Implementing store composition patterns\n- Using Options API mappers (`mapStores`, `mapState`, `mapActions`)\n- Accessing stores outside components (router, plugins)\n\n**Load `references\u002Fplugins-composables.md` when:**\n- Creating custom Pinia plugins\n- Integrating VueUse or other composables into stores\n- Need persistence, routing, or logging plugin patterns\n- Questions about TypeScript typing for plugins\n- Advanced composables integration\n\n**Load `references\u002Fssr-and-nuxt.md` when:**\n- Setting up server-side rendering\n- Integrating with Nuxt 3\u002F4\n- Questions about state hydration or serialization\n- SSR-related errors (wrong Pinia instance, hydration mismatch)\n- Nuxt auto-imports or configuration\n- Server-side data fetching patterns\n\n**Load `references\u002Ftesting-guide.md` when:**\n- Setting up unit tests for stores\n- Testing components that use Pinia stores\n- Need to stub actions or mock getters\n- Questions about `createTestingPinia`\n- Testing SSR stores\n- Vitest or testing framework integration\n\n**Load `references\u002Fvuex-migration.md` when:**\n- Migrating existing Vuex codebase to Pinia\n- Questions about Vuex→Pinia conversion\n- Need migration checklist or examples\n- Gradual migration strategy needed\n\n---\n\n## Complete Setup Checklist\n\n- [ ] Installed `pinia` package\n- [ ] Created Pinia instance with `createPinia()`\n- [ ] Registered with `app.use(pinia)` before mounting\n- [ ] Created stores directory (e.g., `src\u002Fstores\u002F`)\n- [ ] Defined at least one store with `defineStore()`\n- [ ] Used `storeToRefs()` when destructuring in components\n- [ ] Typed getter return values when using `this`\n- [ ] Added HMR support with `acceptHMRUpdate()` (development)\n- [ ] Configured SSR hydration (if using SSR)\n- [ ] Configured `@pinia\u002Fnuxt` (if using Nuxt)\n- [ ] Set up testing with `createTestingPinia()` (if testing)\n- [ ] All stores follow consistent naming: `use[Name]Store`\n- [ ] Verified DevTools integration works\n\n---\n\n**Questions? Issues?**\n\n1. Check official docs: https:\u002F\u002Fpinia.vuejs.org\u002F\n2. Review \"Known Issues Prevention\" section above\n3. Verify setup checklist is complete\n4. Check for TypeScript configuration issues\n5. Ensure Pinia is installed before using stores\n",{"name":5,"license":15,"metadata":24,"description":7},{"keywords":25},[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"pinia","vue state management","pinia stores","defineStore","vue 3 state","state management","getters","actions","pinia plugins","pinia ssr","nuxt pinia","vuex migration","store composition","pinia testing","setup stores","option stores","storeToRefs","mapState","mapActions","state hydration","pinia nuxt module","createPinia","useStore","pinia devtools","pinia hmr","hot module replacement","main","c475fc64e94e803b50d14a791dfee8853fbb2c5c","integrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory","https:\u002F\u002Fgithub.com\u002FElogic360","2026-11-08 22:21:22",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add Elogic360\u002Fsoftware-factory --skill pinia-v3",{"tool":64,"command":65},"bunx","bunx skills add Elogic360\u002Fsoftware-factory --skill pinia-v3",{"tool":67,"command":68},"pnpm","pnpm dlx skills add Elogic360\u002Fsoftware-factory --skill pinia-v3","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002FSKILL.md",true,[72,78,84,88,92,96,100,104,108,112,118,122,126,130,134],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"assets\u002Fexample-template.txt","ASSET","资产文件",425,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fassets\u002Fexample-template.txt",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fexample-reference.md","REFERENCE","参考文档",760,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fexample-reference.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fplugins-composables.md",9926,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fplugins-composables.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fssr-and-nuxt.md",8380,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fssr-and-nuxt.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fstate-getters-actions.md",10781,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fstate-getters-actions.md",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fstore-syntax-guide.md",6364,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fstore-syntax-guide.md",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Ftesting-guide.md",9838,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Ftesting-guide.md",{"path":105,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Fvuex-migration-checklist.md",9504,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fvuex-migration-checklist.md",{"path":109,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fvuex-migration.md",10095,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Freferences\u002Fvuex-migration.md",{"path":113,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":116,"sourceHtmlUrl":117},"scripts\u002Fapi-store-example.ts","SCRIPT","脚本",7080,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Fapi-store-example.ts",{"path":119,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":120,"sourceHtmlUrl":121},"scripts\u002Fauth-store-example.ts",5995,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Fauth-store-example.ts",{"path":123,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":124,"sourceHtmlUrl":125},"scripts\u002Fexample-script.sh",302,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Fexample-script.sh",{"path":127,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":128,"sourceHtmlUrl":129},"scripts\u002Foption-store-template.ts",2647,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Foption-store-template.ts",{"path":131,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":132,"sourceHtmlUrl":133},"scripts\u002Fpersistence-plugin.ts",8131,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Fpersistence-plugin.ts",{"path":135,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":136,"sourceHtmlUrl":137},"scripts\u002Fsetup-store-template.ts",2760,"https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fintegrations\u002Fclaude-skills-secondsky\u002Fplugins\u002Fpinia-v3\u002Fskills\u002Fpinia-v3\u002Fscripts\u002Fsetup-store-template.ts",[139,147,154,161,168,175],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":19},"01M79G206MT3J6S0GY3C45P2KV","vss-summarize-video","Use to summarize a recorded video via the LVS summarization microservice (HITL-gated) with a VLM fallback. Not for report generation or live RTSP captioning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-summarize-video\u002FSKILL.md",[],[],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":19},"01M79G1WN63PGRE8CKD47WEBQ5","vss-setup-video-analytics-api","Use to deploy the vss-video-analytics-api REST service standalone (config-source, data-log bind, Elasticsearch, optional Kafka). Not for full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-video-analytics-api\u002FSKILL.md",[],[],{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":19},"01M79G1S9F7VY3EF6H53PRP5AN","vss-setup-behavior-analytics","Use to deploy the vss-behavior-analytics service standalone (entrypoint, config-source, optional calibration). Not for the full warehouse deploy.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-setup-behavior-analytics\u002FSKILL.md",[],[],{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":19},"01M79G1N1S1Y27PFZPYMNK1MTQ","vss-search-archive","Use this skill to run top-level VSS fusion search on archived video, or to ingest video files \u002F RTSP streams for search. Do NOT use for ad-hoc visual Q&A (use vss-ask-video), live captioning (use vss-deploy-dense-captioning), or video summarization and reports (use vss-summarize-video).","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-search-archive\u002FSKILL.md",[],[],{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":19},"01M79G1H6WN0Q6C0VCAXCZX6B7","vss-query-analytics","Use this skill when reading video-analytics metrics, incidents, alerts, and sensor data via the VA-MCP server (port 9901). Not for live VLM or incident-range narrative reports.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-query-analytics\u002FSKILL.md",[],[],{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":19},"01M79G1DYPNXQS7QHZ0AAF5FX5","vss-manage-video-io-storage","Use to call the VIOS REST API (sensor list, timelines, clip extraction, snapshots, add\u002Fdelete sensors and streams). Not for VLM inference or search.","https:\u002F\u002Fgithub.com\u002FElogic360\u002Fsoftware-factory\u002Fblob\u002Fmain\u002Fskills\u002Fnvidia\u002Fvss-manage-video-io-storage\u002FSKILL.md",[],[]]