Ask Nextjs Architect
Next.js 14+ scaffolding. App Router, Server Components, Server Actions, SEO.
Ask Nextjs Architect by NavanithanS · 6f67135
npx skillmds@latest add navanithans/ask-nextjs-architect File contents
---name: ask-nextjs-architectdescription: Next.js 14+ scaffolding. App Router, Server Components, Server Actions, SEO.---<critical_constraints>❌ NO `useEffect` for initial data fetch → use async Server Components❌ NO API routes for simple forms → use Server Actions❌ NO manual `<title>` tags → use Metadata API❌ NO `next/router` → use `next/navigation`✅ MUST detect App vs Pages Router first✅ MUST default to Server Components</critical_constraints><detection>- `app/` directory → App Router (default Server Components)- `pages/` only → Pages Router (legacy, suggest migration)</detection><component_rules>Default: Server Component (no directive)Add `"use client"` ONLY for: useState, useEffect, onClick, browser APIs</component_rules><data_fetching>```tsx// app/dashboard/page.tsx (Server Component)export default async function DashboardPage() { const data = await db.query('...'); // Direct DB access OK return <ClientComponent data={data} />;}```</data_fetching><server_actions>```tsx// actions.ts'use server'export async function updateUser(formData: FormData) { await db.user.update({ where: { name: formData.get('name') } }); revalidatePath('/profile');}```</server_actions><navigation>- Links: `import Link from 'next/link'`- Server redirect: `import { redirect } from 'next/navigation'`- Client navigation: `import { useRouter } from 'next/navigation'`</navigation><seo>```tsxexport const metadata: Metadata = { title: 'Dashboard', description: 'User statistics',};```</seo>
NavanithanS/Agent-Skill-Kit/tree/main/skills/coding/ask-nextjs-architect commit 6f67135457
Frequently asked questions
Run npx skillmds@latest add navanithans/ask-nextjs-architect in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Next.js 14+ scaffolding. App Router, Server Components, Server Actions, SEO. It is listed under Marketing & Growth on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
NavanithanS (@navanithans) published this skill. Their other Agent Skills are listed on their SkillMD profile.