[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DS3CH2EAZBFZ7AZFV0TKCF":3,"skill-same:01M6DS3CH2EAZBFZ7AZFV0TKCF":98},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6DS3CH2EAZBFZ7AZFV0TKCF","senior-frontend",null,"Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.","zhangzhang-111-i\u002Fclaude-skills111","zhangzhang-111-i","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F251344927?v=4","01M6DRBP4NCM1ZCHTT0FW0SQHD","lixiying","01M6DRBPAMFDJSGQ69XPK9KM9J",4,"MIT","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"senior frontend","frontend","analyzing","scaffolding","next","frontend development","use","projects","Next.js","Tailwind","applications","code","development","code quality","react components","react","components","performance","typescript","css","2026-11-10 10:12:30",false,"---\nname: \"senior-frontend\"\ndescription: Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.\n---\n\n# Senior Frontend\n\nFrontend development patterns, performance optimization, and automation tools for React\u002FNext.js applications.\n\n## Table of Contents\n\n- [Project Scaffolding](#project-scaffolding)\n- [Component Generation](#component-generation)\n- [Bundle Analysis](#bundle-analysis)\n- [React Patterns](#react-patterns)\n- [Next.js Optimization](#nextjs-optimization)\n- [Accessibility and Testing](#accessibility-and-testing)\n\n---\n\n## Project Scaffolding\n\nGenerate a new Next.js or React project with TypeScript, Tailwind CSS, and best practice configurations.\n\n### Workflow: Create New Frontend Project\n\n1. Run the scaffolder with your project name and template:\n   ```bash\n   python scripts\u002Ffrontend_scaffolder.py my-app --template nextjs\n   ```\n\n2. Add optional features (auth, api, forms, testing, storybook):\n   ```bash\n   python scripts\u002Ffrontend_scaffolder.py dashboard --template nextjs --features auth,api\n   ```\n\n3. Navigate to the project and install dependencies:\n   ```bash\n   cd my-app && npm install\n   ```\n\n4. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\n### Scaffolder Options\n\n| Option | Description |\n|--------|-------------|\n| `--template nextjs` | Next.js 14+ with App Router and Server Components |\n| `--template react` | React + Vite with TypeScript |\n| `--features auth` | Add NextAuth.js authentication |\n| `--features api` | Add React Query + API client |\n| `--features forms` | Add React Hook Form + Zod validation |\n| `--features testing` | Add Vitest + Testing Library |\n| `--dry-run` | Preview files without creating them |\n\n### Generated Structure (Next.js)\n\n```\nmy-app\u002F\n├── app\u002F\n│   ├── layout.tsx        # Root layout with fonts\n│   ├── page.tsx          # Home page\n│   ├── globals.css       # Tailwind + CSS variables\n│   └── api\u002Fhealth\u002Froute.ts\n├── components\u002F\n│   ├── ui\u002F               # Button, Input, Card\n│   └── layout\u002F           # Header, Footer, Sidebar\n├── hooks\u002F                # useDebounce, useLocalStorage\n├── lib\u002F                  # utils (cn), constants\n├── types\u002F                # TypeScript interfaces\n├── tailwind.config.ts\n├── next.config.js\n└── package.json\n```\n\n---\n\n## Component Generation\n\nGenerate React components with TypeScript, tests, and Storybook stories.\n\n### Workflow: Create a New Component\n\n1. Generate a client component:\n   ```bash\n   python scripts\u002Fcomponent_generator.py Button --dir src\u002Fcomponents\u002Fui\n   ```\n\n2. Generate a server component:\n   ```bash\n   python scripts\u002Fcomponent_generator.py ProductCard --type server\n   ```\n\n3. Generate with test and story files:\n   ```bash\n   python scripts\u002Fcomponent_generator.py UserProfile --with-test --with-story\n   ```\n\n4. Generate a custom hook:\n   ```bash\n   python scripts\u002Fcomponent_generator.py FormValidation --type hook\n   ```\n\n### Generator Options\n\n| Option | Description |\n|--------|-------------|\n| `--type client` | Client component with 'use client' (default) |\n| `--type server` | Async server component |\n| `--type hook` | Custom React hook |\n| `--with-test` | Include test file |\n| `--with-story` | Include Storybook story |\n| `--flat` | Create in output dir without subdirectory |\n| `--dry-run` | Preview without creating files |\n\n### Generated Component Example\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { cn } from '@\u002Flib\u002Futils';\n\ninterface ButtonProps {\n  className?: string;\n  children?: React.ReactNode;\n}\n\nexport function Button({ className, children }: ButtonProps) {\n  return (\n    \u003Cdiv className={cn('', className)}>\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## Bundle Analysis\n\nAnalyze package.json and project structure for bundle optimization opportunities.\n\n### Workflow: Optimize Bundle Size\n\n1. Run the analyzer on your project:\n   ```bash\n   python scripts\u002Fbundle_analyzer.py \u002Fpath\u002Fto\u002Fproject\n   ```\n\n2. Review the health score and issues:\n   ```\n   Bundle Health Score: 75\u002F100 (C)\n\n   HEAVY DEPENDENCIES:\n     moment (290KB)\n       Alternative: date-fns (12KB) or dayjs (2KB)\n\n     lodash (71KB)\n       Alternative: lodash-es with tree-shaking\n   ```\n\n3. Apply the recommended fixes by replacing heavy dependencies.\n\n4. Re-run with verbose mode to check import patterns:\n   ```bash\n   python scripts\u002Fbundle_analyzer.py . --verbose\n   ```\n\n### Bundle Score Interpretation\n\n| Score | Grade | Action |\n|-------|-------|--------|\n| 90-100 | A | Bundle is well-optimized |\n| 80-89 | B | Minor optimizations available |\n| 70-79 | C | Replace heavy dependencies |\n| 60-69 | D | Multiple issues need attention |\n| 0-59 | F | Critical bundle size problems |\n\n### Heavy Dependencies Detected\n\nThe analyzer identifies these common heavy packages:\n\n| Package | Size | Alternative |\n|---------|------|-------------|\n| moment | 290KB | date-fns (12KB) or dayjs (2KB) |\n| lodash | 71KB | lodash-es with tree-shaking |\n| axios | 14KB | Native fetch or ky (3KB) |\n| jquery | 87KB | Native DOM APIs |\n| @mui\u002Fmaterial | Large | shadcn\u002Fui or Radix UI |\n\n---\n\n## React Patterns\n\nReference: `references\u002Freact_patterns.md`\n\n### Compound Components\n\nShare state between related components:\n\n```tsx\nconst Tabs = ({ children }) => {\n  const [active, setActive] = useState(0);\n  return (\n    \u003CTabsContext.Provider value={{ active, setActive }}>\n      {children}\n    \u003C\u002FTabsContext.Provider>\n  );\n};\n\nTabs.List = TabList;\nTabs.Panel = TabPanel;\n\n\u002F\u002F Usage\n\u003CTabs>\n  \u003CTabs.List>\n    \u003CTabs.Tab>One\u003C\u002FTabs.Tab>\n    \u003CTabs.Tab>Two\u003C\u002FTabs.Tab>\n  \u003C\u002FTabs.List>\n  \u003CTabs.Panel>Content 1\u003C\u002FTabs.Panel>\n  \u003CTabs.Panel>Content 2\u003C\u002FTabs.Panel>\n\u003C\u002FTabs>\n```\n\n### Custom Hooks\n\nExtract reusable logic:\n\n```tsx\nfunction useDebounce\u003CT>(value: T, delay = 500): T {\n  const [debouncedValue, setDebouncedValue] = useState(value);\n\n  useEffect(() => {\n    const timer = setTimeout(() => setDebouncedValue(value), delay);\n    return () => clearTimeout(timer);\n  }, [value, delay]);\n\n  return debouncedValue;\n}\n\n\u002F\u002F Usage\nconst debouncedSearch = useDebounce(searchTerm, 300);\n```\n\n### Render Props\n\nShare rendering logic:\n\n```tsx\nfunction DataFetcher({ url, render }) {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n\n  useEffect(() => {\n    fetch(url).then(r => r.json()).then(setData).finally(() => setLoading(false));\n  }, [url]);\n\n  return render({ data, loading });\n}\n\n\u002F\u002F Usage\n\u003CDataFetcher\n  url=\"\u002Fapi\u002Fusers\"\n  render={({ data, loading }) =>\n    loading ? \u003CSpinner \u002F> : \u003CUserList users={data} \u002F>\n  }\n\u002F>\n```\n\n---\n\n## Next.js Optimization\n\nReference: `references\u002Fnextjs_optimization_guide.md`\n\n### Server vs Client Components\n\nUse Server Components by default. Add 'use client' only when you need:\n- Event handlers (onClick, onChange)\n- State (useState, useReducer)\n- Effects (useEffect)\n- Browser APIs\n\n```tsx\n\u002F\u002F Server Component (default) - no 'use client'\nasync function ProductPage({ params }) {\n  const product = await getProduct(params.id);  \u002F\u002F Server-side fetch\n\n  return (\n    \u003Cdiv>\n      \u003Ch1>{product.name}\u003C\u002Fh1>\n      \u003CAddToCartButton productId={product.id} \u002F>  {\u002F* Client component *\u002F}\n    \u003C\u002Fdiv>\n  );\n}\n\n\u002F\u002F Client Component\n'use client';\nfunction AddToCartButton({ productId }) {\n  const [adding, setAdding] = useState(false);\n  return \u003Cbutton onClick={() => addToCart(productId)}>Add\u003C\u002Fbutton>;\n}\n```\n\n### Image Optimization\n\n```tsx\nimport Image from 'next\u002Fimage';\n\n\u002F\u002F Above the fold - load immediately\n\u003CImage\n  src=\"\u002Fhero.jpg\"\n  alt=\"Hero\"\n  width={1200}\n  height={600}\n  priority\n\u002F>\n\n\u002F\u002F Responsive image with fill\n\u003Cdiv className=\"relative aspect-video\">\n  \u003CImage\n    src=\"\u002Fproduct.jpg\"\n    alt=\"Product\"\n    fill\n    sizes=\"(max-width: 768px) 100vw, 50vw\"\n    className=\"object-cover\"\n  \u002F>\n\u003C\u002Fdiv>\n```\n\n### Data Fetching Patterns\n\n```tsx\n\u002F\u002F Parallel fetching\nasync function Dashboard() {\n  const [user, stats] = await Promise.all([\n    getUser(),\n    getStats()\n  ]);\n  return \u003Cdiv>...\u003C\u002Fdiv>;\n}\n\n\u002F\u002F Streaming with Suspense\nasync function ProductPage({ params }) {\n  return (\n    \u003Cdiv>\n      \u003CProductDetails id={params.id} \u002F>\n      \u003CSuspense fallback={\u003CReviewsSkeleton \u002F>}>\n        \u003CReviews productId={params.id} \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## Accessibility and Testing\n\nReference: `references\u002Ffrontend_best_practices.md`\n\n### Accessibility Checklist\n\n1. **Semantic HTML**: Use proper elements (`\u003Cbutton>`, `\u003Cnav>`, `\u003Cmain>`)\n2. **Keyboard Navigation**: All interactive elements focusable\n3. **ARIA Labels**: Provide labels for icons and complex widgets\n4. **Color Contrast**: Minimum 4.5:1 for normal text\n5. **Focus Indicators**: Visible focus states\n\n```tsx\n\u002F\u002F Accessible button\n\u003Cbutton\n  type=\"button\"\n  aria-label=\"Close dialog\"\n  onClick={onClose}\n  className=\"focus-visible:ring-2 focus-visible:ring-blue-500\"\n>\n  \u003CXIcon aria-hidden=\"true\" \u002F>\n\u003C\u002Fbutton>\n\n\u002F\u002F Skip link for keyboard users\n\u003Ca href=\"#main-content\" className=\"sr-only focus:not-sr-only\">\n  Skip to main content\n\u003C\u002Fa>\n```\n\n### Testing Strategy\n\n```tsx\n\u002F\u002F Component test with React Testing Library\nimport { render, screen } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\n\ntest('button triggers action on click', async () => {\n  const onClick = vi.fn();\n  render(\u003CButton onClick={onClick}>Click me\u003C\u002FButton>);\n\n  await userEvent.click(screen.getByRole('button'));\n  expect(onClick).toHaveBeenCalledTimes(1);\n});\n\n\u002F\u002F Test accessibility\ntest('dialog is accessible', async () => {\n  render(\u003CDialog open={true} title=\"Confirm\" \u002F>);\n\n  expect(screen.getByRole('dialog')).toBeInTheDocument();\n  expect(screen.getByRole('dialog')).toHaveAttribute('aria-labelledby');\n});\n```\n\n---\n\n## Quick Reference\n\n### Common Next.js Config\n\n```js\n\u002F\u002F next.config.js\nconst nextConfig = {\n  images: {\n    remotePatterns: [{ hostname: \"cdnexamplecom\" }],\n    formats: ['image\u002Favif', 'image\u002Fwebp'],\n  },\n  experimental: {\n    optimizePackageImports: ['lucide-react', '@heroicons\u002Freact'],\n  },\n};\n```\n\n### Tailwind CSS Utilities\n\n```tsx\n\u002F\u002F Conditional classes with cn()\nimport { cn } from '@\u002Flib\u002Futils';\n\n\u003Cbutton className={cn(\n  'px-4 py-2 rounded',\n  variant === 'primary' && 'bg-blue-500 text-white',\n  disabled && 'opacity-50 cursor-not-allowed'\n)} \u002F>\n```\n\n### TypeScript Patterns\n\n```tsx\n\u002F\u002F Props with children\ninterface CardProps {\n  className?: string;\n  children: React.ReactNode;\n}\n\n\u002F\u002F Generic component\ninterface ListProps\u003CT> {\n  items: T[];\n  renderItem: (item: T) => React.ReactNode;\n}\n\nfunction List\u003CT>({ items, renderItem }: ListProps\u003CT>) {\n  return \u003Cul>{items.map(renderItem)}\u003C\u002Ful>;\n}\n```\n\n---\n\n## Resources\n\n- React Patterns: `references\u002Freact_patterns.md`\n- Next.js Optimization: `references\u002Fnextjs_optimization_guide.md`\n- Best Practices: `references\u002Ffrontend_best_practices.md`\n","# Senior Frontend\n\nFrontend development patterns, performance optimization, and automation tools for React\u002FNext.js applications.\n\n## Table of Contents\n\n- [Project Scaffolding](#project-scaffolding)\n- [Component Generation](#component-generation)\n- [Bundle Analysis](#bundle-analysis)\n- [React Patterns](#react-patterns)\n- [Next.js Optimization](#nextjs-optimization)\n- [Accessibility and Testing](#accessibility-and-testing)\n\n---\n\n## Project Scaffolding\n\nGenerate a new Next.js or React project with TypeScript, Tailwind CSS, and best practice configurations.\n\n### Workflow: Create New Frontend Project\n\n1. Run the scaffolder with your project name and template:\n   ```bash\n   python scripts\u002Ffrontend_scaffolder.py my-app --template nextjs\n   ```\n\n2. Add optional features (auth, api, forms, testing, storybook):\n   ```bash\n   python scripts\u002Ffrontend_scaffolder.py dashboard --template nextjs --features auth,api\n   ```\n\n3. Navigate to the project and install dependencies:\n   ```bash\n   cd my-app && npm install\n   ```\n\n4. Start the development server:\n   ```bash\n   npm run dev\n   ```\n\n### Scaffolder Options\n\n| Option | Description |\n|--------|-------------|\n| `--template nextjs` | Next.js 14+ with App Router and Server Components |\n| `--template react` | React + Vite with TypeScript |\n| `--features auth` | Add NextAuth.js authentication |\n| `--features api` | Add React Query + API client |\n| `--features forms` | Add React Hook Form + Zod validation |\n| `--features testing` | Add Vitest + Testing Library |\n| `--dry-run` | Preview files without creating them |\n\n### Generated Structure (Next.js)\n\n```\nmy-app\u002F\n├── app\u002F\n│   ├── layout.tsx        # Root layout with fonts\n│   ├── page.tsx          # Home page\n│   ├── globals.css       # Tailwind + CSS variables\n│   └── api\u002Fhealth\u002Froute.ts\n├── components\u002F\n│   ├── ui\u002F               # Button, Input, Card\n│   └── layout\u002F           # Header, Footer, Sidebar\n├── hooks\u002F                # useDebounce, useLocalStorage\n├── lib\u002F                  # utils (cn), constants\n├── types\u002F                # TypeScript interfaces\n├── tailwind.config.ts\n├── next.config.js\n└── package.json\n```\n\n---\n\n## Component Generation\n\nGenerate React components with TypeScript, tests, and Storybook stories.\n\n### Workflow: Create a New Component\n\n1. Generate a client component:\n   ```bash\n   python scripts\u002Fcomponent_generator.py Button --dir src\u002Fcomponents\u002Fui\n   ```\n\n2. Generate a server component:\n   ```bash\n   python scripts\u002Fcomponent_generator.py ProductCard --type server\n   ```\n\n3. Generate with test and story files:\n   ```bash\n   python scripts\u002Fcomponent_generator.py UserProfile --with-test --with-story\n   ```\n\n4. Generate a custom hook:\n   ```bash\n   python scripts\u002Fcomponent_generator.py FormValidation --type hook\n   ```\n\n### Generator Options\n\n| Option | Description |\n|--------|-------------|\n| `--type client` | Client component with 'use client' (default) |\n| `--type server` | Async server component |\n| `--type hook` | Custom React hook |\n| `--with-test` | Include test file |\n| `--with-story` | Include Storybook story |\n| `--flat` | Create in output dir without subdirectory |\n| `--dry-run` | Preview without creating files |\n\n### Generated Component Example\n\n```tsx\n'use client';\n\nimport { useState } from 'react';\nimport { cn } from '@\u002Flib\u002Futils';\n\ninterface ButtonProps {\n  className?: string;\n  children?: React.ReactNode;\n}\n\nexport function Button({ className, children }: ButtonProps) {\n  return (\n    \u003Cdiv className={cn('', className)}>\n      {children}\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## Bundle Analysis\n\nAnalyze package.json and project structure for bundle optimization opportunities.\n\n### Workflow: Optimize Bundle Size\n\n1. Run the analyzer on your project:\n   ```bash\n   python scripts\u002Fbundle_analyzer.py \u002Fpath\u002Fto\u002Fproject\n   ```\n\n2. Review the health score and issues:\n   ```\n   Bundle Health Score: 75\u002F100 (C)\n\n   HEAVY DEPENDENCIES:\n     moment (290KB)\n       Alternative: date-fns (12KB) or dayjs (2KB)\n\n     lodash (71KB)\n       Alternative: lodash-es with tree-shaking\n   ```\n\n3. Apply the recommended fixes by replacing heavy dependencies.\n\n4. Re-run with verbose mode to check import patterns:\n   ```bash\n   python scripts\u002Fbundle_analyzer.py . --verbose\n   ```\n\n### Bundle Score Interpretation\n\n| Score | Grade | Action |\n|-------|-------|--------|\n| 90-100 | A | Bundle is well-optimized |\n| 80-89 | B | Minor optimizations available |\n| 70-79 | C | Replace heavy dependencies |\n| 60-69 | D | Multiple issues need attention |\n| 0-59 | F | Critical bundle size problems |\n\n### Heavy Dependencies Detected\n\nThe analyzer identifies these common heavy packages:\n\n| Package | Size | Alternative |\n|---------|------|-------------|\n| moment | 290KB | date-fns (12KB) or dayjs (2KB) |\n| lodash | 71KB | lodash-es with tree-shaking |\n| axios | 14KB | Native fetch or ky (3KB) |\n| jquery | 87KB | Native DOM APIs |\n| @mui\u002Fmaterial | Large | shadcn\u002Fui or Radix UI |\n\n---\n\n## React Patterns\n\nReference: `references\u002Freact_patterns.md`\n\n### Compound Components\n\nShare state between related components:\n\n```tsx\nconst Tabs = ({ children }) => {\n  const [active, setActive] = useState(0);\n  return (\n    \u003CTabsContext.Provider value={{ active, setActive }}>\n      {children}\n    \u003C\u002FTabsContext.Provider>\n  );\n};\n\nTabs.List = TabList;\nTabs.Panel = TabPanel;\n\n\u002F\u002F Usage\n\u003CTabs>\n  \u003CTabs.List>\n    \u003CTabs.Tab>One\u003C\u002FTabs.Tab>\n    \u003CTabs.Tab>Two\u003C\u002FTabs.Tab>\n  \u003C\u002FTabs.List>\n  \u003CTabs.Panel>Content 1\u003C\u002FTabs.Panel>\n  \u003CTabs.Panel>Content 2\u003C\u002FTabs.Panel>\n\u003C\u002FTabs>\n```\n\n### Custom Hooks\n\nExtract reusable logic:\n\n```tsx\nfunction useDebounce\u003CT>(value: T, delay = 500): T {\n  const [debouncedValue, setDebouncedValue] = useState(value);\n\n  useEffect(() => {\n    const timer = setTimeout(() => setDebouncedValue(value), delay);\n    return () => clearTimeout(timer);\n  }, [value, delay]);\n\n  return debouncedValue;\n}\n\n\u002F\u002F Usage\nconst debouncedSearch = useDebounce(searchTerm, 300);\n```\n\n### Render Props\n\nShare rendering logic:\n\n```tsx\nfunction DataFetcher({ url, render }) {\n  const [data, setData] = useState(null);\n  const [loading, setLoading] = useState(true);\n\n  useEffect(() => {\n    fetch(url).then(r => r.json()).then(setData).finally(() => setLoading(false));\n  }, [url]);\n\n  return render({ data, loading });\n}\n\n\u002F\u002F Usage\n\u003CDataFetcher\n  url=\"\u002Fapi\u002Fusers\"\n  render={({ data, loading }) =>\n    loading ? \u003CSpinner \u002F> : \u003CUserList users={data} \u002F>\n  }\n\u002F>\n```\n\n---\n\n## Next.js Optimization\n\nReference: `references\u002Fnextjs_optimization_guide.md`\n\n### Server vs Client Components\n\nUse Server Components by default. Add 'use client' only when you need:\n- Event handlers (onClick, onChange)\n- State (useState, useReducer)\n- Effects (useEffect)\n- Browser APIs\n\n```tsx\n\u002F\u002F Server Component (default) - no 'use client'\nasync function ProductPage({ params }) {\n  const product = await getProduct(params.id);  \u002F\u002F Server-side fetch\n\n  return (\n    \u003Cdiv>\n      \u003Ch1>{product.name}\u003C\u002Fh1>\n      \u003CAddToCartButton productId={product.id} \u002F>  {\u002F* Client component *\u002F}\n    \u003C\u002Fdiv>\n  );\n}\n\n\u002F\u002F Client Component\n'use client';\nfunction AddToCartButton({ productId }) {\n  const [adding, setAdding] = useState(false);\n  return \u003Cbutton onClick={() => addToCart(productId)}>Add\u003C\u002Fbutton>;\n}\n```\n\n### Image Optimization\n\n```tsx\nimport Image from 'next\u002Fimage';\n\n\u002F\u002F Above the fold - load immediately\n\u003CImage\n  src=\"\u002Fhero.jpg\"\n  alt=\"Hero\"\n  width={1200}\n  height={600}\n  priority\n\u002F>\n\n\u002F\u002F Responsive image with fill\n\u003Cdiv className=\"relative aspect-video\">\n  \u003CImage\n    src=\"\u002Fproduct.jpg\"\n    alt=\"Product\"\n    fill\n    sizes=\"(max-width: 768px) 100vw, 50vw\"\n    className=\"object-cover\"\n  \u002F>\n\u003C\u002Fdiv>\n```\n\n### Data Fetching Patterns\n\n```tsx\n\u002F\u002F Parallel fetching\nasync function Dashboard() {\n  const [user, stats] = await Promise.all([\n    getUser(),\n    getStats()\n  ]);\n  return \u003Cdiv>...\u003C\u002Fdiv>;\n}\n\n\u002F\u002F Streaming with Suspense\nasync function ProductPage({ params }) {\n  return (\n    \u003Cdiv>\n      \u003CProductDetails id={params.id} \u002F>\n      \u003CSuspense fallback={\u003CReviewsSkeleton \u002F>}>\n        \u003CReviews productId={params.id} \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n---\n\n## Accessibility and Testing\n\nReference: `references\u002Ffrontend_best_practices.md`\n\n### Accessibility Checklist\n\n1. **Semantic HTML**: Use proper elements (`\u003Cbutton>`, `\u003Cnav>`, `\u003Cmain>`)\n2. **Keyboard Navigation**: All interactive elements focusable\n3. **ARIA Labels**: Provide labels for icons and complex widgets\n4. **Color Contrast**: Minimum 4.5:1 for normal text\n5. **Focus Indicators**: Visible focus states\n\n```tsx\n\u002F\u002F Accessible button\n\u003Cbutton\n  type=\"button\"\n  aria-label=\"Close dialog\"\n  onClick={onClose}\n  className=\"focus-visible:ring-2 focus-visible:ring-blue-500\"\n>\n  \u003CXIcon aria-hidden=\"true\" \u002F>\n\u003C\u002Fbutton>\n\n\u002F\u002F Skip link for keyboard users\n\u003Ca href=\"#main-content\" className=\"sr-only focus:not-sr-only\">\n  Skip to main content\n\u003C\u002Fa>\n```\n\n### Testing Strategy\n\n```tsx\n\u002F\u002F Component test with React Testing Library\nimport { render, screen } from '@testing-library\u002Freact';\nimport userEvent from '@testing-library\u002Fuser-event';\n\ntest('button triggers action on click', async () => {\n  const onClick = vi.fn();\n  render(\u003CButton onClick={onClick}>Click me\u003C\u002FButton>);\n\n  await userEvent.click(screen.getByRole('button'));\n  expect(onClick).toHaveBeenCalledTimes(1);\n});\n\n\u002F\u002F Test accessibility\ntest('dialog is accessible', async () => {\n  render(\u003CDialog open={true} title=\"Confirm\" \u002F>);\n\n  expect(screen.getByRole('dialog')).toBeInTheDocument();\n  expect(screen.getByRole('dialog')).toHaveAttribute('aria-labelledby');\n});\n```\n\n---\n\n## Quick Reference\n\n### Common Next.js Config\n\n```js\n\u002F\u002F next.config.js\nconst nextConfig = {\n  images: {\n    remotePatterns: [{ hostname: \"cdnexamplecom\" }],\n    formats: ['image\u002Favif', 'image\u002Fwebp'],\n  },\n  experimental: {\n    optimizePackageImports: ['lucide-react', '@heroicons\u002Freact'],\n  },\n};\n```\n\n### Tailwind CSS Utilities\n\n```tsx\n\u002F\u002F Conditional classes with cn()\nimport { cn } from '@\u002Flib\u002Futils';\n\n\u003Cbutton className={cn(\n  'px-4 py-2 rounded',\n  variant === 'primary' && 'bg-blue-500 text-white',\n  disabled && 'opacity-50 cursor-not-allowed'\n)} \u002F>\n```\n\n### TypeScript Patterns\n\n```tsx\n\u002F\u002F Props with children\ninterface CardProps {\n  className?: string;\n  children: React.ReactNode;\n}\n\n\u002F\u002F Generic component\ninterface ListProps\u003CT> {\n  items: T[];\n  renderItem: (item: T) => React.ReactNode;\n}\n\nfunction List\u003CT>({ items, renderItem }: ListProps\u003CT>) {\n  return \u003Cul>{items.map(renderItem)}\u003C\u002Ful>;\n}\n```\n\n---\n\n## Resources\n\n- React Patterns: `references\u002Freact_patterns.md`\n- Next.js Optimization: `references\u002Fnextjs_optimization_guide.md`\n- Best Practices: `references\u002Ffrontend_best_practices.md`\n",{"name":5,"description":7},"main","c0a12fc98d85642fa8893e31fc5cf5dfad879de6","engineering-team\u002Fsenior-frontend",0,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i","2026-03-13 21:49:18",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add zhangzhang-111-i\u002Fclaude-skills111 --skill senior-frontend",{"tool":62,"command":63},"bunx","bunx skills add zhangzhang-111-i\u002Fclaude-skills111 --skill senior-frontend",{"tool":65,"command":66},"pnpm","pnpm dlx skills add zhangzhang-111-i\u002Fclaude-skills111 --skill senior-frontend","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002FSKILL.md",true,[70,76,80,84,90,94],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Ffrontend_best_practices.md","REFERENCE","参考文档",19783,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Freferences\u002Ffrontend_best_practices.md",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fnextjs_optimization_guide.md",15123,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Freferences\u002Fnextjs_optimization_guide.md",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Freact_patterns.md",17341,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Freferences\u002Freact_patterns.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Fbundle_analyzer.py","SCRIPT","脚本",13339,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Fscripts\u002Fbundle_analyzer.py",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"scripts\u002Fcomponent_generator.py",8684,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Fscripts\u002Fcomponent_generator.py",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"scripts\u002Ffrontend_scaffolder.py",27981,"https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fengineering-team\u002Fsenior-frontend\u002Fscripts\u002Ffrontend_scaffolder.py",[99,125,151,180,199,222],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":44},"01M6DSNYM8PZKEXGYMRX53PVPH","risk-management-specialist","Medical device risk management specialist implementing ISO 14971 throughout product lifecycle. Provides risk analysis, risk evaluation, risk control, and post-production information analysis. Use when user mentions risk management, ISO 14971, risk analysis, FMEA, fault tree analysis, hazard identification, risk control, risk matrix, benefit-risk analysis, residual risk, risk acceptability, or post-market risk.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Frisk-management-specialist\u002FSKILL.md",[],[106,107,108,109,110,111,112,113,114,115,116,117,30,118,119,120,121,122,123,124],"risk","risk management specialist","management","risk management","risk analysis","risk evaluation","product","Evaluation","Production","lifecycle","analysis","user","risk matrix","Market","device","control","iso","medical","iso 14971",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":44},"01M6DSNSRBGVZWS23TK0ZQ52QC","regulatory-affairs-head","Senior Regulatory Affairs Manager for HealthTech and MedTech companies. Prepares FDA 510(k), De Novo, and PMA submission packages; analyzes regulatory pathways for new medical devices; drafts responses to FDA deficiency letters and Notified Body queries; develops CE marking technical documentation under EU MDR 2017\u002F745; coordinates multi-market approval strategies across FDA, EU, Health Canada, PMDA, and NMPA; and maintains regulatory intelligence on evolving standards. Use when users need to plan or execute FDA submissions, navigate 510(k) or PMA approval processes, achieve CE marking, prepare pre-submission meeting materials, write regulatory strategy documents, respond to agency queries, or manage compliance documentation for medical device market access.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fregulatory-affairs-head\u002FSKILL.md",[],[132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,123,150],"regulatory affairs head","regulatory","head","documentation","documents","packages","planning","devices","plan","access","write","strategy","evidence","standards","manage","intelligence","across","strategies","clinical",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":165,"publishedAt":44},"01M6DSNN7GNR2HZE66S4D31EP8","quality-manager-qms-iso13485","ISO 13485 Quality Management System implementation and maintenance for medical device organizations. Provides QMS design, documentation control, internal auditing, CAPA management, and certification support. Use when working with medical device quality systems, preparing for ISO 13485 audits, managing regulatory compliance documentation, setting up corrective actions, or building audit preparation programs. Useful for quality management, audit preparation, regulatory compliance, medical device documentation, and corrective action workflows.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-manager-qms-iso13485\u002FSKILL.md",[157,160],{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":161,"categoryName":162,"taxonomyType":163,"taxonomyTypeDesc":164},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[166,167,168,169,170,171,135,172,173,174,175,176,30,133,177,178,179,121,122,123],"quality manager qms iso13485","quality","design","review","support","workflows","audit","actions","compliance","system","process","up","maintenance","document",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":189,"publishedAt":44},"01M6DSNE5PQM106PM4EDGPBWGZ","quality-manager-qmr","Senior Quality Manager Responsible Person (QMR) for HealthTech and MedTech companies. Provides quality system governance, management review leadership, regulatory compliance oversight, and quality performance monitoring per ISO 13485 Clause 5.5.2.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-manager-qmr\u002FSKILL.md",[186],{"categoryNo":187,"categoryName":188,"taxonomyType":163,"taxonomyTypeDesc":164},"01JBSEEDCAT000000000000037","律师与法务",[190,167,169,191,41,192,193,174,194,175,108,195,133,196,197,198,122],"quality manager qmr","policy","governance","monitoring","regulatory compliance","oversight","cost","culture","leadership",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":209,"publishedAt":44},"01M6DSN7MYXB6X42TB1GH2TNSB","quality-documentation-manager","Document control system management for medical device QMS. Covers document numbering, version control, change management, and 21 CFR Part 11 compliance. Use for document control procedures, change control workflow, document numbering, version management, electronic signature compliance, or regulatory documentation review.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fquality-documentation-manager\u002FSKILL.md",[205,208],{"categoryNo":206,"categoryName":207,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":187,"categoryName":188,"taxonomyType":163,"taxonomyTypeDesc":164},[135,210,167,169,211,212,172,115,213,175,214,215,30,216,217,218,123,219,220,221],"quality documentation manager","workflow","change","document lifecycle","change management","list","master","system management","documentation review","cfr","21 cfr part 11","change control",{"skillNo":223,"name":224,"nameZh":6,"description":225,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":226,"categories":227,"keywords":228,"publishedAt":44},"01M6DSN3R749H3R20K15QE8X8W","qms-audit-expert","ISO 13485 internal audit expertise for medical device QMS. Covers audit planning, execution, nonconformity classification, and CAPA verification. Use for internal audit planning, audit execution, finding classification, external audit preparation, or audit program management.","https:\u002F\u002Fgithub.com\u002Fzhangzhang-111-i\u002Fclaude-skills111\u002Fblob\u002Fmain\u002Fra-qm-team\u002Fqms-audit-expert\u002FSKILL.md",[],[172,229,230,138,231,232,233,234,108,30,235,120,122,123],"qms audit expert","expert","verification","execution","classification","schedule","checklist"]