[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AP0TYZN3BKSVE5AKCYJ7BV":3,"skill-same:01M7AP0TYZN3BKSVE5AKCYJ7BV":56},{"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":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7AP0TYZN3BKSVE5AKCYJ7BV","frontend-architecture",null,"Guides frontend architecture decisions for React, Next.js, and modern SPAs — component boundaries, state, data fetching, rendering strategy, and design-system structure. Use when designing or refactoring UI architecture, choosing state management, planning folder structure, or evaluating SSR\u002FCSR\u002FISR trade-offs.","Vinayak-RZ\u002FImproveness","Vinayak-RZ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179278780?v=4","01M7ANW079C0NQMM13ZJ9AFNNB","Vinayak Raizada","01M7ANW07W35RJP6KJQ6448V08",1,"MIT","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Ffrontend-architecture\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: frontend-architecture\npaths:\n  - \"**\u002F*.tsx\"\n  - \"**\u002F*.jsx\"\n  - \"**\u002F*.vue\"\n  - \"**\u002F*.svelte\"\ndescription: Guides frontend architecture decisions for React, Next.js, and modern SPAs — component boundaries, state, data fetching, rendering strategy, and design-system structure. Use when designing or refactoring UI architecture, choosing state management, planning folder structure, or evaluating SSR\u002FCSR\u002FISR trade-offs.\n---\n\n# Frontend Architecture\n\nApply this skill before large UI refactors, new feature modules, or greenfield frontend work.\n\n## Decision checklist\n\nBefore coding, answer:\n\n1. **Rendering model** — SSR, SSG, ISR, CSR, or hybrid? (Next.js App Router defaults vs client islands)\n2. **State ownership** — server state vs UI state vs URL state vs form state\n3. **Component layers** — primitives → compounds → features → pages\n4. **Data boundary** — where fetching, caching, and mutations live\n5. **Styling system** — tokens, variants, responsive\u002Fmotion strategy\n6. **Error\u002Floading\u002Fempty** — per-route and per-component contracts\n\n## Core patterns (default recommendations)\n\n| Concern | Default | When to deviate |\n|---------|---------|-----------------|\n| Next.js data | Server Components + fetch in RSC; client only for interactivity | Heavy realtime → client + WebSocket |\n| Client state | `useState` \u002F `useReducer` locally; Context for rare shared UI | Cross-cutting client state → Zustand\u002FJotai |\n| Server state | React Query \u002F SWR for client-fetched data | RSC-only app → skip client cache libs |\n| Forms | React Hook Form + Zod | Simple forms → native + server actions |\n| Styling | Design tokens + Tailwind\u002FCSS modules | Large design system → component library layer |\n| Animation | GSAP for scroll\u002Ftimelines; CSS for micro-interactions | Component transitions → Framer Motion (install from catalog) |\n\n## Layer boundaries\n\n```text\napp\u002F or pages\u002F          → routing, layouts, metadata, thin composition\nfeatures\u002F\u003Cname>\u002F        → feature UI + hooks + feature-specific types\ncomponents\u002Fui\u002F          → dumb primitives (no business logic)\ncomponents\u002F             → shared composites\nlib\u002F                    → pure utilities, API clients, validators\nserver\u002F or actions\u002F     → server actions, data access (Next.js)\n```\n\n**Rules:**\n- UI components do not import DB or env secrets\n- Data fetching in one place per feature (not scattered in leaves)\n- No prop-drilling beyond 2 levels — lift to context or composition\n\n## Trade-offs to surface explicitly\n\nAlways present options when choosing:\n\n| Decision | Option A | Option B | Default |\n|----------|----------|----------|---------|\n| Rendering | SSR (fresh, SEO) | CSR (interactive, simpler deploy) | SSR\u002FSSG for marketing; CSR islands for dashboards |\n| State | Global store | Colocated state | Colocated until proven shared |\n| Styling | Utility-first | CSS modules | Utility + tokens for speed |\n| Bundle size | Lazy routes\u002Fcomponents | Eager load | Lazy for heavy routes |\n| Forms | Server Actions | Client API | Server Actions when on Next.js |\n\nUse the `\u003CTRADEOFF>` block format from `trade-offs.mdc` for non-obvious choices.\n\n## Anti-patterns to reject\n\n- Business logic in presentational components\n- Fetching in `useEffect` when RSC or server action suffices (Next.js)\n- God components >300 lines without extraction plan\n- Inline styles for design-system values that should be tokens\n- Animation on layout properties (width\u002Fheight\u002Ftop) — use transforms\n\n## Output when architecting\n\nProduce a short **Frontend Architecture Note** (`docs\u002Ffrontend-architecture.md` or in plan):\n\n1. Rendering and routing approach\n2. Folder\u002Fmodule layout\n3. State and data-fetch strategy\n4. Key trade-offs chosen and rejected\n5. Migration phases (if refactor)\n\n## Additional reference\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md) for pattern catalog and Next.js-specific notes.\n","# Frontend Architecture\n\nApply this skill before large UI refactors, new feature modules, or greenfield frontend work.\n\n## Decision checklist\n\nBefore coding, answer:\n\n1. **Rendering model** — SSR, SSG, ISR, CSR, or hybrid? (Next.js App Router defaults vs client islands)\n2. **State ownership** — server state vs UI state vs URL state vs form state\n3. **Component layers** — primitives → compounds → features → pages\n4. **Data boundary** — where fetching, caching, and mutations live\n5. **Styling system** — tokens, variants, responsive\u002Fmotion strategy\n6. **Error\u002Floading\u002Fempty** — per-route and per-component contracts\n\n## Core patterns (default recommendations)\n\n| Concern | Default | When to deviate |\n|---------|---------|-----------------|\n| Next.js data | Server Components + fetch in RSC; client only for interactivity | Heavy realtime → client + WebSocket |\n| Client state | `useState` \u002F `useReducer` locally; Context for rare shared UI | Cross-cutting client state → Zustand\u002FJotai |\n| Server state | React Query \u002F SWR for client-fetched data | RSC-only app → skip client cache libs |\n| Forms | React Hook Form + Zod | Simple forms → native + server actions |\n| Styling | Design tokens + Tailwind\u002FCSS modules | Large design system → component library layer |\n| Animation | GSAP for scroll\u002Ftimelines; CSS for micro-interactions | Component transitions → Framer Motion (install from catalog) |\n\n## Layer boundaries\n\n```text\napp\u002F or pages\u002F          → routing, layouts, metadata, thin composition\nfeatures\u002F\u003Cname>\u002F        → feature UI + hooks + feature-specific types\ncomponents\u002Fui\u002F          → dumb primitives (no business logic)\ncomponents\u002F             → shared composites\nlib\u002F                    → pure utilities, API clients, validators\nserver\u002F or actions\u002F     → server actions, data access (Next.js)\n```\n\n**Rules:**\n- UI components do not import DB or env secrets\n- Data fetching in one place per feature (not scattered in leaves)\n- No prop-drilling beyond 2 levels — lift to context or composition\n\n## Trade-offs to surface explicitly\n\nAlways present options when choosing:\n\n| Decision | Option A | Option B | Default |\n|----------|----------|----------|---------|\n| Rendering | SSR (fresh, SEO) | CSR (interactive, simpler deploy) | SSR\u002FSSG for marketing; CSR islands for dashboards |\n| State | Global store | Colocated state | Colocated until proven shared |\n| Styling | Utility-first | CSS modules | Utility + tokens for speed |\n| Bundle size | Lazy routes\u002Fcomponents | Eager load | Lazy for heavy routes |\n| Forms | Server Actions | Client API | Server Actions when on Next.js |\n\nUse the `\u003CTRADEOFF>` block format from `trade-offs.mdc` for non-obvious choices.\n\n## Anti-patterns to reject\n\n- Business logic in presentational components\n- Fetching in `useEffect` when RSC or server action suffices (Next.js)\n- God components >300 lines without extraction plan\n- Inline styles for design-system values that should be tokens\n- Animation on layout properties (width\u002Fheight\u002Ftop) — use transforms\n\n## Output when architecting\n\nProduce a short **Frontend Architecture Note** (`docs\u002Ffrontend-architecture.md` or in plan):\n\n1. Rendering and routing approach\n2. Folder\u002Fmodule layout\n3. State and data-fetch strategy\n4. Key trade-offs chosen and rejected\n5. Migration phases (if refactor)\n\n## Additional reference\n\nSee [references\u002Fpatterns.md](references\u002Fpatterns.md) for pattern catalog and Next.js-specific notes.\n",{"name":5,"paths":24,"description":7},[25,26,27,28],"**\u002F*.tsx","**\u002F*.jsx","**\u002F*.vue","**\u002F*.svelte","main","9fb685c39f4231d1c854d8d1b95935d2e1a2e709",".cursor\u002Fskills\u002Ffrontend-architecture",0,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness","https:\u002F\u002Fgithub.com\u002FVinayak-RZ","2026-09-15 15:09:50",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Vinayak-RZ\u002FImproveness --skill frontend-architecture",{"tool":42,"command":43},"bunx","bunx skills add Vinayak-RZ\u002FImproveness --skill frontend-architecture",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Vinayak-RZ\u002FImproveness --skill frontend-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Ffrontend-architecture\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fpatterns.md","REFERENCE","参考文档",1360,"https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002F.cursor\u002Fskills\u002Ffrontend-architecture\u002Freferences\u002Fpatterns.md",[57,64,71,78,84,91],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7APA22BN6W9SVF4SCEAP3B1","greet","A greeting skill for testing","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Fmarketplace\u002Ffixtures\u002Fvalid-marketplace\u002Fplugins\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7AP9ZV2PZ7EZAVMP021GT88","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7AP9YRRCH92DRVN61AQTNAZ","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7AP9XDBJJSP9XRNGP6JQ2BX","no-frontmatter","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7AP9WAGKGA2C3FN9B92RKAD","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7AP9SRFAAYTQ44GWGXG5ERX","different-name","A skill with a name that doesn't match the directory.","https:\u002F\u002Fgithub.com\u002FVinayak-RZ\u002FImproveness\u002Fblob\u002Fmain\u002Foh-my-pi\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[]]