[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QQ7MSJ2NEV618PFAHS8TR1":3,"skill-same:01M6QQ7MSJ2NEV618PFAHS8TR1":84},{"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":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":63,"install":64,"resources":77},"01M6QQ7MSJ2NEV618PFAHS8TR1","data-fetching",null,"Data fetching and server state for the frontend with TanStack Query v5 — queries, mutations, query keys, cache invalidation, pagination and error handling — plus calling third-party HTTP APIs from the backend. Use whenever the App makes an API request, calls \u002Fapi, mutates server state, or talks to an external API.","SimaDevelopment\u002Fopsiforce","SimaDevelopment","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153810655?v=4","01M6QQ054MKBDSS43AND3FNHDK","Opsima","01M6QQ058VFT6EY7HCBVN49G8Z",43,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Fagent-config\u002Fskills\u002Fdata-fetching\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"data fetching","data","tanstack query","request","for","calls","with","error","app","query","calling","frontend","queries","use","api","server","cache","state","error handling","http","2026-11-10 10:12:30",false,"---\nname: data-fetching\ndescription: Data fetching and server state for the frontend with TanStack Query v5 — queries, mutations, query keys, cache invalidation, pagination and error handling — plus calling third-party HTTP APIs from the backend. Use whenever the App makes an API request, calls \u002Fapi, mutates server state, or talks to an external API.\n---\n\n# Data Fetching\n\n**v5 changes from v4:** `isLoading` → `isPending`, `cacheTime` → `gcTime`, `keepPreviousData` is now `placeholderData: keepPreviousData`, callbacks (`onSuccess`\u002F`onError`) removed from `useQuery` (still on `useMutation`).\n\n## When to use what\n\n| Need | Use |\n|---|---|\n| Read data in a React component | `useQuery` |\n| Read many items in parallel (dynamic count) | `useQueries` |\n| Paginated\u002Finfinite list | `useInfiniteQuery` |\n| Create \u002F update \u002F delete from a component | `useMutation` |\n| File upload | the `react-dropzone` skill (base64 JSON body — the backend has no multipart parser) |\n| Call an external API (with API key) | `fetch`\u002F`axios` from a NestJS service — never the frontend |\n\n## useQuery\n\n```tsx\nimport { useQuery } from \"@tanstack\u002Freact-query\"\n\nconst { data, isPending, error } = useQuery({\n  queryKey: [\"items\"],\n  queryFn: ({ signal }) => fetch(\"\u002Fapi\u002Fitems\", { signal }).then(r => r.json()),\n})\n\n\u002F\u002F With params (queryKey MUST include every variable queryFn uses)\nconst { data } = useQuery({\n  queryKey: [\"items\", id],\n  queryFn: ({ signal }) => fetch(`\u002Fapi\u002Fitems\u002F${id}`, { signal }).then(r => r.json()),\n  enabled: !!id,\n})\n```\n\nAlways pass `signal` to `fetch`\u002F`axios` — TanStack cancels in-flight requests when the key changes or the component unmounts. Without it, fast typing in a search box wastes bandwidth and races.\n\n## useMutation\n\n```tsx\nimport { useMutation, useQueryClient } from \"@tanstack\u002Freact-query\"\n\nconst queryClient = useQueryClient()\n\nconst createItem = useMutation({\n  mutationFn: (data: { title: string }) =>\n    fetch(\"\u002Fapi\u002Fitems\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n      body: JSON.stringify(data),\n    }).then(r => r.json()),\n  onSuccess: () => queryClient.invalidateQueries({ queryKey: [\"items\"] }),\n})\n\ncreateItem.mutate({ title: \"New item\" })\n\u002F\u002F Loading state: createItem.isPending\n```\n\n## Query keys — rules\n\n1. **Always an array** at the top level (not a string, not an object).\n2. **Include every variable** the `queryFn` reads. Missing deps cause stale-data bugs and cache collisions across users\u002Ffilters.\n3. **Hierarchical**: `[entity, id, sub-resource, { filters }]`. Lets you invalidate at any level.\n4. **JSON-serializable**: no functions, class instances, or `Symbol`s. Use `date.toISOString()` for dates.\n\n```tsx\n[\"items\"]                          \u002F\u002F list\n[\"items\", id]                      \u002F\u002F detail\n[\"items\", id, \"comments\"]          \u002F\u002F sub-resource\n[\"items\", { status: \"active\" }]    \u002F\u002F filtered list\n```\n\n## Query key factory (recommended for any app with >5 queries)\n\nCentralize keys so invalidation is type-safe and refactor-proof:\n\n```tsx\n\u002F\u002F frontend\u002Fsrc\u002Flib\u002Fquery-keys.ts\nexport const itemKeys = {\n  all: [\"items\"] as const,\n  lists: () => [...itemKeys.all, \"list\"] as const,\n  list: (filters: ItemFilters) => [...itemKeys.lists(), filters] as const,\n  details: () => [...itemKeys.all, \"detail\"] as const,\n  detail: (id: number) => [...itemKeys.details(), id] as const,\n}\n\n\u002F\u002F Usage\nuseQuery({ queryKey: itemKeys.detail(id), queryFn: () => fetchItem(id) })\nqueryClient.invalidateQueries({ queryKey: itemKeys.all })       \u002F\u002F everything\nqueryClient.invalidateQueries({ queryKey: itemKeys.detail(5) }) \u002F\u002F item 5 + its sub-resources\n```\n\nEven better — bundle queryKey + queryFn + options together with `queryOptions`:\n\n```tsx\nimport { queryOptions } from \"@tanstack\u002Freact-query\"\n\nexport const itemQueries = {\n  detail: (id: number) => queryOptions({\n    queryKey: itemKeys.detail(id),\n    queryFn: ({ signal }) => fetch(`\u002Fapi\u002Fitems\u002F${id}`, { signal }).then(r => r.json()),\n    staleTime: 60 * 1000,\n  }),\n}\n\n\u002F\u002F Usage\nconst { data } = useQuery(itemQueries.detail(5))\nqueryClient.prefetchQuery(itemQueries.detail(5))  \u002F\u002F shares the same config\n```\n\n## Cache invalidation\n\n```tsx\n\u002F\u002F Prefix match (default): all queries starting with the key\nqueryClient.invalidateQueries({ queryKey: [\"items\"] })\n\u002F\u002F Matches: [\"items\"], [\"items\", 1], [\"items\", { status: \"done\" }]\n\n\u002F\u002F Exact: only the exact key\nqueryClient.invalidateQueries({ queryKey: [\"items\"], exact: true })\n\n\u002F\u002F Predicate: custom logic\nqueryClient.invalidateQueries({\n  predicate: (q) => q.queryKey[0] === \"items\" && q.state.data?.userId === currentUserId,\n})\n\n\u002F\u002F Direct cache write (no refetch)\nqueryClient.setQueryData(itemKeys.detail(id), newData)\n```\n\nAfter a mutation, **invalidate every query the change affects** — the detail row, the list, any counts, related entities. Use `variables` (the args to `mutate()`) to know which keys to hit:\n\n```tsx\nuseMutation({\n  mutationFn: ({ id, data }) => updateItem(id, data),\n  onSuccess: (_data, { id }) => {\n    queryClient.invalidateQueries({ queryKey: itemKeys.detail(id) })\n    queryClient.invalidateQueries({ queryKey: itemKeys.lists() })\n  },\n})\n```\n\nFor optimistic updates, infinite\u002Fparallel queries, select transforms, or prefetch-on-hover, Read references\u002Fadvanced-patterns.md.\n\n## staleTime + gcTime\n\n`staleTime` = how long data is considered fresh (no background refetch on remount). Default `0` = refetch on every mount.\n`gcTime` = how long inactive (unobserved) data stays in the cache before being garbage collected. Default 5 min.\n\n| Data type | staleTime |\n|---|---|\n| Real-time (live feeds) | `0` |\n| Frequently changing (notifications) | 30s – 1m |\n| User content | 1 – 5m |\n| Reference data (categories, config) | 10 – 30m |\n| Static | `Infinity` |\n\nSet sensible defaults at the QueryClient level, override per-query:\n\n```tsx\nnew QueryClient({ defaultOptions: { queries: { staleTime: 60_000 } } })\n```\n\n## Pagination — keep previous data while loading\n\n```tsx\nimport { keepPreviousData } from \"@tanstack\u002Freact-query\"\n\nconst { data, isPlaceholderData } = useQuery({\n  queryKey: [\"items\", page],\n  queryFn: () => fetchItems(page),\n  placeholderData: keepPreviousData,  \u002F\u002F shows page N while page N+1 loads\n})\n```\n\nDim the UI with `isPlaceholderData` to signal a refresh is in flight.\n\n## Error handling\n\n`fetch` doesn't throw on 4xx\u002F5xx — wrap it so query\u002Fmutation errors flow correctly:\n\n```tsx\nasync function apiFetch\u003CT>(url: string, options?: RequestInit): Promise\u003CT> {\n  const res = await fetch(url, options)\n  if (!res.ok) {\n    const error = await res.json().catch(() => ({ message: res.statusText }))\n    throw new Error(error.message || `HTTP ${res.status}`)\n  }\n  return res.json()\n}\n\n\u002F\u002F Usage\nuseQuery({\n  queryKey: itemKeys.all,\n  queryFn: ({ signal }) => apiFetch\u003CItem[]>(\"\u002Fapi\u002Fitems\", { signal }),\n})\n```\n\nFor retry behavior: TanStack retries 3x by default on query errors. For non-retriable failures (4xx), set `retry: false` or a function that inspects the error.\n\n## Raw HTTP — fetch and axios\n\nFor internal `\u002Fapi\u002F...` calls in components, prefer `useQuery`\u002F`useMutation`. Use raw `fetch` only inside `queryFn`\u002F`mutationFn`, or in backend services.\n\n```tsx\n\u002F\u002F Built-in fetch\nawait fetch(\"\u002Fapi\u002Fitems\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ title: \"New\" }),\n})\n\n\u002F\u002F Axios — when you want interceptors, baseURL, or timeouts\nimport axios from \"axios\"\nconst api = axios.create({ baseURL: \"\u002Fapi\", timeout: 10_000 })\nconst { data } = await api.get(\"\u002Fitems\")\nawait api.post(\"\u002Fitems\", { title: \"New\" })\n```\n\nAxios supports the same `signal` for cancellation: `api.get(\"\u002Fitems\", { signal })`.\n\n## Calling external APIs — go through the backend\n\nExternal API calls must originate from the **backend**, never the frontend. Frontend code is public, so any secret in the bundle is exposed. Read the API key with the `appConfig` helper (`web-app` §App configuration).\n\n```typescript\n\u002F\u002F backend\u002Fsrc\u002Fweather\u002Fweather.service.ts\nimport { appConfig } from \"..\u002Fconfig\"\n\n@Injectable()\nexport class WeatherService {\n  async getWeather(city: string) {\n    const res = await fetch(`https:\u002F\u002Fapi.example.com\u002Fweather?q=${city}&key=${appConfig(\"WEATHER_KEY\")}`)\n    if (!res.ok) throw new BadRequestException(\"Weather API error\")\n    return res.json()\n  }\n}\n```\n\nThe frontend then calls your backend endpoint (`\u002Fapi\u002Fweather?city=...`) with `useQuery` like any other.\n\n## Common mistakes\n\n1. **`staleTime: 0` everywhere** — refetches on every mount, kills perceived performance. Match staleTime to data volatility.\n","# Data Fetching\n\n**v5 changes from v4:** `isLoading` → `isPending`, `cacheTime` → `gcTime`, `keepPreviousData` is now `placeholderData: keepPreviousData`, callbacks (`onSuccess`\u002F`onError`) removed from `useQuery` (still on `useMutation`).\n\n## When to use what\n\n| Need | Use |\n|---|---|\n| Read data in a React component | `useQuery` |\n| Read many items in parallel (dynamic count) | `useQueries` |\n| Paginated\u002Finfinite list | `useInfiniteQuery` |\n| Create \u002F update \u002F delete from a component | `useMutation` |\n| File upload | the `react-dropzone` skill (base64 JSON body — the backend has no multipart parser) |\n| Call an external API (with API key) | `fetch`\u002F`axios` from a NestJS service — never the frontend |\n\n## useQuery\n\n```tsx\nimport { useQuery } from \"@tanstack\u002Freact-query\"\n\nconst { data, isPending, error } = useQuery({\n  queryKey: [\"items\"],\n  queryFn: ({ signal }) => fetch(\"\u002Fapi\u002Fitems\", { signal }).then(r => r.json()),\n})\n\n\u002F\u002F With params (queryKey MUST include every variable queryFn uses)\nconst { data } = useQuery({\n  queryKey: [\"items\", id],\n  queryFn: ({ signal }) => fetch(`\u002Fapi\u002Fitems\u002F${id}`, { signal }).then(r => r.json()),\n  enabled: !!id,\n})\n```\n\nAlways pass `signal` to `fetch`\u002F`axios` — TanStack cancels in-flight requests when the key changes or the component unmounts. Without it, fast typing in a search box wastes bandwidth and races.\n\n## useMutation\n\n```tsx\nimport { useMutation, useQueryClient } from \"@tanstack\u002Freact-query\"\n\nconst queryClient = useQueryClient()\n\nconst createItem = useMutation({\n  mutationFn: (data: { title: string }) =>\n    fetch(\"\u002Fapi\u002Fitems\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n      body: JSON.stringify(data),\n    }).then(r => r.json()),\n  onSuccess: () => queryClient.invalidateQueries({ queryKey: [\"items\"] }),\n})\n\ncreateItem.mutate({ title: \"New item\" })\n\u002F\u002F Loading state: createItem.isPending\n```\n\n## Query keys — rules\n\n1. **Always an array** at the top level (not a string, not an object).\n2. **Include every variable** the `queryFn` reads. Missing deps cause stale-data bugs and cache collisions across users\u002Ffilters.\n3. **Hierarchical**: `[entity, id, sub-resource, { filters }]`. Lets you invalidate at any level.\n4. **JSON-serializable**: no functions, class instances, or `Symbol`s. Use `date.toISOString()` for dates.\n\n```tsx\n[\"items\"]                          \u002F\u002F list\n[\"items\", id]                      \u002F\u002F detail\n[\"items\", id, \"comments\"]          \u002F\u002F sub-resource\n[\"items\", { status: \"active\" }]    \u002F\u002F filtered list\n```\n\n## Query key factory (recommended for any app with >5 queries)\n\nCentralize keys so invalidation is type-safe and refactor-proof:\n\n```tsx\n\u002F\u002F frontend\u002Fsrc\u002Flib\u002Fquery-keys.ts\nexport const itemKeys = {\n  all: [\"items\"] as const,\n  lists: () => [...itemKeys.all, \"list\"] as const,\n  list: (filters: ItemFilters) => [...itemKeys.lists(), filters] as const,\n  details: () => [...itemKeys.all, \"detail\"] as const,\n  detail: (id: number) => [...itemKeys.details(), id] as const,\n}\n\n\u002F\u002F Usage\nuseQuery({ queryKey: itemKeys.detail(id), queryFn: () => fetchItem(id) })\nqueryClient.invalidateQueries({ queryKey: itemKeys.all })       \u002F\u002F everything\nqueryClient.invalidateQueries({ queryKey: itemKeys.detail(5) }) \u002F\u002F item 5 + its sub-resources\n```\n\nEven better — bundle queryKey + queryFn + options together with `queryOptions`:\n\n```tsx\nimport { queryOptions } from \"@tanstack\u002Freact-query\"\n\nexport const itemQueries = {\n  detail: (id: number) => queryOptions({\n    queryKey: itemKeys.detail(id),\n    queryFn: ({ signal }) => fetch(`\u002Fapi\u002Fitems\u002F${id}`, { signal }).then(r => r.json()),\n    staleTime: 60 * 1000,\n  }),\n}\n\n\u002F\u002F Usage\nconst { data } = useQuery(itemQueries.detail(5))\nqueryClient.prefetchQuery(itemQueries.detail(5))  \u002F\u002F shares the same config\n```\n\n## Cache invalidation\n\n```tsx\n\u002F\u002F Prefix match (default): all queries starting with the key\nqueryClient.invalidateQueries({ queryKey: [\"items\"] })\n\u002F\u002F Matches: [\"items\"], [\"items\", 1], [\"items\", { status: \"done\" }]\n\n\u002F\u002F Exact: only the exact key\nqueryClient.invalidateQueries({ queryKey: [\"items\"], exact: true })\n\n\u002F\u002F Predicate: custom logic\nqueryClient.invalidateQueries({\n  predicate: (q) => q.queryKey[0] === \"items\" && q.state.data?.userId === currentUserId,\n})\n\n\u002F\u002F Direct cache write (no refetch)\nqueryClient.setQueryData(itemKeys.detail(id), newData)\n```\n\nAfter a mutation, **invalidate every query the change affects** — the detail row, the list, any counts, related entities. Use `variables` (the args to `mutate()`) to know which keys to hit:\n\n```tsx\nuseMutation({\n  mutationFn: ({ id, data }) => updateItem(id, data),\n  onSuccess: (_data, { id }) => {\n    queryClient.invalidateQueries({ queryKey: itemKeys.detail(id) })\n    queryClient.invalidateQueries({ queryKey: itemKeys.lists() })\n  },\n})\n```\n\nFor optimistic updates, infinite\u002Fparallel queries, select transforms, or prefetch-on-hover, Read references\u002Fadvanced-patterns.md.\n\n## staleTime + gcTime\n\n`staleTime` = how long data is considered fresh (no background refetch on remount). Default `0` = refetch on every mount.\n`gcTime` = how long inactive (unobserved) data stays in the cache before being garbage collected. Default 5 min.\n\n| Data type | staleTime |\n|---|---|\n| Real-time (live feeds) | `0` |\n| Frequently changing (notifications) | 30s – 1m |\n| User content | 1 – 5m |\n| Reference data (categories, config) | 10 – 30m |\n| Static | `Infinity` |\n\nSet sensible defaults at the QueryClient level, override per-query:\n\n```tsx\nnew QueryClient({ defaultOptions: { queries: { staleTime: 60_000 } } })\n```\n\n## Pagination — keep previous data while loading\n\n```tsx\nimport { keepPreviousData } from \"@tanstack\u002Freact-query\"\n\nconst { data, isPlaceholderData } = useQuery({\n  queryKey: [\"items\", page],\n  queryFn: () => fetchItems(page),\n  placeholderData: keepPreviousData,  \u002F\u002F shows page N while page N+1 loads\n})\n```\n\nDim the UI with `isPlaceholderData` to signal a refresh is in flight.\n\n## Error handling\n\n`fetch` doesn't throw on 4xx\u002F5xx — wrap it so query\u002Fmutation errors flow correctly:\n\n```tsx\nasync function apiFetch\u003CT>(url: string, options?: RequestInit): Promise\u003CT> {\n  const res = await fetch(url, options)\n  if (!res.ok) {\n    const error = await res.json().catch(() => ({ message: res.statusText }))\n    throw new Error(error.message || `HTTP ${res.status}`)\n  }\n  return res.json()\n}\n\n\u002F\u002F Usage\nuseQuery({\n  queryKey: itemKeys.all,\n  queryFn: ({ signal }) => apiFetch\u003CItem[]>(\"\u002Fapi\u002Fitems\", { signal }),\n})\n```\n\nFor retry behavior: TanStack retries 3x by default on query errors. For non-retriable failures (4xx), set `retry: false` or a function that inspects the error.\n\n## Raw HTTP — fetch and axios\n\nFor internal `\u002Fapi\u002F...` calls in components, prefer `useQuery`\u002F`useMutation`. Use raw `fetch` only inside `queryFn`\u002F`mutationFn`, or in backend services.\n\n```tsx\n\u002F\u002F Built-in fetch\nawait fetch(\"\u002Fapi\u002Fitems\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ title: \"New\" }),\n})\n\n\u002F\u002F Axios — when you want interceptors, baseURL, or timeouts\nimport axios from \"axios\"\nconst api = axios.create({ baseURL: \"\u002Fapi\", timeout: 10_000 })\nconst { data } = await api.get(\"\u002Fitems\")\nawait api.post(\"\u002Fitems\", { title: \"New\" })\n```\n\nAxios supports the same `signal` for cancellation: `api.get(\"\u002Fitems\", { signal })`.\n\n## Calling external APIs — go through the backend\n\nExternal API calls must originate from the **backend**, never the frontend. Frontend code is public, so any secret in the bundle is exposed. Read the API key with the `appConfig` helper (`web-app` §App configuration).\n\n```typescript\n\u002F\u002F backend\u002Fsrc\u002Fweather\u002Fweather.service.ts\nimport { appConfig } from \"..\u002Fconfig\"\n\n@Injectable()\nexport class WeatherService {\n  async getWeather(city: string) {\n    const res = await fetch(`https:\u002F\u002Fapi.example.com\u002Fweather?q=${city}&key=${appConfig(\"WEATHER_KEY\")}`)\n    if (!res.ok) throw new BadRequestException(\"Weather API error\")\n    return res.json()\n  }\n}\n```\n\nThe frontend then calls your backend endpoint (`\u002Fapi\u002Fweather?city=...`) with `useQuery` like any other.\n\n## Common mistakes\n\n1. **`staleTime: 0` everywhere** — refetches on every mount, kills perceived performance. Match staleTime to data volatility.\n",{"name":5,"description":7},"main","c54d8e35f50ac35b3b2c7ba8d4fca2205a740cb9","agent-config\u002Fskills\u002Fdata-fetching",9,"https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce","https:\u002F\u002Fgithub.com\u002FSimaDevelopment","2026-11-05 06:13:10",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add SimaDevelopment\u002Fopsiforce --skill data-fetching",{"tool":70,"command":71},"bunx","bunx skills add SimaDevelopment\u002Fopsiforce --skill data-fetching",{"tool":73,"command":74},"pnpm","pnpm dlx skills add SimaDevelopment\u002Fopsiforce --skill data-fetching","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Fagent-config\u002Fskills\u002Fdata-fetching\u002FSKILL.md",true,[78],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fadvanced-patterns.md","REFERENCE","参考文档",3826,"https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Fagent-config\u002Fskills\u002Fdata-fetching\u002Freferences\u002Fadvanced-patterns.md",[85,120,139,160,170,196],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":100,"publishedAt":52},"01M6QQKHZFGFB6A111RW2A9WC0","figma-use","**MANDATORY prerequisite** — you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context — e.g. create\u002Fedit\u002Fdelete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-use\u002FSKILL.md",[91,94,97],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":95,"categoryName":96,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师",{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师",[101,102,45,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119],"figma use","figma","components","create","delete","tool","read","write","edit","context","auto","structure","tokens","bind","Variables","you","inspect","variants","invoke",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":131,"publishedAt":52},"01M6QQK1AMA90K6DFAVANYQ9X3","figma-use-slides","This skill helps agents use Figma's use_figma MCP tool in the Slides context. Can be used alongside figma-use which has foundational context for using the use_figma tool.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-use-slides\u002FSKILL.md",[126,129,130],{"categoryNo":127,"categoryName":128,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},[101,102,132,133,45,134,106,110,135,136,137,36,138],"figma use slides","slides","MCP","false","which","can","figma mcp",{"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":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":147,"publishedAt":52},"01M6QQJTR9QYK297WQ1X792D63","figma-use-motion","Motion \u002F animation context for the `use_figma` MCP tool — animating Figma nodes via manual keyframes, animation styles, easing, and timeline duration. Load alongside figma-use whenever a task involves adding, editing, or inspecting animation on a node.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-use-motion\u002FSKILL.md",[145,146],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},[101,102,148,45,149,134,150,106,151,152,110,153,154,155,135,156,157,158,159,36],"figma use motion","motion","Animation","node","editing","Nodes","task","keyframes","via","styles","manual","load",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":168,"publishedAt":52},"01M6QQJNZ067ZRXZ6A0QB9M6SB","figma-use-figjam","This skill helps agents use Figma's use_figma MCP tool in the FigJam context. Can be used alongside figma-use which has foundational context for using the use_figma tool.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-use-figjam\u002FSKILL.md",[166,167],{"categoryNo":92,"categoryName":93,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},[101,102,169,45,134,106,110,135,136,137,36,138],"figma use figjam",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":177,"publishedAt":52},"01M6QQJ7NEHXPE33VRVHYYM7YE","figma-swiftui","SwiftUI ↔ Figma translation. Use whenever the user mentions Swift, SwiftUI, iOS, iPhone, or iPad — in EITHER direction — translating a Figma design into SwiftUI (design → code), or pushing SwiftUI views \u002F screens \u002F tokens back into a Figma file (code → design). Triggers on phrases like 'implement this Figma design in SwiftUI', 'build this screen in Swift', 'push this SwiftUI view to Figma', 'mirror my Swift code in a Figma file', or whenever a Figma URL appears alongside `.swift` files \u002F an `.xcodeproj`. Routes to a direction-specific reference doc; loads alongside `figma-use` for the code → design path.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-swiftui\u002FSKILL.md",[176],{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},[102,178,179,180,181,182,183,184,185,186,187,188,189,190,135,191,192,193,194,195],"figma swiftui","swiftui","design","swift","code","push","doc","files","translation","back","either","iphone","ipad","screen","direction","URL","my","path",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":203,"publishedAt":52},"01M6QQJ3WZ3M90BZQ5TD305PKN","figma-shaders","**MANDATORY prerequisite** — load this skill before calling `create_shader` or `update_shader`. Use when the user asks to create, author, change, fix, or iterate on a shader effect, shader fill, custom effect, custom fill, or procedural shader in Figma.","https:\u002F\u002Fgithub.com\u002FSimaDevelopment\u002Fopsiforce\u002Fblob\u002Fmain\u002Ffrontend\u002Fopencode\u002Fpackages\u002Fplugins\u002Ffigma\u002Fskills\u002Ffigma-shaders\u002FSKILL.md",[202],{"categoryNo":98,"categoryName":99,"taxonomyType":29,"taxonomyTypeDesc":30},[204,102,205,206,104,207,208,209,210,45,211,42,135,212,159,213,214,215,216],"shaders","figma shaders","change","update","effect","user","fix","shader","procedural","fill","iterate","custom","author"]