[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B284MZYF0TTYSZJ3STNTZX":3,"skill-same:01M7B284MZYF0TTYSZJ3STNTZX":51},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7B284MZYF0TTYSZJ3STNTZX","vue3-pinia-composition",null,"Vue 3 组合式 API (\u003Cscript setup>) 与 Pinia 状态管理架构规范与响应式丢失防御。","2428424081cn\u002FSkill-mcp","2428424081cn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211628073?v=4","01M7B248A88Y9AX8SMDNQXEGXP","Java-star","01M7B248B8AR86WG4JF94N28JZ",1,"MIT","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fvue3-pinia-composition\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vue3-pinia-composition\ndescription: Vue 3 组合式 API (\u003Cscript setup>) 与 Pinia 状态管理架构规范与响应式丢失防御。\n---\n\n# Vue 3 组合式 API 与 Pinia 架构规范\n\n## 1. 响应式铁律 (Reactivity Rules)\n\n1. **优先使用 `ref()`**：对于基本类型和普通对象，优先统一使用 `ref()`，避免 `reactive()` 在解构赋值时丢失响应性。\n2. **禁止直接解构 Store**：Pinia Store 状态必须使用 `storeToRefs()` 解构，Actions 可直接解构：\n   ```ts\n   const userStore = useUserStore();\n   \u002F\u002F ❌ 错误：会破坏响应性\n   const { profile, isLoggedIn } = userStore;\n   \u002F\u002F ✅ 正确：保持响应性\n   const { profile, isLoggedIn } = storeToRefs(userStore);\n   const { login, logout } = userStore; \u002F\u002F actions 保持引用\n   ```\n3. **函数式 Setup Store**：Pinia 推荐采用与 `\u003Cscript setup>` 风格一致的函数式写法：\n\n```ts\nimport { defineStore } from 'pinia';\nimport { ref, computed } from 'vue';\n\nexport const useUserStore = defineStore('user', () => {\n  const token = ref\u003Cstring | null>(null);\n  const user = ref\u003CUserProfile | null>(null);\n\n  const isAuthenticated = computed(() => !!token.value);\n\n  async function fetchCurrentUser() {\n    if (!token.value) return;\n    user.value = await api.getUser();\n  }\n\n  function clearSession() {\n    token.value = null;\n    user.value = null;\n  }\n\n  return { token, user, isAuthenticated, fetchCurrentUser, clearSession };\n});\n```\n\n## 2. 组合式函数 (Composable) 规范\n- 命名统一以 `use...` 开头（如 `usePagination.ts`, `useWebSocket.ts`）。\n- 总是返回纯对象，包含响应式 `Ref` 与操作函数。\n- 必须处理组件卸载生命周期，在 `onUnmounted()` 中清理定时器与事件监听器。\n","# Vue 3 组合式 API 与 Pinia 架构规范\n\n## 1. 响应式铁律 (Reactivity Rules)\n\n1. **优先使用 `ref()`**：对于基本类型和普通对象，优先统一使用 `ref()`，避免 `reactive()` 在解构赋值时丢失响应性。\n2. **禁止直接解构 Store**：Pinia Store 状态必须使用 `storeToRefs()` 解构，Actions 可直接解构：\n   ```ts\n   const userStore = useUserStore();\n   \u002F\u002F ❌ 错误：会破坏响应性\n   const { profile, isLoggedIn } = userStore;\n   \u002F\u002F ✅ 正确：保持响应性\n   const { profile, isLoggedIn } = storeToRefs(userStore);\n   const { login, logout } = userStore; \u002F\u002F actions 保持引用\n   ```\n3. **函数式 Setup Store**：Pinia 推荐采用与 `\u003Cscript setup>` 风格一致的函数式写法：\n\n```ts\nimport { defineStore } from 'pinia';\nimport { ref, computed } from 'vue';\n\nexport const useUserStore = defineStore('user', () => {\n  const token = ref\u003Cstring | null>(null);\n  const user = ref\u003CUserProfile | null>(null);\n\n  const isAuthenticated = computed(() => !!token.value);\n\n  async function fetchCurrentUser() {\n    if (!token.value) return;\n    user.value = await api.getUser();\n  }\n\n  function clearSession() {\n    token.value = null;\n    user.value = null;\n  }\n\n  return { token, user, isAuthenticated, fetchCurrentUser, clearSession };\n});\n```\n\n## 2. 组合式函数 (Composable) 规范\n- 命名统一以 `use...` 开头（如 `usePagination.ts`, `useWebSocket.ts`）。\n- 总是返回纯对象，包含响应式 `Ref` 与操作函数。\n- 必须处理组件卸载生命周期，在 `onUnmounted()` 中清理定时器与事件监听器。\n",{"name":5,"description":7},"main","dec8b35d55bf9c402bc2a6dd12660c86fabef2a9","skills\u002Ffrontend\u002Fvue3-pinia-composition",0,"https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp","https:\u002F\u002Fgithub.com\u002F2428424081cn","2026-08-25 01:43:58",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add 2428424081cn\u002FSkill-mcp --skill vue3-pinia-composition",{"tool":37,"command":38},"bunx","bunx skills add 2428424081cn\u002FSkill-mcp --skill vue3-pinia-composition",{"tool":40,"command":41},"pnpm","pnpm dlx skills add 2428424081cn\u002FSkill-mcp --skill vue3-pinia-composition","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fvue3-pinia-composition\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"skill.json","REFERENCE","参考文档",1061,"https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ffrontend\u002Fvue3-pinia-composition\u002Fskill.json",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7B2ARPQ51SJ1F7J6M6ACH8Y","web-page-extractor","网页正文智能提纯与清洗工具。抓取网页并剔除 HTML 标签、脚本与样式，输出高信息密度的 Markdown。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-page-extractor\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7B2ANRMF5ZQDF0ZSCZXR4WR","restful-api-standard","企业级 RESTful API 设计准则","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Frestful-api-standard\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7B2AJPJZGPP5JJ9ZHZ4PFS0","fetch-page","抓取网页并提取标题与正文长度，需要网络权限（默认策略为拒绝，须授权）。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Ffetch-page\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7B2AF7A8E436HPVQSP0G0J5","api-tester-toolkit","API 接口网络测试与耗时诊断工具包。发起 HTTP GET\u002FPOST 请求、统计响应耗时与状态码、检查响应数据。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fapi-tester-toolkit\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7B2ADT9B0QE2X4A8J0H772S","semver-bump","语义化版本号升级：major \u002F minor \u002F patch。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Futil\u002Fsemver-bump\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7B2ACMJ6T4AXWYP81T87AK1","translate","中英互译演示实现，内置小词典，用于演示翻译类 skill 的检索与调用。","https:\u002F\u002Fgithub.com\u002F2428424081cn\u002FSkill-mcp\u002Fblob\u002Fmain\u002Fskills\u002Ftext\u002Ftranslate\u002FSKILL.md",[],[]]