Skip to content
Back to skills

Pinia Store

ASecurity

Use when 新增或修改 Pinia store。NOT for server 端狀態或 API handler(走 server-api),NOT for 單一元件內的區域狀態(直接用 ref/reactive)。

  • 45 stars
  • 0 votes
  • 0 copies
  • 15 views
  • Added February 7, 2026
developmentreactapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add Charles5277/nuxt-supabase-starter --skill pinia-store --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pinia Store?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pinia Store
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/charles5277-pinia-store/badge)](https://www.skillsdirectory.com/skills/charles5277-pinia-store)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pinia-store
description: >-
  Use when 新增或修改 Pinia store。NOT for server 端狀態或 API handler(走 server-api),NOT for
  單一元件內的區域狀態(直接用 ref/reactive)。
---


# Pinia Store

標準 setup store、`storeToRefs`、命名 `use<Name>Store` 照 Pinia 官方寫法即可;本 skill 只放與預設不同的慣例。

# SOP

## Phase 1 -- 判定是否需要全域 store

1. READ 讀取任務需求與 `app/stores/` 既有 store。
2. THINK 判定狀態歸屬:單一元件內的狀態用 ref/reactive,server 資料的寫入與授權轉 server-api skill;確認本次是新增、修改,還是補登入後的全域初始化。

## Phase 2 -- 撰寫與自查

1. READ 讀取 `rules/Store慣例判準.md`。
2. WRITE 依已載入規則新增或修改 `app/stores/<name>.ts`;需要登入後自動載入時,依規則建立 `app/plugins/<name>-init.client.ts`。
3. READ 回頭逐條對照已載入規則;不符就修正。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.