[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74AT8MF5G39WY3D300HFNME":3,"skill-same:01M74AT8MF5G39WY3D300HFNME":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M74AT8MF5G39WY3D300HFNME","use-static-effect-event",null,"useStaticEffectEvent hook in Supabase Studio — a userland polyfill for React's useEffectEvent. Use when you need to read latest state\u002Fprops inside a useEffect without re-triggering it, or when stale closures in Effects are causing bugs.","aicreator350\u002FaurionOFFICIELLE","aicreator350","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217751428?v=4","01M731QVHB22WCM6PDX5VFN1RV","01M731QVJ0TAD058M1SW9MY548",0,"MIT","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills-batch2\u002Fuse-static-effect-event_agents\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: use-static-effect-event\ndescription: useStaticEffectEvent hook in Supabase Studio — a userland polyfill for\n  React's useEffectEvent. Use when you need to read latest state\u002Fprops inside a useEffect\n  without re-triggering it, or when stale closures in Effects are causing bugs.\n---\n\n# useStaticEffectEvent\n\nLocated at `apps\u002Fstudio\u002Fhooks\u002FuseStaticEffectEvent.ts`.\n\nA userland polyfill for React's `useEffectEvent` (stable in React 19.2). It solves the stale closure problem: gives you a **stable callback** that always reads the latest props\u002Fstate without those values triggering Effect re-runs.\n\n## The Problem It Solves\n\nWithout it, you face two bad options inside `useEffect`:\n\n1. **Add values to dependencies** → unnecessary Effect re-runs (teardown\u002Freconnect)\n2. **Omit from dependencies** → stale closure bugs (outdated values)\n\n```tsx\n\u002F\u002F Problem: re-runs every time `theme` changes, even though we only\n\u002F\u002F want to reconnect when `roomId` changes\nuseEffect(() => {\n  const connection = createConnection(roomId)\n  connection.on('connected', () => {\n    showNotification('Connected!', theme) \u002F\u002F theme causes unwanted reconnects\n  })\n  return () => connection.disconnect()\n}, [roomId, theme])\n```\n\n## When to Use\n\n1. Read latest state\u002Fprops inside an Effect without re-triggering it\n2. Create stable callbacks that always use current values\n3. Avoid stale closures in event handlers used within Effects\n\n### Pattern 1: Sync data without re-running on every change\n\n```tsx\nconst syncApiPrivileges = useStaticEffectEvent(() => {\n  if (hasLoadedInitialData.current) return\n  if (!apiAccessStatus.isSuccess) return\n  if (!privilegesForTable) return\n\n  hasLoadedInitialData.current = true\n  setPrivileges(privilegesForTable.privileges)\n})\n\nuseEffect(() => {\n  syncApiPrivileges()\n}, [apiAccessStatus.status, syncApiPrivileges])\n```\n\n### Pattern 2: Stable callbacks for async operations\n\n```tsx\nconst exportInternal = useStaticEffectEvent(\n  async ({ bypassConfirmation }: { bypassConfirmation: boolean }) => {\n    if (!params.enabled) return\n    const { projectRef, connectionString, entity, totalRows } = params\n    \u002F\u002F complex async logic using latest params\n  }\n)\n\n\u002F\u002F Stable reference — safe to use in useCallback\nconst exportInDesiredFormat = useCallback(\n  () => exportInternal({ bypassConfirmation: false }),\n  [exportInternal]\n)\n```\n\n### Pattern 3: Infinite scroll \u002F pagination triggers\n\n```tsx\nconst fetchNext = useStaticEffectEvent(() => {\n  if (lastItem && lastItem.index >= items.length - 1 && hasNextPage && !isFetchingNextPage) {\n    fetchNextPage()\n  }\n})\n\nuseEffect(fetchNext, [lastItem, fetchNext])\n```\n\n## When NOT to Use\n\n**Don't use it to hide legitimate dependencies:**\n\n```tsx\n\u002F\u002F ❌ Bad — roomId IS a legitimate dependency; this hides a bug\nconst connect = useStaticEffectEvent(() => {\n  const connection = createConnection(roomId)\n  connection.connect()\n})\nuseEffect(() => {\n  connect()\n}, [connect]) \u002F\u002F Won't reconnect when roomId changes!\n\n\u002F\u002F ✅ roomId belongs in deps\nuseEffect(() => {\n  const connection = createConnection(roomId)\n  connection.connect()\n  return () => connection.disconnect()\n}, [roomId])\n```\n\n**Don't use it for simple event handlers outside Effects:**\n\n```tsx\n\u002F\u002F ❌ Unnecessary — not used inside an Effect\nconst handleClick = useStaticEffectEvent(() => console.log(count))\n\n\u002F\u002F ✅ Regular function is fine\nconst handleClick = () => console.log(count)\n```\n\n## Rules\n\n1. Only call the returned function **inside Effects** (`useEffect`, `useLayoutEffect`)\n2. Don't pass it to other components or hooks as a callback prop\n3. Use for **non-reactive logic only** — reads values but shouldn't trigger re-runs\n4. **Include it in dependency arrays** when used in `useEffect` (it's stable, won't cause re-runs)\n\n## How It Works\n\n```tsx\nexport const useStaticEffectEvent = \u003CCallback extends Function>(callback: Callback) => {\n  const callbackRef = useRef(callback)\n\n  useLayoutEffect(() => {\n    callbackRef.current = callback \u002F\u002F always latest\n  })\n\n  const eventFn = useCallback((...args: any) => {\n    return callbackRef.current(...args)\n  }, []) \u002F\u002F stable reference\n\n  return eventFn as unknown as Callback\n}\n```\n","# useStaticEffectEvent\n\nLocated at `apps\u002Fstudio\u002Fhooks\u002FuseStaticEffectEvent.ts`.\n\nA userland polyfill for React's `useEffectEvent` (stable in React 19.2). It solves the stale closure problem: gives you a **stable callback** that always reads the latest props\u002Fstate without those values triggering Effect re-runs.\n\n## The Problem It Solves\n\nWithout it, you face two bad options inside `useEffect`:\n\n1. **Add values to dependencies** → unnecessary Effect re-runs (teardown\u002Freconnect)\n2. **Omit from dependencies** → stale closure bugs (outdated values)\n\n```tsx\n\u002F\u002F Problem: re-runs every time `theme` changes, even though we only\n\u002F\u002F want to reconnect when `roomId` changes\nuseEffect(() => {\n  const connection = createConnection(roomId)\n  connection.on('connected', () => {\n    showNotification('Connected!', theme) \u002F\u002F theme causes unwanted reconnects\n  })\n  return () => connection.disconnect()\n}, [roomId, theme])\n```\n\n## When to Use\n\n1. Read latest state\u002Fprops inside an Effect without re-triggering it\n2. Create stable callbacks that always use current values\n3. Avoid stale closures in event handlers used within Effects\n\n### Pattern 1: Sync data without re-running on every change\n\n```tsx\nconst syncApiPrivileges = useStaticEffectEvent(() => {\n  if (hasLoadedInitialData.current) return\n  if (!apiAccessStatus.isSuccess) return\n  if (!privilegesForTable) return\n\n  hasLoadedInitialData.current = true\n  setPrivileges(privilegesForTable.privileges)\n})\n\nuseEffect(() => {\n  syncApiPrivileges()\n}, [apiAccessStatus.status, syncApiPrivileges])\n```\n\n### Pattern 2: Stable callbacks for async operations\n\n```tsx\nconst exportInternal = useStaticEffectEvent(\n  async ({ bypassConfirmation }: { bypassConfirmation: boolean }) => {\n    if (!params.enabled) return\n    const { projectRef, connectionString, entity, totalRows } = params\n    \u002F\u002F complex async logic using latest params\n  }\n)\n\n\u002F\u002F Stable reference — safe to use in useCallback\nconst exportInDesiredFormat = useCallback(\n  () => exportInternal({ bypassConfirmation: false }),\n  [exportInternal]\n)\n```\n\n### Pattern 3: Infinite scroll \u002F pagination triggers\n\n```tsx\nconst fetchNext = useStaticEffectEvent(() => {\n  if (lastItem && lastItem.index >= items.length - 1 && hasNextPage && !isFetchingNextPage) {\n    fetchNextPage()\n  }\n})\n\nuseEffect(fetchNext, [lastItem, fetchNext])\n```\n\n## When NOT to Use\n\n**Don't use it to hide legitimate dependencies:**\n\n```tsx\n\u002F\u002F ❌ Bad — roomId IS a legitimate dependency; this hides a bug\nconst connect = useStaticEffectEvent(() => {\n  const connection = createConnection(roomId)\n  connection.connect()\n})\nuseEffect(() => {\n  connect()\n}, [connect]) \u002F\u002F Won't reconnect when roomId changes!\n\n\u002F\u002F ✅ roomId belongs in deps\nuseEffect(() => {\n  const connection = createConnection(roomId)\n  connection.connect()\n  return () => connection.disconnect()\n}, [roomId])\n```\n\n**Don't use it for simple event handlers outside Effects:**\n\n```tsx\n\u002F\u002F ❌ Unnecessary — not used inside an Effect\nconst handleClick = useStaticEffectEvent(() => console.log(count))\n\n\u002F\u002F ✅ Regular function is fine\nconst handleClick = () => console.log(count)\n```\n\n## Rules\n\n1. Only call the returned function **inside Effects** (`useEffect`, `useLayoutEffect`)\n2. Don't pass it to other components or hooks as a callback prop\n3. Use for **non-reactive logic only** — reads values but shouldn't trigger re-runs\n4. **Include it in dependency arrays** when used in `useEffect` (it's stable, won't cause re-runs)\n\n## How It Works\n\n```tsx\nexport const useStaticEffectEvent = \u003CCallback extends Function>(callback: Callback) => {\n  const callbackRef = useRef(callback)\n\n  useLayoutEffect(() => {\n    callbackRef.current = callback \u002F\u002F always latest\n  })\n\n  const eventFn = useCallback((...args: any) => {\n    return callbackRef.current(...args)\n  }, []) \u002F\u002F stable reference\n\n  return eventFn as unknown as Callback\n}\n```\n",{"name":5,"description":7},"main","5593cf3c72898ea9fc67225d452fe38f866ba6dd",".claude\u002F_archive\u002Fskills-batch2\u002Fuse-static-effect-event_agents","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE","https:\u002F\u002Fgithub.com\u002Faicreator350","2026-05-18 03:39:30",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add aicreator350\u002FaurionOFFICIELLE --skill use-static-effect-event",{"tool":35,"command":36},"bunx","bunx skills add aicreator350\u002FaurionOFFICIELLE --skill use-static-effect-event",{"tool":38,"command":39},"pnpm","pnpm dlx skills add aicreator350\u002FaurionOFFICIELLE --skill use-static-effect-event","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002F.claude\u002F_archive\u002Fskills-batch2\u002Fuse-static-effect-event_agents\u002FSKILL.md",true,[],[44,53,60,67,74,81],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":48,"licenseFileUrl":49,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M74CAJWR9WB6DX1HF2V461Y0","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M74CAFWC2H75GJ81B39C9RSW","web-design-guidelines","Review UI code for Web Interface Guidelines compliance. Use when asked to \"review my UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check my site against best practices\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M74CA9N2HTGCKJ93AE9NQMHA","vercel-react-view-transitions","Guide for implementing smooth, native-feeling animations using React's View Transition API (`\u003CViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter\u002Fexit of components, animate list reorder, implement directional (forward\u002Fback) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-view-transitions\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M74CA364D4EVDXZZQRVK1Z73","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M74C9YQZX1GVS18V0AYCYPZE","vercel-composition-patterns","React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-composition-patterns\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M74C9SEYD6F764Q1JACZX3A6","vercel-cli-with-tokens","Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. \"deploy to vercel\", \"set up vercel\", \"add environment variables to vercel\".","https:\u002F\u002Fgithub.com\u002Faicreator350\u002FaurionOFFICIELLE\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-cli-with-tokens\u002FSKILL.md",[],[]]