[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79THAXPWT4Y5JQBHHEPBCVN":3,"skill-same:01M79THAXPWT4Y5JQBHHEPBCVN":53},{"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":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M79THAXPWT4Y5JQBHHEPBCVN","nextjs-architect",null,"Architect-level Next.js guidance — App Router topology, choosing static vs dynamic vs streaming rendering, the four cache layers and how to reason about them, server action and route-handler boundaries, auth and data access placement, deployment topology, and the version changes from 13 to 16. Use when designing, reviewing or restructuring a Next.js codebase.","SriAkhilSJ\u002FPulseAIRepo","SriAkhilSJ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F206201543?v=4","01M79RWFD1Q09B89SXTTKKJY6Z","Sri Akhil SJ","01M79RWFE26NPG0BZ1FRNX376H",0,"MIT","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Ffrontend-development-architect\u002Freact-architect\u002Fnextjs-architect\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nextjs-architect\ndescription: Architect-level Next.js guidance — App Router topology, choosing static vs dynamic vs streaming rendering, the four cache layers and how to reason about them, server action and route-handler boundaries, auth and data access placement, deployment topology, and the version changes from 13 to 16. Use when designing, reviewing or restructuring a Next.js codebase.\nlicense: MIT\ncompatibility: Next.js 14+ (App Router). Pages Router is covered only for migration decisions.\nmetadata:\n  crusor-domain: website-architect\n  crusor-path: website-architect\u002Ffrontend-development-architect\u002Freact-architect\u002Fnextjs-architect\n  crusor-origin: original\n  crusor-sources: \"nextjs.org\u002Fdocs (App Router, caching, server actions); vercel-labs\u002Fagent-skills@063bee94 (react-best-practices server rules)\"\n  crusor-verified-on: \"2026-10-30\"\n  crusor-triggers: \"nextjs, next.js, app-router, rsc, server-components, caching, revalidate, server-actions, ssr, streaming\"\n---\n\n# Next.js Architecture\n\nNext.js gives you four caching layers, two rendering modes and three places to\nput server code. Most production problems are a **boundary** problem: something\nis client-side that should not be, or something is cached that should not be.\n\n## When to use\n\n- Choosing App Router vs Pages Router (or planning the migration).\n- Deciding where a fetch, a mutation, or an auth check lives.\n- A page is stale, slow, or re-renders on every navigation and the cache is the\n  suspect.\n- Reviewing route structure before the app grows past a handful of screens.\n\n## When NOT to use\n\n- A component-level change with no data, cache or routing consequence.\n- A pure SPA where Next.js is not the target.\n\n## Decision 1 — Router\n\n| Situation | Choice |\n|---|---|\n| New app | App Router |\n| Existing Pages Router app, stable | stay; migrate per-route when that route needs layouts, streaming or RSC |\n| Hybrid during migration | both routers can coexist; do not share layouts across the boundary |\n\nMigration rule: move **leaf routes** first, never the shell. Two routers sharing\na root layout is where migrations stall.\n\n## Decision 2 — Rendering strategy per route\n\nBe explicit for every route; \"it depends\" is how stale pages ship.\n\n| Route character | Strategy |\n|---|---|\n| Same for all users, changes rarely | static (default) with `revalidate` |\n| Content that must be fresh per request | dynamic (`cookies()`, `headers()`, `noStore`) |\n| Personalised shell, shared body | static shell + dynamic holes + Suspense streaming |\n| Slow data, page usable early | stream with `loading.tsx`\u002FSuspense at the seam |\n| Write path | server action or route handler — never a client-side secret |\n\nOne `cookies()` call turns the whole route dynamic. Place dynamic reads as deep\nas possible, and know which file introduces them.\n\n## Decision 3 — The four caches\n\n| Cache | What it holds | How it is invalidated |\n|---|---|---|\n| Request memoisation | one render pass, duplicate `fetch` | automatic |\n| Data cache | `fetch` results across requests | `revalidateTag`, `revalidatePath`, time |\n| Full route cache | rendered static route | redeploy, revalidation, dynamic APIs |\n| Client router cache | prefetched route payloads | navigation, `router.refresh()`, time |\n\nRules:\n\n- Tag every non-trivial `fetch` (`next: { tags: [...] }`) — revalidation without\n  tags becomes guesswork.\n- After a mutation, invalidate **by tag, in the action**, not by hoping the\n  client refetches.\n- `router.refresh()` is a client cache fix, not a data-freshness strategy.\n- A stale UI report is answered by naming which of the four caches is stale —\n  if you cannot name it, you have not diagnosed it.\n\n## Decision 4 — Where server code lives\n\n```\napp\u002Froute\u002F            composition + boundaries only\napp\u002Froute\u002Factions.ts  mutations (\"use server\"), validate, authorise, invalidate\napp\u002Fapi\u002Froute\u002F        route handlers for external\u002Fwebhook\u002Fstreaming contracts\nlib\u002Fserver\u002F           data access + auth helpers, imported only by server code\nlib\u002Fclient\u002F           browser-only helpers\ncomponents\u002F           shared UI; \"use client\" only at interactive leaves\n```\n\n- Server actions are **public endpoints**: validate input, check authorisation,\n  and never trust a hidden field.\n- The data layer returns plain serialisable data; do not pass ORM entities or\n  class instances across the RSC boundary.\n- Secrets, database clients and SDK keys stay in `lib\u002Fserver` and never reach a\n  `\"use client\"` module.\n\n## Decision 5 — Client boundary discipline\n\n- `\"use client\"` at the leaf that needs interactivity, not at the layout.\n- Pass server data down as props; do not import server modules into client\n  components.\n- Keep the client bundle's dependency budget explicit: charts, editors and\n  date libraries load via `next\u002Fdynamic` behind a real interaction.\n\n## Failure modes at scale\n\n- **Sequential awaits** in a route or layout: fetch independent data in\n  parallel; waterfalls dominate TTFB long before the database does.\n- **Dynamic creep**: an analytics call using `headers()` turns every route\n  dynamic and silently disables static optimisation.\n- **Over-fetching to the client**: sending a whole record so the client can\n  render three fields inflates the RSC payload on every navigation.\n- **Cache confusion**: `revalidate = 0` added to \"fix\" staleness, converting a\n  static route into a per-request render.\n- **Auth in the wrong layer**: UI-level gating without a server-side check.\n\n## Anti-patterns\n\n- A single `\"use client\"` layout wrapping the whole app.\n- `useEffect` fetching on mount in a framework that already has a server.\n- A route handler duplicating a server action (two contracts, one behaviour).\n- Mutating data in a `GET` handler or in a server component render.\n- Relying on the router cache for correctness (\"it updates after a click\").\n\n## Version notes (13 → 16)\n\n- App Router remains the default; Pages Router is maintenance-only for new work.\n- Server Actions are stable; treat them as public API from the first commit.\n- `fetch` caching defaults have changed across releases — state the policy\n  explicitly per route instead of inheriting the default of the day.\n- Partial Prerendering \u002F streaming holes graduate over these versions; when\n  enabled, verify per-route behaviour rather than assuming a global switch.\n- Always pin the Next.js major and record it in `metadata.crusor-sources`.\n\n## Verification receipts\n\n1. `next build` output: which routes are static, dynamic, or streamed — read it,\n   do not assume it.\n2. A production-mode request per critical route (dev mode hides caching).\n3. Mutation → tag invalidation → fresh render, demonstrated end to end.\n4. Client bundle report for the heaviest route.\n5. An unauthenticated request against a protected action\u002Froute, showing denial.\n","# Next.js Architecture\n\nNext.js gives you four caching layers, two rendering modes and three places to\nput server code. Most production problems are a **boundary** problem: something\nis client-side that should not be, or something is cached that should not be.\n\n## When to use\n\n- Choosing App Router vs Pages Router (or planning the migration).\n- Deciding where a fetch, a mutation, or an auth check lives.\n- A page is stale, slow, or re-renders on every navigation and the cache is the\n  suspect.\n- Reviewing route structure before the app grows past a handful of screens.\n\n## When NOT to use\n\n- A component-level change with no data, cache or routing consequence.\n- A pure SPA where Next.js is not the target.\n\n## Decision 1 — Router\n\n| Situation | Choice |\n|---|---|\n| New app | App Router |\n| Existing Pages Router app, stable | stay; migrate per-route when that route needs layouts, streaming or RSC |\n| Hybrid during migration | both routers can coexist; do not share layouts across the boundary |\n\nMigration rule: move **leaf routes** first, never the shell. Two routers sharing\na root layout is where migrations stall.\n\n## Decision 2 — Rendering strategy per route\n\nBe explicit for every route; \"it depends\" is how stale pages ship.\n\n| Route character | Strategy |\n|---|---|\n| Same for all users, changes rarely | static (default) with `revalidate` |\n| Content that must be fresh per request | dynamic (`cookies()`, `headers()`, `noStore`) |\n| Personalised shell, shared body | static shell + dynamic holes + Suspense streaming |\n| Slow data, page usable early | stream with `loading.tsx`\u002FSuspense at the seam |\n| Write path | server action or route handler — never a client-side secret |\n\nOne `cookies()` call turns the whole route dynamic. Place dynamic reads as deep\nas possible, and know which file introduces them.\n\n## Decision 3 — The four caches\n\n| Cache | What it holds | How it is invalidated |\n|---|---|---|\n| Request memoisation | one render pass, duplicate `fetch` | automatic |\n| Data cache | `fetch` results across requests | `revalidateTag`, `revalidatePath`, time |\n| Full route cache | rendered static route | redeploy, revalidation, dynamic APIs |\n| Client router cache | prefetched route payloads | navigation, `router.refresh()`, time |\n\nRules:\n\n- Tag every non-trivial `fetch` (`next: { tags: [...] }`) — revalidation without\n  tags becomes guesswork.\n- After a mutation, invalidate **by tag, in the action**, not by hoping the\n  client refetches.\n- `router.refresh()` is a client cache fix, not a data-freshness strategy.\n- A stale UI report is answered by naming which of the four caches is stale —\n  if you cannot name it, you have not diagnosed it.\n\n## Decision 4 — Where server code lives\n\n```\napp\u002Froute\u002F            composition + boundaries only\napp\u002Froute\u002Factions.ts  mutations (\"use server\"), validate, authorise, invalidate\napp\u002Fapi\u002Froute\u002F        route handlers for external\u002Fwebhook\u002Fstreaming contracts\nlib\u002Fserver\u002F           data access + auth helpers, imported only by server code\nlib\u002Fclient\u002F           browser-only helpers\ncomponents\u002F           shared UI; \"use client\" only at interactive leaves\n```\n\n- Server actions are **public endpoints**: validate input, check authorisation,\n  and never trust a hidden field.\n- The data layer returns plain serialisable data; do not pass ORM entities or\n  class instances across the RSC boundary.\n- Secrets, database clients and SDK keys stay in `lib\u002Fserver` and never reach a\n  `\"use client\"` module.\n\n## Decision 5 — Client boundary discipline\n\n- `\"use client\"` at the leaf that needs interactivity, not at the layout.\n- Pass server data down as props; do not import server modules into client\n  components.\n- Keep the client bundle's dependency budget explicit: charts, editors and\n  date libraries load via `next\u002Fdynamic` behind a real interaction.\n\n## Failure modes at scale\n\n- **Sequential awaits** in a route or layout: fetch independent data in\n  parallel; waterfalls dominate TTFB long before the database does.\n- **Dynamic creep**: an analytics call using `headers()` turns every route\n  dynamic and silently disables static optimisation.\n- **Over-fetching to the client**: sending a whole record so the client can\n  render three fields inflates the RSC payload on every navigation.\n- **Cache confusion**: `revalidate = 0` added to \"fix\" staleness, converting a\n  static route into a per-request render.\n- **Auth in the wrong layer**: UI-level gating without a server-side check.\n\n## Anti-patterns\n\n- A single `\"use client\"` layout wrapping the whole app.\n- `useEffect` fetching on mount in a framework that already has a server.\n- A route handler duplicating a server action (two contracts, one behaviour).\n- Mutating data in a `GET` handler or in a server component render.\n- Relying on the router cache for correctness (\"it updates after a click\").\n\n## Version notes (13 → 16)\n\n- App Router remains the default; Pages Router is maintenance-only for new work.\n- Server Actions are stable; treat them as public API from the first commit.\n- `fetch` caching defaults have changed across releases — state the policy\n  explicitly per route instead of inheriting the default of the day.\n- Partial Prerendering \u002F streaming holes graduate over these versions; when\n  enabled, verify per-route behaviour rather than assuming a global switch.\n- Always pin the Next.js major and record it in `metadata.crusor-sources`.\n\n## Verification receipts\n\n1. `next build` output: which routes are static, dynamic, or streamed — read it,\n   do not assume it.\n2. A production-mode request per critical route (dev mode hides caching).\n3. Mutation → tag invalidation → fresh render, demonstrated end to end.\n4. Client bundle report for the heaviest route.\n5. An unauthenticated request against a protected action\u002Froute, showing denial.\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":31},{"crusor-path":25,"crusor-domain":26,"crusor-origin":27,"crusor-sources":28,"crusor-triggers":29,"crusor-verified-on":30},"website-architect\u002Ffrontend-development-architect\u002Freact-architect\u002Fnextjs-architect","website-architect","original","nextjs.org\u002Fdocs (App Router, caching, server actions); vercel-labs\u002Fagent-skills@063bee94 (react-best-practices server rules)","nextjs, next.js, app-router, rsc, server-components, caching, revalidate, server-actions, ssr, streaming","2026-10-30","Next.js 14+ (App Router). Pages Router is covered only for migration decisions.","main","8fa4e240be65b98472c9b2d3a505ade2aea1a5c6","skills\u002Fwebsite-architect\u002Ffrontend-development-architect\u002Freact-architect\u002Fnextjs-architect","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ","Studying in CMR institute of Technology\r\n2024 - 2028","2026-11-13 21:02:23",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add SriAkhilSJ\u002FPulseAIRepo --skill nextjs-architect",{"tool":45,"command":46},"bunx","bunx skills add SriAkhilSJ\u002FPulseAIRepo --skill nextjs-architect",{"tool":48,"command":49},"pnpm","pnpm dlx skills add SriAkhilSJ\u002FPulseAIRepo --skill nextjs-architect","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Ffrontend-development-architect\u002Freact-architect\u002Fnextjs-architect\u002FSKILL.md",true,[],[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M79TTAJNACCNXCEN3649CMMD","interaction-patterns-architect","Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Fui-ux-implementation-architect\u002Finteraction-patterns-architect\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M79TT2ESKB1TKZBYY9KYJHV9","design-system-ops-architect","Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Fui-ux-implementation-architect\u002Fdesign-system-ops-architect\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M79TSV0PWGNK3PRX9P4JDR9N","design-handoff-architect","Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Fui-ux-implementation-architect\u002Fdesign-handoff-architect\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},"01M79TSJS9BFXNP696FMJ9GKDA","content-microcopy-architect","Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Fui-ux-implementation-architect\u002Fcontent-microcopy-architect\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},"01M79TSCNBST3N1M68V1KPH9HQ","ui-ux-implementation-architect","Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Fui-ux-implementation-architect\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},"01M79TS4N6A4D2QQ433VXS5D0R","test-strategy-architect","Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.","https:\u002F\u002Fgithub.com\u002FSriAkhilSJ\u002FPulseAIRepo\u002Fblob\u002Fmain\u002Fskills\u002Fwebsite-architect\u002Ftesting-and-deployment-architect\u002Ftest-strategy-architect\u002FSKILL.md",[],[]]