[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ARFJPM4GT3Z02FYS2FPVPF":3,"skill-same:01M7ARFJPM4GT3Z02FYS2FPVPF":58},{"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":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ARFJPM4GT3Z02FYS2FPVPF","react-component-performance",null,"Diagnose slow React components and suggest targeted performance fixes.","GongYuanCaiJi\u002Fdsh-claude-code-templates","GongYuanCaiJi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F129952120?v=4","01M7AK39Q4W3VPF7C1K8M58BFX","劉昱廷 Yu-Ting Liu","01M7AK39QPS2RAJKRQY0EPQJPZ",0,"MIT","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Freact-component-performance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: react-component-performance\ndescription: Diagnose slow React components and suggest targeted performance fixes.\nrisk: safe\nsource: \"Dimillian\u002FSkills (MIT)\"\ndate_added: \"2026-03-25\"\n---\n\n# React Component Performance\n\n## Overview\n\nIdentify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior.\n\n## When to Use\n\n- When the user asks to profile or improve a slow React component.\n- When you need to reduce re-renders, list lag, or expensive render work in React UI.\n\n## Workflow\n\n1. Reproduce or describe the slowdown.\n2. Identify what triggers re-renders (state updates, props churn, effects).\n3. Isolate fast-changing state from heavy subtrees.\n4. Stabilize props and handlers; memoize where it pays off.\n5. Reduce expensive work (computation, DOM size, list length).\n6. **Validate**: open React DevTools Profiler → record the interaction → inspect the Flamegraph for components rendering longer than ~16 ms → compare against a pre-optimization baseline recording.\n\n## Checklist\n\n- Measure: use React DevTools Profiler or log renders; capture baseline.\n- Find churn: identify state updated on a timer, scroll, input, or animation.\n- Split: move ticking state into a child; keep heavy lists static.\n- Memoize: wrap leaf rows with `memo` only when props are stable.\n- Stabilize props: use `useCallback`\u002F`useMemo` for handlers and derived values.\n- Avoid derived work in render: precompute, or compute inside memoized helpers.\n- Control list size: window\u002Fvirtualize long lists; avoid rendering hidden items.\n- Keys: ensure stable keys; avoid index when order can change.\n- Effects: verify dependency arrays; avoid effects that re-run on every render.\n- Style\u002Flayout: watch for expensive layout thrash or large Markdown\u002Fdiff renders.\n\n## Optimization Patterns\n\n### Isolate ticking state\n\nMove a timer or animation counter into a child so the parent list never re-renders on each tick.\n\n```tsx\n\u002F\u002F ❌ Before – entire parent (and list) re-renders every second\nfunction Dashboard({ items }: { items: Item[] }) {\n  const [tick, setTick] = useState(0);\n  useEffect(() => {\n    const id = setInterval(() => setTick(t => t + 1), 1000);\n    return () => clearInterval(id);\n  }, []);\n  return (\n    \u003C>\n      \u003CClock tick={tick} \u002F>\n      \u003CExpensiveList items={items} \u002F> {\u002F* re-renders every second *\u002F}\n    \u003C\u002F>\n  );\n}\n\n\u002F\u002F ✅ After – only \u003CClock> re-renders; list is untouched\nfunction Clock() {\n  const [tick, setTick] = useState(0);\n  useEffect(() => {\n    const id = setInterval(() => setTick(t => t + 1), 1000);\n    return () => clearInterval(id);\n  }, []);\n  return \u003Cspan>{tick}s\u003C\u002Fspan>;\n}\n\nfunction Dashboard({ items }: { items: Item[] }) {\n  return (\n    \u003C>\n      \u003CClock \u002F>\n      \u003CExpensiveList items={items} \u002F>\n    \u003C\u002F>\n  );\n}\n```\n\n### Stabilize callbacks with `useCallback` + `memo`\n\n```tsx\n\u002F\u002F ❌ Before – new handler reference on every render busts Row memo\nfunction List({ items }: { items: Item[] }) {\n  const handleClick = (id: string) => console.log(id); \u002F\u002F new ref each render\n  return items.map(item => \u003CRow key={item.id} item={item} onClick={handleClick} \u002F>);\n}\n\n\u002F\u002F ✅ After – stable handler; Row only re-renders when its own item changes\nconst Row = memo(({ item, onClick }: RowProps) => (\n  \u003Cli onClick={() => onClick(item.id)}>{item.name}\u003C\u002Fli>\n));\n\nfunction List({ items }: { items: Item[] }) {\n  const handleClick = useCallback((id: string) => console.log(id), []);\n  return items.map(item => \u003CRow key={item.id} item={item} onClick={handleClick} \u002F>);\n}\n```\n\n### Prefer derived data outside render\n\n```tsx\n\u002F\u002F ❌ Before – recomputes on every render\nfunction Summary({ orders }: { orders: Order[] }) {\n  const total = orders.reduce((sum, o) => sum + o.amount, 0); \u002F\u002F runs every render\n  return \u003Cp>Total: {total}\u003C\u002Fp>;\n}\n\n\u002F\u002F ✅ After – recomputes only when orders changes\nfunction Summary({ orders }: { orders: Order[] }) {\n  const total = useMemo(() => orders.reduce((sum, o) => sum + o.amount, 0), [orders]);\n  return \u003Cp>Total: {total}\u003C\u002Fp>;\n}\n```\n\n### Additional patterns\n\n- **Split rows**: extract list rows into memoized components with narrow props.\n- **Defer heavy rendering**: lazy-render or collapse expensive content until expanded.\n\n## Profiling Validation Steps\n\n1. Open **React DevTools → Profiler** tab.\n2. Click **Record**, perform the slow interaction, then **Stop**.\n3. Switch to **Flamegraph** view; any bar labeled with a component and time > ~16 ms is a candidate.\n4. Use **Ranked chart** to sort by self render time and target the top offenders.\n5. Apply one optimization at a time, re-record, and compare render counts and durations against the baseline.\n\n## Example Reference\n\nLoad `references\u002Fexamples.md` when the user wants a concrete refactor example.\n","# React Component Performance\n\n## Overview\n\nIdentify render hotspots, isolate expensive updates, and apply targeted optimizations without changing UI behavior.\n\n## When to Use\n\n- When the user asks to profile or improve a slow React component.\n- When you need to reduce re-renders, list lag, or expensive render work in React UI.\n\n## Workflow\n\n1. Reproduce or describe the slowdown.\n2. Identify what triggers re-renders (state updates, props churn, effects).\n3. Isolate fast-changing state from heavy subtrees.\n4. Stabilize props and handlers; memoize where it pays off.\n5. Reduce expensive work (computation, DOM size, list length).\n6. **Validate**: open React DevTools Profiler → record the interaction → inspect the Flamegraph for components rendering longer than ~16 ms → compare against a pre-optimization baseline recording.\n\n## Checklist\n\n- Measure: use React DevTools Profiler or log renders; capture baseline.\n- Find churn: identify state updated on a timer, scroll, input, or animation.\n- Split: move ticking state into a child; keep heavy lists static.\n- Memoize: wrap leaf rows with `memo` only when props are stable.\n- Stabilize props: use `useCallback`\u002F`useMemo` for handlers and derived values.\n- Avoid derived work in render: precompute, or compute inside memoized helpers.\n- Control list size: window\u002Fvirtualize long lists; avoid rendering hidden items.\n- Keys: ensure stable keys; avoid index when order can change.\n- Effects: verify dependency arrays; avoid effects that re-run on every render.\n- Style\u002Flayout: watch for expensive layout thrash or large Markdown\u002Fdiff renders.\n\n## Optimization Patterns\n\n### Isolate ticking state\n\nMove a timer or animation counter into a child so the parent list never re-renders on each tick.\n\n```tsx\n\u002F\u002F ❌ Before – entire parent (and list) re-renders every second\nfunction Dashboard({ items }: { items: Item[] }) {\n  const [tick, setTick] = useState(0);\n  useEffect(() => {\n    const id = setInterval(() => setTick(t => t + 1), 1000);\n    return () => clearInterval(id);\n  }, []);\n  return (\n    \u003C>\n      \u003CClock tick={tick} \u002F>\n      \u003CExpensiveList items={items} \u002F> {\u002F* re-renders every second *\u002F}\n    \u003C\u002F>\n  );\n}\n\n\u002F\u002F ✅ After – only \u003CClock> re-renders; list is untouched\nfunction Clock() {\n  const [tick, setTick] = useState(0);\n  useEffect(() => {\n    const id = setInterval(() => setTick(t => t + 1), 1000);\n    return () => clearInterval(id);\n  }, []);\n  return \u003Cspan>{tick}s\u003C\u002Fspan>;\n}\n\nfunction Dashboard({ items }: { items: Item[] }) {\n  return (\n    \u003C>\n      \u003CClock \u002F>\n      \u003CExpensiveList items={items} \u002F>\n    \u003C\u002F>\n  );\n}\n```\n\n### Stabilize callbacks with `useCallback` + `memo`\n\n```tsx\n\u002F\u002F ❌ Before – new handler reference on every render busts Row memo\nfunction List({ items }: { items: Item[] }) {\n  const handleClick = (id: string) => console.log(id); \u002F\u002F new ref each render\n  return items.map(item => \u003CRow key={item.id} item={item} onClick={handleClick} \u002F>);\n}\n\n\u002F\u002F ✅ After – stable handler; Row only re-renders when its own item changes\nconst Row = memo(({ item, onClick }: RowProps) => (\n  \u003Cli onClick={() => onClick(item.id)}>{item.name}\u003C\u002Fli>\n));\n\nfunction List({ items }: { items: Item[] }) {\n  const handleClick = useCallback((id: string) => console.log(id), []);\n  return items.map(item => \u003CRow key={item.id} item={item} onClick={handleClick} \u002F>);\n}\n```\n\n### Prefer derived data outside render\n\n```tsx\n\u002F\u002F ❌ Before – recomputes on every render\nfunction Summary({ orders }: { orders: Order[] }) {\n  const total = orders.reduce((sum, o) => sum + o.amount, 0); \u002F\u002F runs every render\n  return \u003Cp>Total: {total}\u003C\u002Fp>;\n}\n\n\u002F\u002F ✅ After – recomputes only when orders changes\nfunction Summary({ orders }: { orders: Order[] }) {\n  const total = useMemo(() => orders.reduce((sum, o) => sum + o.amount, 0), [orders]);\n  return \u003Cp>Total: {total}\u003C\u002Fp>;\n}\n```\n\n### Additional patterns\n\n- **Split rows**: extract list rows into memoized components with narrow props.\n- **Defer heavy rendering**: lazy-render or collapse expensive content until expanded.\n\n## Profiling Validation Steps\n\n1. Open **React DevTools → Profiler** tab.\n2. Click **Record**, perform the slow interaction, then **Stop**.\n3. Switch to **Flamegraph** view; any bar labeled with a component and time > ~16 ms is a candidate.\n4. Use **Ranked chart** to sort by self render time and target the top offenders.\n5. Apply one optimization at a time, re-record, and compare render counts and durations against the baseline.\n\n## Example Reference\n\nLoad `references\u002Fexamples.md` when the user wants a concrete refactor example.\n",{"name":5,"risk":24,"source":25,"date_added":26,"description":7},"safe","Dimillian\u002FSkills (MIT)","2026-03-25","main","51493f354fd03e3f941d4df7fd64c0b8c7a2632d","skills\u002Fweb-development\u002Freact-component-performance","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi","漏洞研究、根因分析、黑箱測試｜做 AI agent 工具｜Vulnerability research, root-cause analysis, AI agent tooling","2026-08-16 02:24:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill react-component-performance",{"tool":40,"command":41},"bunx","bunx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill react-component-performance",{"tool":43,"command":44},"pnpm","pnpm dlx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill react-component-performance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Freact-component-performance\u002FSKILL.md",true,[48,54],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"agents\u002Fopenai.yaml","REFERENCE","参考文档",238,"https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Freact-component-performance\u002Fagents\u002Fopenai.yaml",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",2381,"https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fweb-development\u002Freact-component-performance\u002Freferences\u002Fexamples.md",[59,66,75,82,89,96],{"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},"01M7ARMYTZ5D4B7N5SKFXV345V","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\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":70,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7ARMX1BVNEAR98SBANMDF2V","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7ARMPR4RQ417MG1HMPGNQHH","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7ARMHBERDMKGDMV7K6MQ6YP","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7ARME0A7KFT330Q2H25HE2B","slack-automation","Automate Slack workspace operations including messaging, search, channel management, and reaction workflows through Composio's Slack toolkit.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fslack-automation\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7ARM8D87V18WDG0GEZS11ZT","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[],[]]