[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EV3P5A923CDN9XG99J1JEF":3,"skill-same:01M7EV3P5A923CDN9XG99J1JEF":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"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":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EV3P5A923CDN9XG99J1JEF","ams-nextjs-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-nextjs-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nextjs-pro\ndescription: Idiomatic Next.js: App Router, Server Components, data fetching\u002Fcaching, and production deployment. Use when writing, reviewing, or structuring Next.js applications.\ncategory: development\n---\n\n# Next.js Pro\n\n## Overview\n\nNext.js App Router's model — **React Server Components by default, client components as\nopt-in, and granular caching** — rewards thinking carefully about where code runs. Professional\nNext.js means mastering the server\u002Fclient boundary, using the caching model deliberately (not\naccidentally), colocating data fetching with the components that need it, and treating Server\nActions as the mutation story.\n\nThe through-line: server by default, client by necessity, cached by design.\n\n## When to use\n\n- Writing or reviewing Next.js App Router code.\n- Designing server\u002Fclient component boundaries.\n- Debugging caching issues (stale data, over-fetching) or hydration errors.\n- Structuring routes, layouts, data fetching, and mutations.\n- Optimizing Next.js performance and deployment.\n\n## Core concepts\n\n- **Server Components by default.** Async components fetching data directly (`await db.query()`\n  in the component) — no useEffect waterfalls, no API round-trip for your own database. Client\n  components (`'use client'`) only for interactivity, browser APIs, and hooks — pushed to the\n  leaves, not the root.\n- **The caching model, deliberate.** `fetch` caching, route segment config (`revalidate`,\n  `dynamic`), and `unstable_cache` — understand what caches what, or you'll debug stale data\n  forever. Default to static where possible; opt into dynamic explicitly; revalidate with\n  `revalidatePath`\u002F`revalidateTag` on mutation.\n- **Colocated data fetching.** Fetch next to the component that renders the data; parallelize\n  independent fetches (same-tick promises); Suspense boundaries for streaming independent\n  sections. Request waterfalls are a design smell — hoist and parallelize.\n- **Server Actions for mutations.** `'use server'` functions called directly from client\n  components — form submissions, updates — with `revalidatePath` after mutation and\n  `useFormStatus`\u002F`useActionState` for pending\u002Ferror UI. Validate inputs server-side (zod);\n  never trust the client.\n- **Route groups and layouts.** `(group)` for organization without URL impact; layouts for\n  persistent UI; `loading.tsx`\u002F`error.tsx` per segment for granular states; `not-found.tsx`\n  for 404s. Parallel\u002Fintercepting routes for advanced patterns (modals over pages) — powerful\n  but only when the UX demands it.\n- **Middleware sparingly.** Auth checks, redirects, A\u002FB headers — middleware runs on every\n  matched request (edge runtime limits apply). Don't put business logic there; it's a gate,\n  not a service layer.\n\n## Practical workflow\n\n1. **Scaffold:** `create-next-app` with TypeScript, App Router, and your styling choice;\n   strict TS; ESLint with Next.js rules in CI.\n2. **Draw the server\u002Fclient boundary.** Page shells and data components → server; interactive\n   widgets → client leaves. Props cross the boundary (serializable only — no functions, no class\n   instances).\n3. **Fetch deliberately.** Server components fetch directly; parallelize with `Promise.all` or\n   same-tick awaits; wrap independent sections in `\u003CSuspense>` for streaming; set revalidation\n   per data freshness needs.\n4. **Mutate with Server Actions.** Validate → mutate → revalidate → redirect\u002Freturn state;\n   optimistic updates via `useOptimistic` where rollback is well-defined.\n5. **Handle all states per segment.** `loading.tsx` skeletons, `error.tsx` with reset, and\n   `not-found.tsx` — users should never see a blank segment or raw error.\n6. **Deploy and observe.** Vercel or self-hosted (standalone output); monitor Core Web Vitals,\n   server action errors, and cache hit rates; set up ISR\u002Frevalidation monitoring for stale-data\n   detection.\n\nServer\u002Fclient sketch:\n\n```tsx\n\u002F\u002F app\u002Forders\u002Fpage.tsx — Server Component: fetches directly\nexport default async function OrdersPage({ searchParams }) {\n  const orders = await getOrders(searchParams.status); \u002F\u002F runs on server\n  return (\n    \u003C>\n      \u003CFilterBar \u002F> {\u002F* 'use client' leaf: interactive *\u002F}\n      \u003CSuspense fallback={\u003COrdersSkeleton \u002F>}>\n        \u003COrderTable orders={orders} \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  );\n}\n```\n\n## Common pitfalls\n\n- **`'use client'` at the root.** Making the whole page client-rendered \"to use hooks\" —\n  forfeits SSR, streaming, and direct data access. Push the boundary to the leaves.\n- **Waterfall fetching.** Sequential awaits for independent data, or client components fetching\n  in effects what the server component could fetch directly. Parallelize; colocate.\n- **Cache confusion.** Stale data blamed on \"Next.js bugs\" that's actually default static caching;\n  or `revalidate = 0` everywhere \"to be safe,\" forfeiting the performance story. Learn the model;\n  set it per route deliberately.\n- **Non-serializable props across the boundary.** Passing functions, Dates-as-class-instances, or\n  complex objects from server to client components — serialization errors or subtle bugs. Plain\n  data only.\n- **Hydration mismatches.** `new Date()`, `Math.random()`, or `typeof window` checks rendering\n  different HTML on server vs client. Render deterministically; defer client-only bits.\n- **Server Actions without validation.** Trusting client-submitted data in actions. Validate\n  every input server-side; authorize every mutation (the action runs with server privileges).\n- **Middleware bloat.** Business logic, DB queries, and heavy computation in middleware —\n  it runs on every request at the edge. Keep it to routing\u002Fauth decisions.\n","# Next.js Pro\n\n## Overview\n\nNext.js App Router's model — **React Server Components by default, client components as\nopt-in, and granular caching** — rewards thinking carefully about where code runs. Professional\nNext.js means mastering the server\u002Fclient boundary, using the caching model deliberately (not\naccidentally), colocating data fetching with the components that need it, and treating Server\nActions as the mutation story.\n\nThe through-line: server by default, client by necessity, cached by design.\n\n## When to use\n\n- Writing or reviewing Next.js App Router code.\n- Designing server\u002Fclient component boundaries.\n- Debugging caching issues (stale data, over-fetching) or hydration errors.\n- Structuring routes, layouts, data fetching, and mutations.\n- Optimizing Next.js performance and deployment.\n\n## Core concepts\n\n- **Server Components by default.** Async components fetching data directly (`await db.query()`\n  in the component) — no useEffect waterfalls, no API round-trip for your own database. Client\n  components (`'use client'`) only for interactivity, browser APIs, and hooks — pushed to the\n  leaves, not the root.\n- **The caching model, deliberate.** `fetch` caching, route segment config (`revalidate`,\n  `dynamic`), and `unstable_cache` — understand what caches what, or you'll debug stale data\n  forever. Default to static where possible; opt into dynamic explicitly; revalidate with\n  `revalidatePath`\u002F`revalidateTag` on mutation.\n- **Colocated data fetching.** Fetch next to the component that renders the data; parallelize\n  independent fetches (same-tick promises); Suspense boundaries for streaming independent\n  sections. Request waterfalls are a design smell — hoist and parallelize.\n- **Server Actions for mutations.** `'use server'` functions called directly from client\n  components — form submissions, updates — with `revalidatePath` after mutation and\n  `useFormStatus`\u002F`useActionState` for pending\u002Ferror UI. Validate inputs server-side (zod);\n  never trust the client.\n- **Route groups and layouts.** `(group)` for organization without URL impact; layouts for\n  persistent UI; `loading.tsx`\u002F`error.tsx` per segment for granular states; `not-found.tsx`\n  for 404s. Parallel\u002Fintercepting routes for advanced patterns (modals over pages) — powerful\n  but only when the UX demands it.\n- **Middleware sparingly.** Auth checks, redirects, A\u002FB headers — middleware runs on every\n  matched request (edge runtime limits apply). Don't put business logic there; it's a gate,\n  not a service layer.\n\n## Practical workflow\n\n1. **Scaffold:** `create-next-app` with TypeScript, App Router, and your styling choice;\n   strict TS; ESLint with Next.js rules in CI.\n2. **Draw the server\u002Fclient boundary.** Page shells and data components → server; interactive\n   widgets → client leaves. Props cross the boundary (serializable only — no functions, no class\n   instances).\n3. **Fetch deliberately.** Server components fetch directly; parallelize with `Promise.all` or\n   same-tick awaits; wrap independent sections in `\u003CSuspense>` for streaming; set revalidation\n   per data freshness needs.\n4. **Mutate with Server Actions.** Validate → mutate → revalidate → redirect\u002Freturn state;\n   optimistic updates via `useOptimistic` where rollback is well-defined.\n5. **Handle all states per segment.** `loading.tsx` skeletons, `error.tsx` with reset, and\n   `not-found.tsx` — users should never see a blank segment or raw error.\n6. **Deploy and observe.** Vercel or self-hosted (standalone output); monitor Core Web Vitals,\n   server action errors, and cache hit rates; set up ISR\u002Frevalidation monitoring for stale-data\n   detection.\n\nServer\u002Fclient sketch:\n\n```tsx\n\u002F\u002F app\u002Forders\u002Fpage.tsx — Server Component: fetches directly\nexport default async function OrdersPage({ searchParams }) {\n  const orders = await getOrders(searchParams.status); \u002F\u002F runs on server\n  return (\n    \u003C>\n      \u003CFilterBar \u002F> {\u002F* 'use client' leaf: interactive *\u002F}\n      \u003CSuspense fallback={\u003COrdersSkeleton \u002F>}>\n        \u003COrderTable orders={orders} \u002F>\n      \u003C\u002FSuspense>\n    \u003C\u002F>\n  );\n}\n```\n\n## Common pitfalls\n\n- **`'use client'` at the root.** Making the whole page client-rendered \"to use hooks\" —\n  forfeits SSR, streaming, and direct data access. Push the boundary to the leaves.\n- **Waterfall fetching.** Sequential awaits for independent data, or client components fetching\n  in effects what the server component could fetch directly. Parallelize; colocate.\n- **Cache confusion.** Stale data blamed on \"Next.js bugs\" that's actually default static caching;\n  or `revalidate = 0` everywhere \"to be safe,\" forfeiting the performance story. Learn the model;\n  set it per route deliberately.\n- **Non-serializable props across the boundary.** Passing functions, Dates-as-class-instances, or\n  complex objects from server to client components — serialization errors or subtle bugs. Plain\n  data only.\n- **Hydration mismatches.** `new Date()`, `Math.random()`, or `typeof window` checks rendering\n  different HTML on server vs client. Render deterministically; defer client-only bits.\n- **Server Actions without validation.** Trusting client-submitted data in actions. Validate\n  every input server-side; authorize every mutation (the action runs with server privileges).\n- **Middleware bloat.** Business logic, DB queries, and heavy computation in middleware —\n  it runs on every request at the edge. Keep it to routing\u002Fauth decisions.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-nextjs-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-nextjs-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-nextjs-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-nextjs-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-nextjs-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]